Example #1
0
        // -------------------------------------------------------------------------------
        // OnInspectorGUI
        // -------------------------------------------------------------------------------
        public override void OnInspectorGUI()
        {
            SpawnablePrefabsTemplate template = (SpawnablePrefabsTemplate)target;

            GUILayout.BeginVertical();
            {
                GUILayout.BeginVertical("box");
                {
                    GUI.backgroundColor = Color.green;
                    if (GUILayout.Button("FETCH PREFABS", GUILayout.Height(35)))//, GUILayout.Width(100)))
                    {
                        template.AutoRegisterSpawnablePrefabs();
                    }
                    GUI.backgroundColor = Color.white;
                }
                GUILayout.EndVertical();

                GUILayout.BeginVertical("box");
                {
                    DrawDefaultInspector();
                }
                GUILayout.EndVertical();
            }
            GUILayout.EndVertical();
        }
        // -------------------------------------------------------------------------------
        // OnInspectorGUI
        // -------------------------------------------------------------------------------
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            SpawnablePrefabsTemplate template = (SpawnablePrefabsTemplate)target;

            if (GUILayout.Button("Search & add Prefabs"))
            {
                template.AutoRegisterSpawnablePrefabs();
            }
        }