private void OnDestroy() { if (_modulesLibrary != null) { _modulesLibrary.Dispose(); _modulesLibrary = null; } }
private void OnEnable() { if (_modulesLibrary == null) { _modulesLibrary = new ModulesLibrary(GetNativeModulesDefine()); } else { _modulesLibrary.RefreshState(); } CurrentModule = null; _currentEditModule = null; _isCreateModule = false; _isEditModule = false; _inputModuleLocalPath = ""; _inputModuleRemotePath = ""; _gitBash = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/HTModuleManager/Editor/Texture/GitBash.png"); _github = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/HTModuleManager/Editor/Texture/Github.png"); _gitee = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/HTModuleManager/Editor/Texture/Gitee.png"); _moduleGC = new GUIContent(); _moduleGC.image = EditorGUIUtility.IconContent("Folder Icon").image; _downloadedGC = new GUIContent(); _downloadedGC.image = EditorGUIUtility.IconContent("TestPassed").image; _noDownloadedGC = new GUIContent(); _noDownloadedGC.image = EditorGUIUtility.IconContent("TestFailed").image; _gitBashGC = new GUIContent(); _gitBashGC.image = _gitBash; _gitBashGC.text = "Git Bash Here"; _githubGC = new GUIContent(); _githubGC.image = _github; _giteeGC = new GUIContent(); _giteeGC.image = _gitee; _networkGC = new GUIContent(); _networkGC.image = EditorGUIUtility.IconContent("BuildSettings.Web.Small").image; _helpGC = new GUIContent(); _helpGC.image = EditorGUIUtility.IconContent("_Help").image; _helpGC.tooltip = "Help"; }