void OnCommandSelected(GenericNodeView nodeView) { Command command = _commands.Find(c => c.info.name == nodeView.name); if (command != null) { if (command.info.IsComplex()) { if (!_commandDetailViewBuilders.ContainsKey(command)) { _commandDetailViewBuilders[command] = new CommandDetailViewBuilder(command); } LogConsole.PushSubView(_commandDetailViewBuilders[command]); } else { try { command.Execute(); } catch (Exception e) { Debug.LogException(e); } if (command.info.shouldCloseAfterExecuted) { LogConsole.CloseAllSubView(); } } } }
public override void Execute() { // Lazy init, reduce pressure on launch if (_viewBuilder == null) { _viewBuilder = new SearchGameObjectViewBuilder(); } info.shouldCloseAfterExecuted = false; LogConsole.PushSubView(_viewBuilder); }
public void ScrollCellSelected(int cellIndex) { if (cellIndex < 0 || cellIndex >= _filterLogInfos.Count) { throw new Exception("Cell index is out of range: " + cellIndex); } LogInfo logInfo = _filterLogInfos[cellIndex]; _logDetailViewBuilder.SetLogInfo(logInfo, LogTypeToIconName(logInfo.type)); LogConsole.PushSubView(_logDetailViewBuilder); }