I'm making a word game to teach kids how to read and promote literacy. As part of that, I made a Scriptable Object that's basically a bunch of nested Lists, until it reaches the bottom node:
using System.Collections.Generic;
using UnityEngine;
using Unity.VisualScripting;
[CreateAssetMenu(fileName = "New WordPronunciationData", menuName = "Word Pronunciation Data", order = 51)]
public class WordPronunciationData : ScriptableObject
{
[System.Serializable]
[IncludeInSettings(true)]
public class NeemUnitContainer {
public List<NeemUnit> NeemUnitContainers;
}
[System.Serializable]
[IncludeInSettings(true)]
public class Syllable {
public List<NeemUnitContainer> Syllables;
}
[System.Serializable]
[IncludeInSettings(true)]
public class NeemUnit {
[SerializeField]
public List<FlexNeem> individualNeem;
}
[System.Serializable]
[IncludeInSettings(true)]
public class FlexNeem{
[SerializeField]
public NeemData superNeem;
[SerializeField]
public FeemData Feem;
}
[System.Serializable]
[IncludeInSettings(true)]
public class CompleteWordList{
public List<Syllable> completeWord;
}
public List<CompleteWordList> allWords;
}
It's working great, and I can view and edit data in the Scriptable Objects perfectly.
But when I try to pull data from the Scriptable Object into Scene variables... I can't see them in the graph's Inspector.
However for the bottom node in my Scriptable Object... I defined the class as calling 2 other Scriptable Objects:
[System.Serializable]
[IncludeInSettings(true)]
public class FlexNeem{
[SerializeField]
public NeemData superNeem;
[SerializeField]
public FeemData Feem;
}
And when I create a variable and put data from these into them, they do show up very nicely in the Inspector.
But somehow when I make a container/wrapper class around this to make a List, and then put that data into a variable... it no longer shows up in a Inspector containing that variable.
This is making debugging much harder. I can only see how many items are in the list, not what the item is.
Is this just the nature of creating so many wrapper/container classes with lists? Is there a way I could view the wrapper/container classes in the Inspector, rather than just seeing "No Inspector For..."?
If anyone has tips or advice, I would greatly appreciate it! Thank you!!



.csfile for each class. In many cases custom structures require instanceID to be displayed in the inspector, so they require separate files. \$\endgroup\$