I did something before that worked but can’t remember what. Trouble is, how do I set a Variable for a “Level” type? Need to hook it to an Interface and want it stored to access in the Game Instance which will change later.
The type of Variable used as reference.
If it’s the name of a level, then it would just be a string. ( I’m missing the point here… )
Once you make the variable on the left in BP. The bottom left lets you set up that variable then in the list on left. Click it and drag it into the bp screen then use either the set or get for that variable. You seem to want to set it, so use the set one and it will appear to be used however you want.
If I do that I can’t replace (within Game Instance) when the Level changes so I need to specify the type to refer to it as an object.
If you’re using level streaming, you can keep track of what level is ( or was ) loaded in the game instance.
If you’re using ‘load level’, it overwrites the game instance, so you can’t use that. Then you need to use the save game to record what’s going on.
I thought Game Instance was a global variable.
game instance doesn’t get reset on level transition fyi.
Think I’ve found a solution. Since the root of any Class is an Object (similar to if I create a base Actor and have children blueprints) I’ve left the reference as that, however I cannot Cast to it but luckily this is ok for an Interface call.
Is that right? Didn’t check, just assumed it was, because everything else is.