Your Game Instance

In case you don't have your own Game Instance blueprint - you can just use my BP_GameInstance asset directly and skip this chapter.

Otherwise proceed along with simple Copy-Paste routine shown below.


First of, reselect project's Game Instance to yours:

Now find BP_GameInstance asset in content browser in Blueprints folder and open it.

Copy every Variable there and paste it in your own Game Instance blueprint:

Select all nodes and copy-paste to your Blueprint as well:

Obviously connect to your Event Init if it is already present in your graph.


Now we are getting to slightly complicated and important stuff.

Navigate to Blueprints folder, and open BPFL_GlobalFunctions, unfold last 'Misc' category. There should be function named Get GameInstance. Duplicate it(Ctrl+D), and rename it to something so it would resemble your own game instance:

Replace all things related to the old GameInstance with yours as shown on picture above.

Then select original Get GameInstance function, and change (temporarily) it's return type from BP_GameInstance to normal GameInstance. Click Compile, so it will just highlight all places where you should make fixes:

by using those errors as links, you can click and navigate directly to the places where you should make replacements now. With the function that you recently created, start making replacements with matching variables(!) This is the most important part to not mess up, you should get results like this:

After all those replacements, try Compile this blueprint and get it green .

Then recover Get GameInstance function return type back to BP_GameInstance, yes it won't be used, but just better put things back to where they were.


Now you should get your game running with your GameInstance and Menu performing correctly with SaveGame features working as well.

Try playing with Menu Music sliders, some graphics settings, and then relaunch the game and get assured that SaveGame functionality is actually working as intended.

Last updated