Download

GameInstance has stopped loading variables?

Last night/ this morning I learned about the existence of the gameinstance while trying to add in a new level to my game and not wanting things like my score and collectibles and current health to reset when I loaded a new level, so I went back and moved all of the variables I wanted to be persistent throughout multiple levels to the game instance, and then went and found all the places the original variables were referenced and replaced them with a reference to the variable pulled from the game instance. This all worked out great except for some of the player movement that was dependent on a move enabled boolean that was still in the player blueprint. So I called it good enough for now, saved my changes and went to sleep with plans to move the boolean to the game instance and fix all of its references today. This is where the problem starts, when I loaded up my project the first thing I did was play it to see if I could catch anything else out of place that needed to be worked on while I was working on the movement variable and all of a sudden nothing works… Everything gets reset to default when the new level loads, all of the game instance variables, calls, and references are exactly as I left them when I quit working on the project for the day last night(When everything except player movement was being saved to and called from the gameinstance as it should be) and now my player health resets to 0, the collectibles reset to 0 and not owned, the score resets to 0, everything I had working last night is no longer working today and I made no changes to the blueprints between going to sleep and pressing play again this morning. Has anyone else experienced the game instance just stopping functioning after reopening the project and if so what was the cause and how did you fix it?