Inheritance: MonoBehaviour
Exemplo n.º 1
0
        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();
            }
        }
Exemplo n.º 2
0
        void DeleteAllKeys(GenericNodeView nodeView)
        {
            PlayerPrefs.DeleteAll();

            // Re-save command info
            foreach (var command in LogConsole.GetCommands())
            {
                command.SaveAllFieldInfos();
            }
            PlayerPrefs.Save();

            FetchData();
            DrawResults();
            Rebuild();
        }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
 public override void Execute()
 {
     this.info.shouldCloseAfterExecuted = false;
     LogConsole.PushSubView(_viewBuilder);
 }