I do not know how to use GameInstance

I do not know how to use GameInstance.
Keeping the values of the changed variables between levels did not work this way.
Please tell me the correct way.

Hi Tarrow100

Looking at your code, everything seems to work as it should.
I see you are setting the variables on the GameInstance before you load a new level, are you accessing these variables after you have finished your level load?

272571-gameinstance.png

With the way you have written your question, I am assuming the “OpenLevel” node is firing and you are going to the correct level. If it’s not, make sure you have set your game to use your custom GameInstance in the “MapsAndModes” category of your project settings.

Note: If this is a networked application, widgets cannot see the GameInstance as it only persists on the server.

Hope this helps. Good luck! :slight_smile:

Thank you! !
Operation of GameInstance has succeeded.