Is there a way to create some sort of direct link to an object/actor when creating asserts or log messages?
For (a bad) example, let’s say we have a large number of actors placed in the level. All of these actors need to be at least 1 meter away from each other. There’s some validation code running that detects if any of these actors is too close and it pops an assert. Manually searching through the level for the problem actors would a huge pain. Printing the names of the actors would help, but since duplicate names are allowed, that isn’t always helpful.
Is there some way to generate a unique link to the objects in question? Preferably something clickable in some way that would center the camera on the actor?
Thanks for the reply. I think you might have misunderstood me, though. What I’m looking for is something that would be done outside of the game when an assert is hit (e.g. checkf/ensureMsgf in code or any of the Assert nodes in blueprint) such that the message output would have useful information in linking to the offending object(s).
More specifically, this link would be inside of the assert popup or within the log. This is especially critical for issues that are caught by QA or automation so this can be logged and checked out by a dev later.
Sorry I misled you by suggesting FUObjectToken for actors
The reason I ended up here in the first place is because it was my first time needing to do that kind of stuff
You actually want to use FActorToken with actors FActorToken::Create(GetPathName(), GetActorGuid(), TextForTheLink)
A factory from an AActor* would be nice in this case…
Roughly the same thing here. Without entering anything for the text param, it’s just printing a path which is based on PIE and so is not useful. It’s even worse with the text param as it just prints that text.
Am I looking in the wrong place or something? I’m just using the Output Log in the editor.