title: How to create a custom inspector showing a list of lists in Unity?
body: <p>well, I'm working on a specific part of a game in which I need to create a list of lists, a list of Game levels and in each list node a list of triggers (The level lists and each list inside it are variable in size).
  This is all in the script <code>LevelController.cs</code>.
  This is the Trigger class (it's simple like this for now)</p>
  
  <pre><code>[System.Serializable]
  public class TriggerClass
  {
  
      public GameObject Trigger;
      public bool Active;
      public int Type;
  
      public TriggerClass(GameObject obje, bool active = false, int type = 1)
      {
          Trigger = obje;
          Active = active;
          Type = type;
      }
  
  }
  </code></pre>
  
  <p>And a wrapper class to create the Levels List</p>
  
  <pre><code>[System.Serializable]
  public class WrapperClass
  {
      public List&lt;TriggerClass&gt; Triggers = new List&lt;TriggerClass&gt;();
  }
  </code></pre>
  
  <p>And of course </p>
  
  <pre><code>public List&lt;WrapperClass&gt; Levels = new List&lt;WrapperClass&gt;();
  </code></pre>
  
  <p>I serialized both and they show ok in standard Inspector draw in Unity, but I need to customize the Inspector showing this list, so I made a <code>InspectorCustomizer.cs</code> and a <code>EditorList.cs</code> in Editor folder.
  For now I'm just trying to simulate the default draw that Unity does with the lists (an expand arrow, a size field that creates that amount of list nodes, and in each node the same thing, as I said, the default that happens if you uncomment the DrawDefaultInspector and comment the other 3 lines in InspectorCustomizer.cs)</p>
  
  <p>The InspectorCustomizer:</p>
  
  <pre><code>[CustomEditor(typeof(LevelController))]
  
  public class InspectorCustomizer : Editor
  {
  
      public override void OnInspectorGUI()   
      {
          //DrawDefaultInspector();
  
          serializedObject.Update();
          EditorList.Show(serializedObject.FindProperty("Levels"));
          serializedObject.ApplyModifiedProperties();
      }
  }
  </code></pre>
  
  <p>And here the <code>EditorList.cs</code>:</p>
  
  <pre><code>public static class EditorList
  {
      public static void Show (SerializedProperty list)
      {
          EditorGUILayout.PropertyField(list);
          EditorGUI.indentLevel += 1;
          if (list.isExpanded)
          {
              EditorGUILayout.PropertyField(list.FindPropertyRelative("Array.size"));
              for (int i = 0; i &lt; list.arraySize; i++)
              {
                  EditorGUILayout.PropertyField(list.GetArrayElementAtIndex(i));
  
              }
          }
          EditorGUI.indentLevel -= 1;
      }
  }
  </code></pre>
  
  <p>But this just shows the "Levels" list with empty elements, I click in the expande arrow in each element and nothing shows up, I know this happens because the script is iterating only through the Levels list and not each element within, but I don't know how to iterate through every element inside the Levels list to show the same thing.
  I'm not really used to serialization so forgive me if this sounds easy.</p>
  
  <p>I cannot do <code>EditorList.Show(list[i]);</code> inside the for loop because it cannot apply indexing to a serializedProperty of course, so how do I procced?</p>