I noticed that at runtime UE strips spaces in Actor names. I do a get all actors to find all player starts, which are named “Player StartX”, where X goes from 1 to 4.
In editor, if I get actor display name it returns e.g. “Player Start1”, which is expected behaviour.
However, at runtime (i.e. when game is built to a standalone), actor names will be stripped of spaces, e.g. “PlayerStart1”.
Thanks for test project! I was able to reproduce this in 4.7.5 as well as our internal build, so I’ve entered a bug report for issue (UE-13580). When I see any progress on it, I’ll update this post. Thanks again!
As mentioned in comment for GetDisplayName, it returns a different thing for cooked games versus editor builds, and shouldn’t be used for keying or other applications that need a stable name. It’s really designed for use with debug printing / during development to give you a more friendly name than object name. actor label it is pulling from in editor mode doesn’t exist at all in cooked game.
I’ve exposed a GetObjectName in CL# 2518476, which will be stable across both cooked and non-cooked builds for things that don’t autogenerate their names (e.g., stable for statically placed actors or C++ constructed components but not stable for AddComponent nodes in a UCS, transient objects created using NAME_None, etc…). If you need a name to display to end user, you should use a FText variable instead of either one of these methods, so it can be localized.