Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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?

Product Version: UE 4.9
more ▼

asked Oct 06 '15 at 09:15 PM in C++ Programming

avatar image

36 2 4 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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

more ▼

answered Aug 03 '17 at 04:42 PM

avatar image

47 7 10

avatar image rit Sep 25 '17 at 08:05 AM

Bump this question.

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

avatar image UnexpectedSquirt Dec 09 '17 at 04:12 PM

bump 10 char

avatar image Spoondog Apr 04 '19 at 07:17 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users


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.

more ▼

answered Oct 06 '15 at 09:35 PM

avatar image

544 38 50 68

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question