UE_LOG and format specifiers
- UE_LOG(LogTemp, Warning, TEXT("BeginPlay() called!"));
- int myInt{ 42 };
- UE_LOG(LogTemp, Warning, TEXT("int myInt: %d"), myInt);
- float myFloat{ 3.14159f };
- UE_LOG(LogTemp, Warning, TEXT("float myFloat: %f"), myFloat);
- double myDouble{ 0.000756 };
- UE_LOG(LogTemp, Warning, TEXT("double myDouble: %lf"), myDouble);
- char myChar{ 'J' };
- UE_LOG(LogTemp, Warning, TEXT("char myChar: %c"), myChar);
- wchar_t wideChar{ L'J' };
- UE_LOG(LogTemp, Warning, TEXT("wchar_t wideChar: %lc"), wideChar);
- bool myBool{ true };
- UE_LOG(LogTemp, Warning, TEXT("bool myBool: %d"), myBool);
- UE_LOG(LogTemp, Warning, TEXT("int: %d, float: %f, bool: %d"), myInt, myFloat, myBool);
- // FString
- FString myString{ TEXT("My String!!!") };
- UE_LOG(LogTemp, Warning, TEXT("FString myString: %s"), *myString);
Comments
Post a Comment