- Home /
Saving a list from a class containing gamobjects
Hi again another quick question;
I have a class set up for monsters these include all the stats etc and the gamemodel that loads when that perticular monster is chosen.
the player has a new list of monsters taken from an all monsters list.
now when i try to save the list of monsters the player has and their stats, i get the error gameObject is not marked as serialisable. What would be the best way to get around this because i need the list to contain the gameobject but also i need to save the player monsters stats?
any help appreciated
sorry to be annoying but could you help me a bit more. i have tried player prefs and this cant save the prefabs in the list. I tried making the gameobject variable unserializable but then on load it throws a load of null reference exceptions from the missing prefabs. $$anonymous$$y scripting skills are not great as this is my first set of scripts so any more help would be appreciated.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
PlayerPrefs and own Class 1 Answer
Collisions and Lists 1 Answer
How to store a class as a variable 1 Answer
Why Is TextMesh Off by One ??? 0 Answers