/* * Called once everything in scene is loaded */ public void Start() { try { this._guiVisible = ( null != EditorLogic.fetch && (_config.allowCareerMode || !_config.allowCareerMode && HighLogic.fetch.currentGame.Mode != Game.Modes.CAREER) ); EditorLockManager.resetEditorLocks(); _editorFacility = EditorDriver.editorFacility; } catch (Exception e) { Log.ex(this, e); } finally { Log.dbgGui(this, "Start handled"); } }
/* * Free and clear the editor */ private void ClearEditor() { if (_config.clearEditor) { EditorLockManager.resetEditorLocks(); EditorPartList.Instance.Refresh(); if (_selectedPartbranch != null) { disablePartHighlight(_selectedPartbranch); EditorLogic.fetch.OnSubassemblyDialogDismiss(EditorLogic.RootPart); Debug.Log(string.Format("{0}{1} {2} - {3}", Constants.logPrefix, _config.clearEditor, _selectedPartbranch, EditorLogic.SelectedPart)); EditorLogic.DeletePart(EditorLogic.RootPart); _selectedPartbranch = null; } } }
/* * Free and clear the editor */ private void ClearEditor() { if (_config.clearEditor) { EditorLockManager.resetEditorLocks(); EditorPartList.Instance.Refresh(); if (_selectedPartbranch != null) { disablePartHighlight(_selectedPartbranch); EditorLogic.fetch.OnSubassemblyDialogDismiss(EditorLogic.RootPart); Log.dbg("{0} {1} - {2}", _config.clearEditor, _selectedPartbranch, EditorLogic.SelectedPart); EditorLogic.DeletePart(EditorLogic.RootPart); _selectedPartbranch = null; } } }
/* * Called once everything in scene is loaded */ public void Start() { initGUI(); EditorLockManager.resetEditorLocks(); _editorFacility = EditorDriver.editorFacility; }