Any language: Get actor GUID

Hi all,
I need to use an inbuilt method that takes a GUID, representing an actor reference.

How can I get the GUID of an actor instance?
I don’t mind if the solution is in BP, C++ or Python, since you can interface between the three with ease.

The closest thing I’ve found is UObjectBase::GetUniqueID(), but that simply returns a single uint32, not FGuid.
Furthermore, FGuid is composed of four uint32s, not just one… so GetUniqueID() certainly isn’t what i want.

Thanks in advance,


Some Completely Optional Context…

The method I’m trying to call is MovieSceneScriptingActorReferenceChannel::addKey() (python, it’ll be in BP somewhere)
This method takes a MoveSceneObjectBindingID (python | C++), which is just a GUID. Therefore, a GUID must be able to reference an actor.

NB: I realise this could be seen as a scripting problem, and so posted in the wrong place, but I’m just looking for A solution, the language does not matter.

I have same problem as you .

If I understand your question correctly, try this:

Select some actor in editor, then execute this python code.

unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_selected_level_actors()[0].get_editor_property("actor_guid")

it will return a unreal.Guid(mirrored from Guid.h) like this:

 <Struct 'Guid' (0x000009AFACECAE20) {}>
4 Likes