Hi I am newbie so please correct me on any errors on posting edict.
I have a blank project with a Cube placed in the scene. I added a ActorComponent to the Cube and attempted to get the ID Name of the Cube. After running “GetOwner()->GetName()” it returns “StaticMeshActor_0”. Is this the ID Name in Unreal Engine 5?
I only ask this because when running the same thing in Unreal Engine 4 I get “Cube_0” as the ID Name. Additionally I can verify this by hover over the object in the World Outliner. Yet in Unreal Engine 5 when I hover over an object I get the Label instead.
Are ID Names changed in Unreal Engine 5 or am I getting the ID Name of a static mesh within my object? Any guidance will be appreciated. I am also posting some images of my code and output below.
ActorComponent Code
Resulting Output
Hover Over World Outliner
Unreal Engine 4 Hover Over World Outliner
1 Like
What are you trying to do with the name? There is also no “ID name”, uobject have an ID (which you can get via GetUniqueID()) and various properties such as a name and a path.
If you call GetName (or GetFName()) you get the name that the object was assigned during creation. That name is unique to the outer object, but doesn’t tell you much else. You can use GetPathName() or GetFullName() to see the full object path, which is unique among all uobjects.
1 Like
Thanks for your reply.
I am trying to follow an UE4 tutorial by Gamedev.tv, but using UE5. In one of the early tutorials they run the code above to get a Cube’s ID Name (i.e. “Cube_0”). I was doubting the engine because when I ran the code in UE5 I got the Cube’s ID Name but “StaticMeshActor_0”. I was expecting a “Cube_0” instead I got a “StaticMeshActor_0”. This is the correct ID Name for my Cube in UE5 though (as shown below).
I am unsure how to close the post after marking a solution. Is it fine as it is now?
Ah ok, yeah that’s fine then.