How to get actor ID Name in c++

I have many actors in scene what is made by same blueprint.
and the blueprint was base on a c++ class.

how can I get the actor ID name in c++

You can get the actor name by calling GetName() on any UObject.

An ID you get by calling GetUniqueID().

Thank you very much. it worked!

No problem. When you have such problems you can look inside the C++ API and look after these functions.

Thank you , I will do like that.^^

If it’s an actor, I found that GetName() returns the ID (the name you get if you hover over the object in the Outliner).

To get the Label that is displayed, use GetLabel()

I’m using 4.7.6

In 4.18 it’s now GetActorLabel() instead…

1 Like

Worth noting GetActorLabel() is Editor only!

Not to revive a dead topic but this method is insufficient for saved data, just so that anyone coming to this will know. Spawned actors are not guaranteed to have their name assigned, therefore the _### that gets added can vary.

1 Like