Comments (2)
Have verified it, seems I have gotten something wrong while implementing undo (which also required a small change in how caching worked).
Working in a fix right now, sorry about that.
from node_editor_framework.
Ok so I found the main cause. To make clear what was happening and the new behaviour I have decided, I'll outline the problem here.
The problem occurs when you add nodes, and then load a new scene without clicking outside the window. Clicking outside the window before saving allows the node editor to add the new nodes to the cache. By skipping that, all changes you did since the last cache save are lost (after last time clicking away from the window or last automatic cache save).
This has been the case previously, as the cache itself was a working copy.
Now in the last update (undo), I added the separate, faster, not crash-resistant cache, which is essentially just a dump of the current ScriptableObjects into a file (this is the requirement of the Undo system). Again, they are not designed to be crash save, for that we still have the proper working copy cache in regular intervals. The problem is, if you add new nodes, but not let the cache system add them to the cache, it will create inconsistencies. The other nodes and canvas link to a node that only exist in memory until the next cache (click outside the window). If now a new scene loads, those inconsistencies will break the canvas.
I had intended for the lastSession (the proper, crash-save cache) to load if curSession (SO dump cache) has insonsistencies. For whatever reason I didn't fully implement that, so in those cases where the dump would break (cache, or interrupted without save - currently only switching scenes) it would try to load the broken canvas. Now I've added detection for that and delete the dump cache if it is found to be faulty, and a warning displayed.
Note that, even before last update (undo), this behaviour would just silently load the old lastSession and you would silently loose your work if you didn't give it a chance to save before switching scenes. Only now I even have a method to detect if work is lost, so I added the warning.
The amount of work we're talking about here is the work you've done after last clicking out of the window or the last auto-save (defined in NodeEditorUserCache.cacheIntervalSec, default 60 seconds).
Will update in a few minutes
from node_editor_framework.
Related Issues (20)
- GUIScaleUtility.cs Init Method NullReferenceException in Unity 2019.1.2f1 HOT 10
- Insane Bug from using RTEditorGUI.EnumPopup() HOT 3
- XML not saving node values HOT 10
- Is Project Active and Package Support? HOT 15
- `PlayModeStateChange' could not be found. Are you missing a using directive or an assembly reference? HOT 3
- [Solved] Context menu not showing up. HOT 2
- Multiple instances of node editors open at once HOT 1
- Toolbar is not showing up HOT 4
- All data is lost when I change the scene, even though I have extra saved as an asset file HOT 4
- How to input multiple outputs to a node? HOT 8
- Apple M1 computers not displaying Bezier curves HOT 3
- Added one node. Then it stoped working. (Remove the node, re-install, sitll not working) Unity 2020.2 LTS
- Implementation of a Logic Graph HOT 7
- XML import issue on UWP
- I deleted the ScriptableObjects in Assets/DefaultEditorResources/Node_Editor_Framework HOT 3
- Making children of node drag along with parent HOT 5
- Functional Nodes that are not tied to the Node Editor Window HOT 6
- Loading canvas based on Selection.activeTransform? HOT 4
- seems undo pro doesnt work with unity 2022.2.8 not sure what version it stopped working at HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node_editor_framework.