Unity editor script wont work with mono

Hey guys, I am trying to make a nice UI for our tester to go into Unity and allow them to adjust variables as they test. I am trying to make a quick and simple inspector GUI for them to use to add and delete stuff in List. So far I can’t figure out how to get the inspector editor to work with the editor or if this is even possible. Basically I have a button that allows the tester to add an object such as an enemy then they set how many we are going to need. When I try and add to the list, I get a object ref not set to an instance error. Is there anything I can do to fix this?

public class PoolEditor : Editor
{
    public override void OnInspectorGUI()
    {
        PoolManager t = (PoolManager)target;

        DrawDefaultInspector();

        if (GUILayout.Button("Add Object"))
        {
            PoolManager.instance.Objects.Add(null);
            PoolManager.instance.ObjectToSpawnNumbers.Add(0);
        }

        for (int i = 0; i < PoolManager.instance.Objects.Count; i++)
        {
            PoolManager.instance.Objects[i] = EditorGUILayout.ObjectField("Object" + i + ": ", PoolManager.instance.Objects[i], typeof(GameObject)) as GameObject;
            PoolManager.instance.ObjectToSpawnNumbers[i] = EditorGUILayout.IntField("Amount: ", PoolManager.instance.ObjectToSpawnNumbers[i]);

            if (GUILayout.Button("Remove Object"))
            {
                PoolManager.instance.Objects.RemoveAt(i);
                PoolManager.instance.Objects.RemoveAt(i);
            }
        }
    }
}

Solved: I figured it out. Apparently you can’t add/remove data that is private even if you have getter/setter function and you need to make it public and you can use the HideInspector property to hide it. Also you have to change PoolManager.instance to just t, t is what I called my target. Here is the code in case anyone else runs into this issue.

using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;

[CustomEditor(typeof(PoolManager))]
public class PoolEditor : Editor
{
    public override void OnInspectorGUI()
    {
        PoolManager t = (PoolManager)target;

        DrawDefaultInspector();

        if (GUILayout.Button("Add Object"))
        {
            t.Objects.Add(null); 
            t.ObjectToSpawnNumbers.Add(0);
        }

        for (int i = 0; i < t.Objects.Count; i++)
        {
            t.Objects[i] = EditorGUILayout.ObjectField("Index " + i + ": ", t.Objects[i], typeof(GameObject)) as GameObject;
            t.ObjectToSpawnNumbers[i] = EditorGUILayout.IntField("Amount: ", t.ObjectToSpawnNumbers[i]);

            if (GUILayout.Button("Remove Object"))
            {
                t.Objects.RemoveAt(i);
                t.ObjectToSpawnNumbers.RemoveAt(i);
            }
        }

        if (GUI.changed)
        {
            EditorUtility.SetDirty(t);
        }
    }
}