What is an Actor's Constant/Persistent Unique Identifier?
I am looking to serialize all Actors in a particular level, to be saved out and restored later. This is fine, except I need a key for each Actor to use. I have been looking at GetObjectName() and GetUniqueID(), however I don't think either of these ID types fulfill the following requirements:
What identifier would you use? Do I need to add a UUID property to differ all instances of my Actors?
asked Oct 06 '15 at 09:15 PM in C++ Programming
So I think they will be unique between level loads, only if objects are alive.
I was using hashed GetObjectName() to identify objects on my level. And I think both functions fulfill the first requirement.
But if you need UniqueID between levels, or even different instances of the game (from save files ex.) you should use your own actor field. If you have no option to make your own field, than I think GetObjectName() is dependent on actors class name and sequence of object creation. So reloading the same static level twice will produce same object names.
So adding your own ID would be the better option.
Follow this question
Once you sign in you will be able to subscribe for any updates here