Seneral / Node_Editor_Framework

A flexible and modular Node Editor Framework for creating node based displays and editors in Unity
https://nodeeditor.seneral.dev
MIT License
2.01k stars 414 forks source link

All data is lost when I change the scene, even though I have extra saved as an asset file #192

Open AtheosCode opened 4 years ago

Seneral commented 4 years ago

What do you mean data lost? Could you elaborate? The canvas should be preserved, even if you do not explicitly save it. If it does not, it is either a bug or you saved it in the scene, in which case it will not attempt to keep it open. I just tested in 2019.3 that it works, what Unity version are you using?

AtheosCode commented 4 years ago

I edit canvas in Init scene, save it as an asset file, close NodeEditor,I observe the data in inspector,it's right, but switch to other sence. The saved asset file is empty data, Unity2018.4.24f1 install NodeEditor and UndoPro with unitypackage

Seneral commented 4 years ago

So to clarify:

  1. You did not save the canvas in the scene explicitly, you just had the scene open while editing, before saving it as an asset
  2. The data you observe in the inspector is the node canvas UI with title, nodes, etc, after you select the saved asset file (?)
  3. Upon changing scene, clicking on that same asset file again yields what? Node Canvas UI with no nodes?
  4. Now after reopening the window what does it say when you try to open that saved asset file?

When switching scene it will of course unselect the canvas you had selected, resulting in a blank inspector window, so make sure you still have the canvas selected, just in case.

AtheosCode commented 4 years ago

Now the replication step is, at run time, I load the asset for parsing, then switch scenes, and the saved asset is lost, Here is a GIF that emulates the scene switch at run time GIF 2020-8-12 9-57-41