Comments (1)
Theoretically if they are different windows that properly use different cache paths (e.g. two different tools), then already yes. However the default window currently does not support that.
It also depends on what you expect it to do. Do you want it to be tabs in a single window, so that when you close the window and reopen it, all tabs reopen as well? Or just multiple window instances each with their own single canvas? Then what happens if you close one of these instances (or unity crashes) - do you expect to be able to reopen these canvases, just as you would when you have only one window? Unlikely, since the system would have no way to know which previously closed canvases you expect to work on again, and you can't store them infinitely, so likely you'd have to give up on that functionality, at least partially.
So I see two options: A tabbed window (with correspondingly a lot of effort to adjust the UI) that behaves as you would expect it to, or multiple windows, but only the last window to close actually stores the working canvas so you can reopen it.
For option 1 (tabbed canvas):
Give each tab an own NodeCanvasUserCache with unique but deterministic cache path (e.g. _1, _2, ... postfix). Then on window open, check the cache paths and reopen all tabs.
Then of course create the tabbing UI. Since I expect you want multiple views at the same time, also add split view support. Technically no problem, the backend should support all that, but that is quite some extra effort designing the UI...
For option 2 (multiple instances):
- Allow multiple windows unity-side, and on creation find all open instances, and assign a unoccupied ID to the new window. If there is a cache file without an assigned open instance, assume the editor crashed or something and you're reopening the instances one by one, and use that cache's ID. This also covers the case of reopening the canvas the last window had open.
- Use the cache path with your ID as suffix, so you have several cache files (last+cur Session) with unique suffixes.
- On window close, if you are NOT the last window to close, delete your cache file, thus always leaving exactly one cache file (or if the editor crashed, all cache files) for the next opened instance to reopen.
Note that the cache files are still required to exist for the other instances, especially the curSession, since that is required for the Undo to survive playmode changes, scene changes and script recompiles.
So yeah, there's no one good solution I'd be happy going with. If you want to implement either, these should be the steps required for it. I'd be happy to help you with it, but currently I do not have the time to do such an endeavor, sorry.
from node_editor_framework.
Related Issues (20)
- The connections will miss when I add a new node. HOT 2
- 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
- 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.