void OnSelectGameObject(GenericNodeView nodeView) { // Magic here, need to cast data to GameObject before checking null, otherwise it won't work GameObject selectGO = (GameObject)nodeView.data; if (selectGO != null) { _detailViewBuilder.SetGameObject(selectGO); LogConsole.PushSubView(_detailViewBuilder); } else { // Check if all game object inside result is destroyed foreach (GenericNodeView node in GetAllChildrenOfNode(_resultNode)) { GameObject go = (GameObject)node.data; if (go == null) { node.overrideDisplayText = "<s>" + node.overrideDisplayText; } } RefreshUI(); } }
void DeleteAllKeys(GenericNodeView nodeView) { PlayerPrefs.DeleteAll(); // Re-save command info foreach (var command in LogConsole.GetCommands()) { command.SaveAllFieldInfos(); } PlayerPrefs.Save(); FetchData(); DrawResults(); Rebuild(); }
void InspectFile(GenericNodeView nodeView) { try { FileInfo fileInfo = (FileInfo)nodeView.data; if (fileInfo.Extension == ".png" || fileInfo.Extension == ".jpg") { _imageInspectorViewBuilder.SetContent(fileInfo); LogConsole.PushSubView(_imageInspectorViewBuilder); } else { _textInspectorViewBuilder.SetContent(fileInfo); LogConsole.PushSubView(_textInspectorViewBuilder); } } catch (Exception e) { Debug.LogError(e.Message); } }
public override void Execute() { this.info.shouldCloseAfterExecuted = false; LogConsole.PushSubView(_viewBuilder); }