1.输出字符串到output log中 1.1 最普通的三种 FString filePath UE_LOG(LogTemp, Log, TEXT("Hello,World!")); UE_LOG(LogTemp, Warning, TEXT("Hello,World!")); UE_LOG(LogTemp, Error, TEXT("Hello,World!")); 1.2 %d打印int,%f打印float,%s string 前面加throttle是为了知道打印的对象 UE_L...
FText f2 = FText: :Format(NSLOCTEXT("UECPP","K2", "OK {name}--{hp}"), Args); UE_ LOG(LogTemp, Log, TEXT("%s"), *f2. ToString()); FString转到FName FString s1(TEXT("OK")); FName n1=FName(*s1) ; FString转到FText FString s1(TEXT("OK")); FText t1 = FText::FromSt...
Test2会乱码FString Test2=L"你好,世界”//FString Test3=TEXT("你好,世界")voidTestFString(){// 你好,世界默认ANSI编码,赋值给Test1后,如果平台是unicode,Test1会乱码FString Test1="你好,世界";FString Test2=L"你好,世界";FString Test3=TEXT("你好,世界");UE_LOG(LogTemp,Log,TEXT("Test1=%s,Test2=%s...
UE_LOG(YourLog,Warning,TEXT("This is a message to yourself during runtime!")); Log an FString %s strings are wanted as TCHAR* by Log, so use *FString() //"MyCharacter's Name is %s" UE_LOG(YourLog,Warning,TEXT("MyCharacter's Name is %s"), *MyCharacter->GetName() ); Log an...
UE_LOG(LogTemp, Error, TEXT("Hello,World!")); 输出字符串到屏幕上 FString filePath; GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, FString::Printf(TEXT("DLL_Init"))); GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, FString::Printf(TEXT("%s"), *filePath)); ...
1.日志与跟踪 1.1 UE4中的原生API UE4中提供UE_LOG接口,可以打出不同级别的log,包括Error、warning...
Log格式: Log Message //"This is a message to yourself during runtime!"UE_LOG(YourLog,Warning,TEXT("This is a message to yourself during runtime!")); Log an FString %s strings are wantedasTCHAR* by Log, so use *FString()//"MyCharacter's Name is %s"UE_LOG(YourLog,Warning,TEXT(...
UE_LOG(LogTemp, Error, TEXT("Hello,World!")); 输出字符串到屏幕上 FString filePath; GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, FString::Printf(TEXT("DLL_Init"))); GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, FString::Printf(TEXT("%s"), *filePath)); ...
UE_LOG(LogTemp, Error, TEXT("Hello,World!")); 输出字符串到屏幕上 FString filePath; GEngine-> AddOnScreenDebugMessage(-1, 5.f, FColor::Green, FString::Printf(TEXT("DLL_Init"))); GEngine ->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, FString::Printf(TEXT("%s"), *filePath))...
UE4之FString转换 参考 FString字符串转换 C++输出字符串 输出字符串到output log中 FString filePath UE_LOG(LogTemp, Log, TEXT("%s"), *filePath); UE_LOG(LogTemp, Error, TEXT("Hello,World!")); 1. 2. 3. 4. 输出字符串到屏幕上 FString filePath;...