public void DrawWidget(KernelExplorer explorer)
        {
            explorer.Executor = null;
            explorer.Kernel   = null;

            var selection = Selection.activeGameObject;

            if (!selection)
            {
                _drawSelectFirst.DrawWidget(explorer);
                return;
            }

            explorer.Executor = selection.GetComponent <RentitasExecutor>();
            if (explorer.Executor)
            {
                _drawExecutor.DrawWidget(explorer);
                return;
            }

            explorer.Kernel = selection.GetComponent <KernelBehaviour>();
            if (explorer.Kernel)
            {
                _drawKernel.DrawWidget(explorer);
                return;
            }
        }
Beispiel #2
0
        void OnGUI()
        {
            if (_widget == null)
            {
                SetupWidgets();
                return;
            }

            _widget.DrawWidget(this);
            Repaint();
        }
Beispiel #3
0
        public void DrawWidget(KernelExplorer explorer)
        {
            GUILayout.BeginHorizontal(GUI.skin.button);
            {
                GUILayout.Label("Kernel Explorer");
                if (GUILayout.Button("Test", GUILayout.Width(35)))
                {
                    Debug.Log("Test");
                }
            }
            GUILayout.EndHorizontal();

            _targetSelect.DrawWidget(explorer);
        }