For some reason the list I am attempting to use Is not appearing in the inspector, I have restarted unity several times and that doesn’t seem to work.
Have i done something wrong in the initialisation of the list/array?



For some reason the list I am attempting to use Is not appearing in the inspector, I have restarted unity several times and that doesn’t seem to work.
Have i done something wrong in the initialisation of the list/array?



Unity’s serialization system doesn’t like that. You’ll need another type to wrap the array and create a list of that wrapper type instead.
I am unsure as how to do this, can you link me to something or provide an example please?
Either a class or a struct:
[System.Serializable]
public class GOArray
{
[SerializeField]
private GameObject[] _gameObjects;
// optionally some other fields
}
Then, just use it like
[SerializeField]
private GOArray[] _array;
[SerializeField]
private List<GOArray> _list;
Ah ok, Thank you ![]()