Hi,
I have a GameObject that I want to save which contains a script Component. When I load the GameObject, it seems that the script attached to the GameObject is not loaded correctly.
This image shows that I set this.gameObject to TotalCardsBoughtAchievement. I then save the GameObject into the key "TotalCardsBoughtAchievement".
Notice how in the bottom right ( showing the local variables), there are 4 components, One which is InfiniteRunner.Achievements.BuyCardAchievements script.
When I load this GameObject on Start up; I have a simple if statement:
I load the data into the GameStatsData.TotalCardsBoughtAchievement gameobject.
------
On load, I set buy_card_achievement to the GameStatsData.TotalCardsBoughtAchievement GameObject.
but notice how there is a component missing . The InfiniteRunner.Achievements.BuyCardAchievements script
I was wondering if there were more steps that needed to be done inorder to save a GameObject. I was successfully able to save a list of GameObjects prior to this issue for my game, but this is the first time I'm trying to save a single GameObject.
Thank you.
Components Missing in GameObject on Load
Re: Components Missing in GameObject on Load
Hi there,
Have you added support for the Component as described in the Saving and Loading GameObjects guide?
https://docs.moodkie.com/easy-save-3/es ... s-prefabs/
Only explicitly supported Components will be saved and loaded because otherwise a Component can't be assumed to be serializable at runtime.
All the best,
Joel
Have you added support for the Component as described in the Saving and Loading GameObjects guide?
https://docs.moodkie.com/easy-save-3/es ... s-prefabs/
Only explicitly supported Components will be saved and loaded because otherwise a Component can't be assumed to be serializable at runtime.
All the best,
Joel