예제 #1
0
        //------------------------------------------------------
        // 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();
        }
예제 #2
0
        //------------------------------------------------------
        // accessor
        //------------------------------------------------------

        public void Generate()
        {
            m_settings = SceneMenuSettings.Load();

            var code = GenerateCode();

            if (string.IsNullOrEmpty(code))
            {
                return;
            }

            if (!WriteCode(code))
            {
                return;
            }

            AssetDatabase.Refresh();
        }