Exemple #1
0
        private void OnEnable()
        {
            _setting             = target as ToLuaSetting;
            textAreaOpenFlagDict = new Dictionary <string, bool>();

            _fieldInfos = typeof(ToLuaSetting).GetFields();
        }
        void Init()
        {
            if (!File.Exists(SettingPath))
            {
                EditorUtils.CreateAsset <ToLuaSetting>(SettingPath);
            }
            settings = AssetDatabase.LoadAssetAtPath <ToLuaSetting>(SettingPath);
            ToLuaGenerater._setting = settings;

            ViewConfigPath      = settings.ViewConfigPath;
            ModulesDir          = settings.ModulesDir;
            PrefabsRootDir      = settings.PrefabsRootDir;
            MediatorContextPath = settings.MediatorContextPath;
            ModelContextPath    = settings.ModelContextPath;
            ServiceContextPath  = settings.ServiceContextPath;

            luaTable       = LoadLuaTable(ViewConfigPath);
            minSize        = new Vector2(500, 500);
            endButtonWidth = GUILayout.Width(position.width * 0.2f);
            disable        = new GUIStyle();
            disable.active = new GUIStyleState();
            LoadAllModules();
        }