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:

  1. ID is unique for each Actor in the level
  2. ID does not change between level loads

What identifier would you use? Do I need to add a UUID property to differ all instances of my Actors?

GetUniqueID()

Returns the unique ID of the
object…these are reused so it is
only unique while the object is alive.
Useful as a tag.

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.

Bump this question. Is it really guaranteed that GetObjectName() will return the same name between level load?
Documentation is REALLY lacking :frowning:

Bump this question.

I need to have an ID referring to each actor that is both UNIQUE and PERSISTENT.

bump 10 char

Using GetObjectName() in blueprint will not return the same name between loads. Not sure about GetUniqueID() because we can’t do that in blueprint :frowning: