FString ObjName = GetOwner()->GetName();
FString ObjPos = GetOwner()->GetActorLocation().ToString();
UE_LOG(LogTemp, Error, TEXT("%s is at %s"), *ObjName, *ObjPos);
I found this to be the quickest way because GetActorLocation().ToString() alreay outputs
the data in this format: “X=xxx , Y=xxx , Z=xxx”
Yeah, that’s the same way I solved this!
I did something similar, but I thought that I’d have to use the .ToString() on the overall result.
'FString ObjectLocation = (GetOwner()->GetActorLocation()).ToString();
Sorry if I am not formatting this correctly - new to this whole thing.
DanM
4
You’re missing another ` at the end of the statement.
`code`
or
```
code
```