Posts: 15
Threads: 3
Joined: Jan 2021
05-27-2024, 02:51 PM
(This post was last modified: 05-27-2024, 03:38 PM by nehvaleem.)
Hi there,
I think that there might be something weird going on when having a multiple scenes layout.
I have something like this:
- Systems (Unity Scene)
- Environment (Unity Scene)
-- Curvy Global
- Gameplay (Unity Scene)
-- Spline with connections
It works correctly during edit time, but during the playmode the connections seem to be missing (and they are restored after going back to the edit mode).
Is there something inherently wrong with my setup?
EDIT:
I've found that:
https://curvyeditor.com/documentation/co...urvyglobal and it explains things a bit, but it is super inconvenient for me atm. Is there a way to have multiple Curvy Global (one per unity scene) and merge them during the runtime?
Posts: 15
Threads: 3
Joined: Jan 2021
Update:
After looking at the source code I can see a big issue for me. The way how CurvyGlobalManager works currently isn't something that will be ok for me.
I noticed the comment:
//TODO split this class in two, one containing monobehaviours, that should inherit from dtsingleton, the other containing non monobehaviours, that would use a regular singleton (CurvyProject?). The goal is to avoid instantiating CurvyGlobalManager (which in expensive, see DTSingleton.Instance) when not needed
Which lets me thinking that you might be onto something similar as I am. Is there any eta or progress going on with it?
On the other hand - I think there should be a possibility to keep one CurvyGlobalManager per scene (and accessing it with scene reference). Is it something that could be done easily?
Posts: 2,146
Threads: 95
Joined: Jun 2017
Hi,
In this setup, I did not have the issue you have. Does it work for you?
- Systems (Unity Scene)
- Environment (Unity Scene)
-- Curvy Global
- Gameplay (Unity Scene)
-- Splines
-- Curvy Global with connections
FYI, when opening multiple scenes with Curvy Global objects, they get merged, and all the connections are considered.
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 15
Threads: 3
Joined: Jan 2021
Thats the issue, in my case the level is constructed from multiple (additive loaded) scenes. I noticed that the global manager is getting created in the first loaded scene where there is a curvy spline present. I really don't see any benefit of having a global manager just to store connections.
I'll try to prepare some sort of repro project to illustrate my workflow.
Posts: 2,146
Threads: 95
Joined: Jun 2017
(05-28-2024, 01:11 PM)nehvaleem Wrote: I really don't see any benefit of having a global manager just to store connections.
The global manager stores other things too (mainly pooling related data/objects). The connections being stored there was not a good decision. At that time less than now, since additive scene loading was not a thing in Unity.
Changing how connections work brings benefits, but two main downsides:
- It will probably break old projects.
- It will take a considerable amount of time to implement.
For now, I see that the benefits do not outweigh the downsides yet. As long as I can find workarounds, I prefer to not rebuild the connections system.
If I can't find a workaround for your repro case, this will be a strong argument in favor of rebuilding the connections system.
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.