I’m trying to create object type in my project to represent names in BP.
For instance, let’s say I have a function that takes the Name of an NPC. I’m thinking I can create an NPC_Base actor, and children from it representing each character name I want to be able to use with this function. In a BP, I can create a variable with a class reference to NPC_Base, so that I can select one of its children (the purpose of this is to essentially create a BP version of TSubclassOf). Then I want to pass the filename of that child into the Name of the function.
Closest thing I’m finding now is “Get Display Name” which is currently appending “_C” to the end of whatever child is selected.
Probably use something like GetClass → GetName instead if that’s a thing.
If not, there are string functions you can use to chop the “" off and everything after it.,You can chop off everything from the "” after, using string function nodes.
But I think there’s a a better way like maybe GetClass->GetName or something like that.
The only name-related thing that I can do with an Object Class Reference is “Get Display Name”, which has different behavior in editor and builds
In case anyone is looking for this, I created a new BP node, which exposes this function:
FString UCoreGameFunctionLibrary::GetUClassName(UClass* InClass)
else return "";