Beispiel #1
0
        public void Init(EditorWindow window, BehaviourGraphView graphView)
        {
            _window    = window;
            _graphView = graphView;

            _indentationIcon = new Texture2D(1, 1);
            _indentationIcon.SetPixel(0, 0, new Color(0, 0, 0, 0));
            _indentationIcon.Apply();
        }
        private void OnEnable()
        {
            _graphView = new BehaviourGraphView(this, _graph)
            {
                name = "Behaviour Graph"
            };

            var blackboard = new Blackboard(_graphView)
            {
                subTitle = "Variables"
            };

            _graphView.Blackboard = blackboard;

            blackboard.addItemRequested  = AddItemRequested;
            blackboard.editTextRequested = EditTextRequested;

            _graphView.Add(blackboard);

            _graphView.StretchToParentSize();
            rootVisualElement.Add(_graphView);

            _graphView.Load(_graph);
        }