Пример #1
0
        private void ReloadCanvas()
        {
            string path = canvasCache.nodeCanvas.savePath;

            if (!string.IsNullOrEmpty(path))
            {
                if (path.StartsWith("SCENE/"))
                {
                    canvasCache.LoadSceneNodeCanvas(path.Substring(6));
                }
                else
                {
                    canvasCache.LoadNodeCanvas(path);
                }
                ShowNotification(new GUIContent("Canvas Reloaded!"));
            }
            else
            {
                ShowNotification(new GUIContent("Cannot reload canvas as it has not been saved yet!"));
            }
        }
Пример #2
0
 private void AssureSetup()
 {
     if (canvasCache == null)
     {             // Create cache and load startup-canvas
         canvasCache = new NodeEditorUserCache();
         if (canvas != null)
         {
             canvasCache.SetCanvas(NodeEditorSaveManager.CreateWorkingCopy(canvas));
         }
         else if (!string.IsNullOrEmpty(loadSceneName))
         {
             canvasCache.LoadSceneNodeCanvas(loadSceneName);
         }
     }
     canvasCache.AssureCanvas();
     if (editorInterface == null)
     {             // Setup editor interface
         editorInterface             = new NodeEditorInterface();
         editorInterface.canvasCache = canvasCache;
     }
 }
Пример #3
0
 public void LoadSceneCanvasCallback(object canvas)
 {
     canvasCache.LoadSceneNodeCanvas((string)canvas);
 }
Пример #4
0
 private void LoadSceneCanvasCallback(object save)
 {
     cache.LoadSceneNodeCanvas((string)save);
 }