示例#1
0
        protected override void OnWindowGUI()
        {
            StratusEditorGUI.BeginAligned(TextAlignment.Center);
            this.mode = (Mode)GUILayout.Toolbar((int)this.mode, this.toolbarOptions, GUILayout.ExpandWidth(false));
            StratusEditorGUI.EndAligned();

            GUILayout.Space(padding);
            switch (this.mode)
            {
            case Mode.Editor:
                this.DrawEditor();
                break;

            case Mode.Debugger:
                this.DrawDebugger();
                break;
            }
        }
示例#2
0
        private void DrawBlackboard(Rect rect)
        {
            GUILayout.BeginArea(rect);
            GUILayout.Label("Blackboard", StratusGUIStyles.header);
            {
                // Set the blackboard
                SerializedProperty blackboardProperty = this.behaviorTreeProperties.GetProperty(nameof(BehaviorTree.blackboard));
                bool changed = this.InspectProperty(blackboardProperty, "Asset");
                if (changed && this.blackboard != null)
                {
                    this.OnBlackboardSet();
                }

                EditorGUILayout.Space();

                // Draw the blackboard
                if (this.blackboardEditor != null)
                {
                    // Controls
                    StratusEditorGUI.BeginAligned(TextAlignment.Center);
                    StratusEditorGUI.EnumToolbar(ref this.scope);
                    StratusEditorGUI.EndAligned();

                    this.blackboardScrollPosition = EditorGUILayout.BeginScrollView(this.blackboardScrollPosition, GUI.skin.box);
                    switch (this.scope)
                    {
                    case StratusBlackboard.Scope.Local:
                        this.blackboardEditor.DrawSerializedProperty(nameof(StratusBlackboard.locals));
                        break;

                    case StratusBlackboard.Scope.Global:
                        this.blackboardEditor.DrawSerializedProperty(nameof(StratusBlackboard.globals));
                        break;
                    }
                    EditorGUILayout.EndScrollView();
                }
            }
            GUILayout.EndArea();
        }
示例#3
0
 protected override void OnDrawEditorGUILayout(Symbol.Reference value)
 {
     StratusEditorGUI.DrawGUILayout("Key", ref value.key);
 }
示例#4
0
 protected override void OnDrawEditorGUI(Rect position, Symbol.Reference value)
 {
     //EditorGUI.LabelField(position, value.key);
     StratusEditorGUI.DrawGUI(position, "Key", ref value.key);
 }