Persistent Data/Game Instance?

So one of the major things that’s keeping me from completely switching over to Unreal from Unity is the ability to store persistent data, on something like a game instance object.

I am wondering how one might go about this in Blueprint, since that is my primary draw towards Unreal. I am not really a programmer so Blueprint is awesome for me!

All examples I find of a game instance object for Unreal involve C++, but if anyone can tell me (or link me to) a way I might go about it, I would be eternally grateful!

You can create and use a custom GameInstance BP the same way you would do in C++.
This GameInstance persists during level changes until you close the game again.

After selecting “GameInstance” for your new BP:

You can easily set this to be the standard GameInstance Class in the Project Settings:

And get the Instance Pointer in every BP (with casting so you can use your custom one):

If you have more questions regarding this topic, feel free to ask me (:

Wow, thanks eXi, that helped a bunch! :slight_smile:

(: I’m glad i was able to help you. If you still have questions regarding this topic, feel free to ask me!

why it give me warning so?
http://s16.postimg.org/6u8uyiok1/Immagine.jpg
P.s sorry for necro-post but i don’t want to open another thread with the same error…

You need to cast to your custom GameInstance. In that BP you are casting to the base GameInstance class, which the pointer is already that type.

I figured out how to create a game instance variable and even up date it from a different blueprint, but is there any way to access the game instance variable from another blueprint?

Yep the same way you cast to other nodes. You need to “get gameinstance” and then from that cast to the type of game instance you want to cast to/ are using then you can get or set variables or call functions

I was so close to getting it myself, never thought it was the same. I thought cast meant send I was looking for receive.

Thanks You.

How to set the GameInstance class in C++? Is it only possible through the .ini files?