If I want to uniquely identify actors for later manipulation by storing the unique ID’s somewhere, what can I used to uniquely identify them in a Blueprint project?
The only built-in label I can find is “Get Display Name” which explicitly states “This function should not be used to uniquely identify actors!” in its description.
Do I need to manually add GUIDs to actor types that I want to uniquely identify instances of, or is there a system unique ID that I can tap into within the blueprints environment?
It seems that GetUniqueId is what I want, but I don’t see any way to access it from within a blueprint.
Is the Object Name unique only in current instance of the game or across different instances?
When I run the game two times, will the object name be the same for the same object?
It likely depends on order of actor being spawned since the Object Names will be sequential like BP_Class1, BP_Class2, BP_Class3, etc… It has some randomness that might not be reliable.
You should try using Tags on Actors you want to identify, which can be checked using ActorHasTag
Yeah, I know about Tags but the problem with them is that you need to set them manually, it’s an option but adds an additional steps in something that I’m trying to make as much automatic as possible.
If the number of this type of actor is the same then it should be working I guess . I’m thinking about using it to identify widgets on the screen and save the location of them.
This depends on exactly what your wanting to do, you could save a reference to the actor along with its data in a saved game, but if it’s going to be manipulated much later the exact object may no longer be valid. Is this a static/placed actor or one that is spawned in at runtime? More precise details on your objective would help
There are no objectives here as this thread is no longer valid, in a way. Note it’s very old and the poster above merely necroed it. GUID was not available in UE4 BP. It is now.
I would also be curious how you got that to work because I ran into the same issue as DaUik when trying to use that guid, it was unavailable in packaged builds.
I was able to get around it by copying it into a custom component purposely built to persist that value. But the callbacks that make that work are specific to C++ and therefore not a viable solution for a blueprint discussion.
But it was worth it to not have to deal with the hooks for actor creation, duplication and whatnot that the Engine already deals with to manage the guid that DaUik referenced.