Primero, el propósito
1. Quieres saber: UE4 envía un mensaje a flash
Dos, referencia
1. Interacción y biblioteca de MFC y Flash
https://blog.csdn.net/qq_40544338/article/details/94136027
- Resumen: esta es la interacción entre MFC y Flash, utilizando la biblioteca y, que también está disponible en todos los UE4.
1. Llamadas mutuas entre UE4 C ++ y Blueprint
https://blog.csdn.net/m0_37981386/article/details/82962930
- Resumen: fallido
1. UE4-Blueprint y la clase C ++ se llaman funciones entre sí
https://www.cnblogs.com/yblackd/p/13819045.html
- Resumen: éxito
Tres, operación
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);
}