UE4:Log不同的数据类型

Log不同的数据类型

直接Log

1
UE_LOG(YourLog,Warning,TEXT("This is a message to yourself during runtime!"));

FString

1
UE_LOG(YourLog,Warning,TEXT("MyCharacter's Name is %s"), *MyCharacter->GetName() );

Bool

bool值不能直接b%

1
UE_LOG(YourLog,Warning,TEXT("MyCharacter's Bool is %s"), (MyCharacter->MyBool ? TEXT("True") : TEXT("False")));

Float

1
UE_LOG(YourLog,Warning,TEXT("MyCharacter's Health is %f"), MyCharacter->Health );

FVector

1
UE_LOG(YourLog,Warning,TEXT("MyCharacter's Location is %s"),  *MyCharacter->GetActorLocation().ToString());

FName

1
UE_LOG(YourLog,Warning,TEXT("MyCharacter's FName is %s"), *MyCharacter->GetFName().ToString());

UE4:Log不同的数据类型
http://muchenhen.com/posts/7723/
作者
木尘痕
发布于
2022年3月12日
许可协议