Create the EnemyAmount variable in your Game Instance blueprint(create one in content browser if you dont have it already, and then set it as your game instance in Project Settings) Then you can get/set that variable from any other BP by Get Game Instance > Casto to yourgameinstance > Get/Set EnemyAmount.
You mean it is using the default game instance currently, i think? If thats the case then yeah, just create a new game instance BP in content browser, set is as your project’s game instance in project settings and use that.
Thanks for your answer, but I have a not so important question:
If I use another GameInstance BP, doesn’t that have a huge lack of functions? Because there already is one GI BP used.
Thank you again
EDIT: I noticed that I need a reference, do you know how I can refer to the gameinstance ? Screenshot by Lightshot
I already have a Reference to my gameinstance but even if I use it, I need another reference or something like that
There wont be any difference between the empty default GI BP and the one you will create in the content browser. And yes, you’ll only create the variables and use the game instance to pass those values between other BP’s.
Right click anywhere in the graph and then Get Game Instance > then drag from the blue pin and Cast to Yourgameinstance > and finally get/set your variable.