UE4给flash发送消息

一、目的

1、想知道:UE4给flash发送消息

二、参考

1、MFC和Flash交互-and库

https://blog.csdn.net/qq_40544338/article/details/94136027

  • 总结:这个是MFC和Flash交互,使用的是and库,所有UE4中也是可以使用的。

1、UE4 C++ 与蓝图的相互调用

https://blog.csdn.net/m0_37981386/article/details/82962930

  • 总结:失败

1、UE4-蓝图与C++类 互相调用函数

https://www.cnblogs.com/yblackd/p/13819045.html

  • 总结:成功

三、操作

1、

public:
	//发送消息给flash
	UFUNCTION(BlueprintCallable, Category = "flash")
		void SetSingal2flash(FString _string , int _e , bool _bool );

void AMyHUD::SetSingal2flash(FString _string, int _e, bool _bool)
{
	//FString转换为string
	std::string MyStdString(TCHAR_TO_UTF8(*_string));
	//string转换为char *
	const char * c = MyStdString.c_str();
	//传递给flash
	FastFlashArg argv[3] = { c ,_e,_bool};
	FastFlashCallFunction(pFlash, "GetUE4Singal", argv,3);
}

猜你喜欢

转载自blog.csdn.net/qq_40544338/article/details/109155285
UE4
今日推荐