I had wanted to populate an array with blueprints sourced from a particular location in the folder structure and I got a satisfactory answer. All was well, until I found that I wanted to call a function, which required a cast to a class from which my blueprints were derived.
There seems to be a lack of information on UBlueprintGenerated in the documentation, and having perused the available functions within it and its parent class, I can’t seem to find what I need.
This is what I worried would be the case, but I had hoped there was a method somewhere from which a class reference could be obtained, similar to UBlueprintGeneratedClass::GetGeneratedClassesHierarchy.
The reason I needed to do this was to get some values from each of the blueprints, and I was hoping to do this whilst filling the array without spawning if possible.
Still, if I was to create an object pool, then this wouldn’t be an issue anyway as I could get the values from the pooled objects, or just simply spawn and destroy them.
Oh you want to access default values? they are in class default object, engine creates one for each class to hold defaults. You can access it via GetDefaultObject() in UClass. Remember to not set anything in it or call functions on it as it might mess up things