Ejemplo n.º 1
0
        public static void SetGraphAsset(GraphAsset asset)
        {
            if (Resources.FindObjectsOfTypeAll <GraphEditorWindow>()[0])
            {
                editor = Resources.FindObjectsOfTypeAll <GraphEditorWindow>()[0];
            }
            else
            {
                editor = Init();
            }
            if (asset != GraphEditor.asset)
            {
                GraphEditor.ClearSelection();
            }
            if (GraphEditor.asset)
            {
                GraphEditor.asset.position = GraphEditor.scroll;
                GraphEditor.asset.SaveData();
            }

            if (asset)
            {
                asset.Validate();
                GraphEditor.scroll = asset.position;
            }

            GraphEditor.asset = asset;
            SetGraph(asset ? asset.graph : null);
        }
Ejemplo n.º 2
0
 private void ClearSelection()
 {
     GraphEditor.ClearSelection();
 }