Example #1
0
        // TODO Doesnt work atm :))
        private void GenerateMiniMap()
        {
            MiniMap minimap = new MiniMap {
                anchored = true
            };
            Vector2 coords = _graphView.contentViewContainer.WorldToLocal(new Vector2(this.maxSize.x - 10, 30));

            minimap.SetPosition(new Rect(coords.x, coords.y, 200, 140));
            _graphView.Add(minimap);
        }
Example #2
0
        // Link nodes visually in graph based on save data
        private void LinkNodes(Port output, Port input)
        {
            Edge edge = new Edge
            {
                output = output,
                input  = input
            };

            edge?.input.Connect(edge);
            edge?.output.Connect(edge);

            _targetGraphView.Add(edge);
        }