// Use this for initialization
        void OnEnable()
        {
            cachedInputBuilder = (InputBuilder)target;

            this.fileLocationProperty = this.serializedObject.FindProperty("definedPath");

            if (cachedInputBuilder.playerInputMappings == null)
            {
                cachedInputBuilder.playerInputMappings = new System.Collections.Generic.List <InputMapping>();
            }

            SetupAnimBools();
        }
        // Update is called once per frame
        public override void OnInspectorGUI()
        {
            cachedInputBuilder = (InputBuilder)target;
            serializedObject.Update();

            EditorGUILayout.PropertyField(this.fileLocationProperty, fileLocationGUIContent);

            EditorGUILayout.BeginHorizontal();
            // Adding
            if (GUILayout.Button("Add"))
            {
                AddInput();
            }

            inputCreationType = (InputDevice)EditorGUILayout.EnumPopup(inputCreationType);

            // Removing
            if (cachedInputBuilder.playerInputMappings.Count >= 1 && GUILayout.Button("Remove"))
            {
                RemoveInput();
            }
            EditorGUILayout.EndHorizontal();

            // Loop through for displaying
            for (int i = 0; i < cachedInputBuilder.playerInputMappings.Count; i++)
            {
                if (cachedInputBuilder.playerInputMappings[i] != null)
                {
                    PlayerSetup(nAnim[i, 0], "Player: " + (i + 1) + " " + cachedInputBuilder.playerInputMappings[i].type, i);
                }
            }

            EditorGUILayout.Separator();
            EditorGUILayout.LabelField("Number of Setup Inputs: " + cachedInputBuilder.playerInputMappings.Count);

            EditorGUILayout.Separator();

            if (GUI.changed)
            {
                serializedObject.ApplyModifiedProperties();

                for (int j = 0; j < cachedInputBuilder.playerInputMappings.Count; j++)
                {
                    EditorUtility.SetDirty(cachedInputBuilder.playerInputMappings[j]);
                }
            }

            //EditorGUILayout.Separator();
            //DrawDefaultInspector();
        }