Hey I created an game instance called “DefGameIns”
And in FirstpersonCharacter_BP here is what I have:
I press L to make lagamcheck true and press H it says ‘true’ I press z to open another level and press h it says false.
I made sure my variables were public and selected the DefGameIns as game instance in the project settings
I really dont know what its causing it
Please help as soon as possible I can’t really continue on with my project.
Alternatively you might be able to save it to a HUD class (and assign that HUD in the gamemode), but I think a HUD will reset on level change too and you’ll have the same issue.
Ok I found the Fix if anyone
the problem was When i pressed L it was actually loading it to the instance
But when i pressed H it was printing the old state of the instance instead of the current
so the fix was , before I print string I had to cast again to load the current instance to the pawn and feed the print string