I have a class defined inside a component. It’s more or less just a struct of raw data:, i.e.
[ExecuteInEditMode]
class ListOfData : MonoBehavior
{
public class DataElement
{
public float stuff;
public GameObject thing;
//etc.
}
List<DataElement> mListOfDatas;
void Update()
{
if (!Application.isPlaying)
{
mListOfDatas = mListOfDatas ?? new List<DataElement>();
}
}
}
I also have an editor script, changing the contents of mListOfDatas. Unfortunately, this data is not showing up in the component UI, and i’m guessing that only stuff shown in the UI will actually save. Is this the case, and is there a way to force this data to save to the prefab, or force it to display?
I think I’m getting to the limits of the prefab system, here.