- Home /
Keeping information on custom Inspector window using List of List
I am wondering if there is any way to get unity to serialize and save when I hit play button Lists List such as List< List< bool>> example;
I have tried everything my custom class is serialized I have tried to mark it as SerializeField nothing seems to work. I am wondering if there is a work around I can use other than just using an array of array which would not be ideal.
fyi I am new to unity in general but been programming C# with xna for years
Answer by frarees · Jun 20, 2014 at 01:44 PM
Try this:
[System.Serializable] // don't forget this!
public class ListOfBools {
public List<bool> myBools;
}
public class MyScript : MonoBehaviour {
public List<ListOfBools> myList;
}
Your answer
Follow this Question
Related Questions
Editor Script not saving after first time playing 2 Answers
Why does my Unity Serialization not work? Do i miss something? 1 Answer
object list not serializing 2 Answers
Unity doesn't store GUID field? 2 Answers
How to hide/show serialized class object in the inspector with boolean value change? 1 Answer