[英]How to log FVector in unreal engine
FVector ActorLocation = GetActorLocation();
UE_LOG(LogTemp, Log, TEXT("Actor location: %f"), ActorLocation);
您不能直接记录FVector
。 您需要将其转换为FString
,然后使用%s
(不是%f
),最后使用operator*
进行取消引用。
这应该工作
UE_LOG(LogTemp, Log, TEXT("Actor location: %s"), *ActorLocation.ToString());
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.