I would like to create a list of lists in C#, Unity (so I don't have to create 10 seperated lists). It doesn't show any syntax error, however, even though it's public, it doesn't show up in Unity inspector.
public List<List<Sprite>> listOfLists;
Unity inspector aren't to able serialize nested objects, if you want to do that please create and use class structure.
Example code:
[System.Serializable]
public class serializableClass
{
public List<int> sampleList;
}
public List<serializableClass> nestedList = new List<serializableClass>();
If you use these type of structure should see this...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With