Is it possible to display a List of GameObject List in a Custom Inspector?

Hi. I’m building on a Custom Editor, and got stuck at following List>() …
Is it Possible however to display the List in a Custom Inspector?


my Idea was the Code below… but what a surprise it doesn’t work…


Script:

List<List<GameObjects>> m_GameObjects;

	 void OnEnable(){
		 m_GameObjects = new List<List<GameObject>>();
	 }

Editor:

MyPersonalScript myTarget;
	SerializedProperty m_GameObjects;
     public void OnEnable()
	 {
		 myTarget = (MyPersonalScript)target;
		 m_GameObjects.serializedObject.FindProperty("m_GameObjects");
	 }
	 public override OnInspectorGUI(){
		 serializedObject.Update();
		 for(int i = 0; i< m_GameObjects.arraySize;i++){
			 SerializedProperty m_objects = m_GameObjects.GetArrayElementAtIndex(i);
			 EditorGUILayout.PropertyField(m_objects,true);
		 }
		 serializedObject.ApplyModifiedProperties();
	 }

I hope somebody could help me out here!
_
dan

hi,I don’t think so
Unity’s serialization system doesn’t do this , you can’t show list of list in inspector. You’ll need another type to wrap the array and create a list of that wrapper type instead.
you can put the inner list in a script or class.
[System.Serializable]
public struct GOArray
{

        public List<GameObject> gameObjects;
     
        // optionally some other fields
    }

then you have your list :

List<GOArray> list;