Mixing C++ and Blueprint GameInstance

I have 2 GameInstances (1 Blueprint and 1 C++) from 3rd party packages that I need to integrate into a project. The project needs to be completed by next month so I don’t have time to re-write these, so I’m hoping one of you can help.

I’m fairly new to UE4 and have some experience exposing C++ to Blueprints, but not much having them inherit from each other.
The easiest would be to work with the C++ one and have the Blueprint as its parent class, however; I’m not sure how to set this up. If possible, how can I specify a Blueprint as the parent class for a C++ GameInstance?

If not possible, I need help understanding how to call the C++ GameInstance functions from Blueprints, or which ones can’t be called so I can find an alternate approach.
Specifically:

  1. Init and Shutdown - Assuming I can just call Parent:Init and Parent:Shutdown for these.
  2. StartGameInstance - Is there a way to call this in Blueprints? If not, when does this execute compared to Init. I think I can put this functionality in Init if they are both only executed once at startup.
  3. Exec - This is only used for runtime console commands, so I can port to Blueprints unless there’s an easy way to call this from Blueprints.

Thanks for any assistance!

It is not possible to make a C++ class inherit from a blueprint class, however the vice versa is possible. To override the Init and Shutdown functions in C++, you would declare virtual void Init() override and virtual void Shutdown() override. In Blueprints, these can be called by right clicking and typing them in. You can also call the parent function’s version of these functions by right clicking and choosing “call parent function”. StartGameInstance should not be needed if you use Init. You can declare C++ functions, for instance the Exec you want, and call them in blueprints. To do so, you will need to type above the function UFUNCTION(BlueprintImplementableEvent). I hope this helps :smiley:

Once again Mr Valor comes through! Thanks for your timely and helpful responses!!

np @Foxgluv :D, I just changed my name to Aphix xD. Good luck!