Exemple #1
0
 /// <summary>
 /// Makes sure the current canvas is saved to the cache
 /// </summary>
 private void CheckCurrentCache()
 {
     if (!useCache)
     {
         return;
     }
     if (nodeCanvas.livesInScene)
     {
         if (!NodeEditorSaveManager.HasSceneSave("lastSession"))
         {
             SaveCache();
         }
     }
     else if (UnityEditor.AssetDatabase.LoadAssetAtPath <NodeCanvas> (lastSessionPath) == null)
     {
         SaveCache();
     }
 }
 private void CheckCurrentCache()
 {
     if (!useCache)
     {
         return;
     }
     if (nodeCanvas.livesInScene)
     {
         if (!NodeEditorSaveManager.HasSceneSave("lastSession"))
         {
             SaveCache();
         }
     }
     else if (UnityEditor.AssetDatabase.LoadAssetAtPath <NodeCanvas>(lastSessionPath) == null)
     {
         SaveCache();
     }
     //        if (!nodeCanvas.livesInScene && UnityEditor.AssetDatabase.GetAssetPath (nodeCanvas) != lastSessionPath)
     //throw new UnityException ("Cache system error: Current Canvas is not saved as the temporary cache!");
 }