public override void OnInspectorGUI()
    {
        #region Gizmo Options
        if (GUILayout.Button(showingGizmoOptions ? "Hide Gizmo Options" : "Show Gizmo Options"))
        {
            showingGizmoOptions = !showingGizmoOptions;
            if (showingGizmoOptions)
            {
                nodeSize = NeuralNetwork.Editor.nodeSize;
                nSpace   = nodeSpacing;
                lSpace   = layerSpacing;
                color    = nodeColor;
                gradient = axonGradient;
            }
        }
        if (showingGizmoOptions)
        {
            EditorGUI.indentLevel = 1;
            color    = EditorGUILayout.ColorField("Node Color", color);
            gradient = EditorGUILayout.GradientField("Relation Gradient", gradient);
            nodeSize = EditorGUILayout.FloatField("Node Size", nodeSize);
            nSpace   = EditorGUILayout.FloatField("Node Spacing", nSpace);
            lSpace   = EditorGUILayout.FloatField("Layer Spacing", lSpace);
            if (GUILayout.Button("Reset"))
            {
                ApplyGizmoSettings(Color.cyan, GetDefaultGradient(), 1.0f, 5.0f, 5.0f);
            }
            if (GUILayout.Button("Apply"))
            {
                ApplyGizmoSettings(color, gradient, nodeSize, nSpace, lSpace);
            }

            EditorGUI.indentLevel = 0;
        }
        #endregion

        GUILayout.Space(15);

        #region I/O Nodes
        int  prevVal   = 0;
        bool nodeAdded = false;

        var editorProp = serializedObject.FindProperty("editorUtil");
        var layersProp = editorProp.FindPropertyRelative("nodeHeights");

        modifiedLayers.Clear();
        nodeAdded |= NodeLayerMod(layersProp.GetArrayElementAtIndex(0), 0, "Num Input Nodes");
        nodeAdded |= NodeLayerMod(layersProp.GetArrayElementAtIndex(layersProp.arraySize - 1), layersProp.arraySize - 1, "Num Output Nodes");
        #endregion

        GUILayout.Space(5);

        #region Hidden Layers
        int  layerRem = -1;
        bool layerAdd = false;

        EditorGUI.indentLevel = 1;
        if (GUILayout.Button("Add Hidden Layer"))
        {
            layerAdd = true;
            int v = layersProp.GetArrayElementAtIndex(layersProp.arraySize - 2).intValue;
            layersProp.InsertArrayElementAtIndex(layersProp.arraySize - 1);
            layersProp.GetArrayElementAtIndex(layersProp.arraySize - 2).intValue = v;
        }

        for (int i = 1; i < layersProp.arraySize - 1; ++i)
        {
            var indexProp = layersProp.GetArrayElementAtIndex(i);
            nodeAdded |= NodeLayerMod(indexProp, i, $"Hidden Layer {i.ToString()} Nodes", out bool remove);
            if (remove)
            {
                layerRem = i;
                layersProp.DeleteArrayElementAtIndex(i--);
            }
        }
        EditorGUI.indentLevel = 0;

        #endregion

        GUILayout.Space(15);

        serializedObject.ApplyModifiedProperties();

        if (nodeAdded)
        {
            Debug.Log("Refreshing gizmo data");

            foreach (var v2i in modifiedLayers)
            {
                if (v2i.y < 0)
                {
                    nn.RemoveNodeFromLayer(v2i.x);
                }
                else
                {
                    nn.AddNodeToLayer(v2i.x, false);
                }
            }

            CacheGizmoDrawData(nn);
            EditorUtility.SetDirty(nn);
        }

        if (layerAdd)
        {
            var p = layersProp.GetArrayElementAtIndex(layersProp.arraySize - 2);
            nn.AddLayer(layersProp.arraySize - 2, p.intValue, false, false);
            CacheGizmoDrawData(nn);
            nn.RefreshConnections();
            EditorUtility.SetDirty(nn);
        }
        if (layerRem > -1)
        {
            nn.RemoveLayer(layerRem, false);
            CacheGizmoDrawData(nn);
            nn.RefreshConnections();
            EditorUtility.SetDirty(nn);
        }

        if (GUILayout.Button("Rebuild Network"))
        {
            ApplyNetworkChanges();
            EditorUtility.SetDirty(nn);
        }
        if (GUILayout.Button("Reroll Connections"))
        {
            nn.ConnectNetworkFresh();
            EditorUtility.SetDirty(nn);
        }
        GUILayout.Space(5);
        if (GUILayout.Button("Refresh Connections"))
        {
            nn.RefreshConnections();
            EditorUtility.SetDirty(nn);
        }
    }