Пример #1
0
        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();
                    }
                }
            }
        }
Пример #2
0
        public override void Execute()
        {
            // Lazy init, reduce pressure on launch
            if (_viewBuilder == null)
            {
                _viewBuilder = new SearchGameObjectViewBuilder();
            }

            info.shouldCloseAfterExecuted = false;
            LogConsole.PushSubView(_viewBuilder);
        }
Пример #3
0
        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);
        }