Irrelevant Pixel
  • Introduction / Foreword
  • ↘️Integrating Menu into your game
    • Add to your project
    • Maps and Modes
    • Your Game Instance
    • Play in your Level
    • Turn ON Enhanced Input
    • Mouse functionality
    • Integration completed
  • Getting to know how to use it
    • Creating Page for Options
    • Selector
    • Slider
    • Toggle
    • Keybinder
      • Duplicating Keys
    • Stylizing Interactive Widgets
    • Save your Options
    • End of the Basic Usage Manual
  • Advancing into Internal Structure
    • Core Concepts
    • Page-related things
    • Aspect Ratios + Resolutions
    • Graphics 'Overall Quality'
    • Deeper into (C)Stylizing
    • deleting Dev.Tool
Powered by GitBook
On this page
  1. Integrating Menu into your game

Your Game Instance

Last updated 9 months ago

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:

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.

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

↘️
✅