I have a base class in C++ which derives from USaveGame, and a blueprint which has this class set as it’s parent. In another C++ class, I am trying to use UGameplayStatics::CreateSaveGameObjectFromBlueprint, but I’m having trouble passing in the correct parameter.
NOTE: I do NOT wish to use UGameplayStatics::CreateSaveGameObject because the blueprint in question has code that is accessed from several other blueprints, and it would be far too much hassle trying to convert everything into C++ (and would also make it nearly impossible for our art team to add any functionality to the game).
Using the following line, I am able to get a class object pointer:
static ConstructorHelpers::FObjectFinder SaveGameClassFinder(FNAME_BP_SAVE_GAME);
And while debugging, I’ve found that SaveGameClassFinder.Object->ClassDefaultObject does contain a valid pointer to my base class, but I cant find a way to cast any of this to a valid UBlueprint to pass into CreateSaveGameObjectFromBlueprint (everything I’ve tried simply returns NULL)…
I’ve even tried casting the UBlueprintGeneratedClass directly into a UBlueprint, which also fails.
How does one properly utilize UGameplayStatics::CreateSaveGameObjectFromBlueprint?