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 void OnAction() { if (_viewBuilder.actionButtonCallback != null) { try { _viewBuilder.actionButtonCallback(); if (_viewBuilder.closeAllSubViewOnAction) { LogConsole.CloseAllSubView(); } } catch (Exception e) { Debug.LogException(e); } } }
public void OnClosed() { LogConsole.CloseAllSubView(); }