//------------------------------------------------------ // unity system function //------------------------------------------------------ void OnEnable() { s_intance = this; // 表示状態で生成モード切替挟んだ時の対応 titleContent = new GUIContent("SceneMenu設定"); m_labelStyle = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Scene).FindStyle("Hi Label"); m_origin = SceneMenuSettings.Load(); Revert(); }
//------------------------------------------------------ // accessor //------------------------------------------------------ public void Generate() { m_settings = SceneMenuSettings.Load(); var code = GenerateCode(); if (string.IsNullOrEmpty(code)) { return; } if (!WriteCode(code)) { return; } AssetDatabase.Refresh(); }