コード例 #1
0
        private void RenderCreateNewCategoryButton()
        {
            if (GUILayout.Button(GetContentForCreateNewCategoryButton(), GUILayout.Width(143.0f)))
            {
                PrefabCategoryDatabase prefabCategoryDatabase = PrefabCategoryDatabase.Get();
                UndoEx.RecordForToolAction(prefabCategoryDatabase);

                PrefabCategory newCategory = prefabCategoryDatabase.CreatePrefabCategory(ViewData.NameForNewPrefabCategory);
                prefabCategoryDatabase.SetActivePrefabCategory(newCategory);
            }
        }