Carrying player data between scenes in Unity (Pt.2)


In my last blog post, I mentioned working on a manager system to help carry data for the player in between scenes. That run manager has mostly worked at this point but as further features have been coded, I now run into a new, but connected issue: Getting the data to load properly after being carried to the new scene. This is obviously an issue as while some data can be simply carried between scenes and stored for use later, some data is used actively during gameplay, such as the cards, items and currency in the player’s possession. If any of these aren’t properly carried over and got set back to defaults, the player would face major setbacks and it’d probably break the game as a whole. 

As of right now, I have no clear solution on how to fix this, as I have spent a lot of time trying to fix this issue. As of right now, the player’s card info does seem to be properly carried in between scenes based on various debug methods I use but getting said data to then properly load into the UI and for the player has been a whole other issue. I haven’t even been able to get to the player’s inventory yet due to focusing on the cards, although that may be a slightly simpler process as now that I know how to at least get the information properly saved into the run manager, I may be able to get the player’s items to load as that system is simpler than the cards. As soon as both of these issues are handled however, the next step: saving into and loading from a save file generated by the project, should be a much simpler process due to knowing how I need to retrieve and then utilize the player’s data at that point. 

 Author: Gilbert Pemberton 

 Date: 4/26/2024

Get Suits of the Abyss

Leave a comment

Log in with itch.io to leave a comment.