Posts: 43
Threads: 15
Joined: Apr 2023
05-17-2023, 04:03 PM
(This post was last modified: 05-17-2023, 05:49 PM by Lupos.)
I found that the curvy generator seems to reset and redo its initialization OnDisable / OnEnable.
This is an issue because even if I were to deactivate my spline object, I don't want the pooled instantiated prefabs to be rebuilt. Is there a way or option around this?
Edit* I also found that if the control points are less then 2, it seems to rebuild all the prefabs.
Is there a way to have all built pooled prefabs be kept initialized regardless of if the spline was enabled/disabled or the points are below 2?
Edit** I see that the CreateGameObject module deletes any pools not used. It'd be nice if this could be modified to be toggled off
Posts: 2,124
Threads: 93
Joined: Jun 2017
Hi
If you need to keep the generated objects while the generator is disabled, then you should probably use the SaveToScene method:
https://api.curvyeditor.com/FluffyUnderw...Transform_
It's the API method equivalent to the button on the toolbar saving resources to scene
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 2,124
Threads: 93
Joined: Jun 2017
Check the other post first, I attached some example that i believe will be helfpful.
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 43
Threads: 15
Joined: Apr 2023
(05-18-2023, 05:04 PM)_Aka_ Wrote: If you need to keep the generated objects while the generator is disabled, then you should probably use the SaveToScene method:
Isn't this a more expensive method meant to be called just once? I need to make sure that any of the assets I generate are saved when I place the spline. However If I were to move/edit the existing spline, I'd still like to update and re-generate while having all the prefabs already setup.
This is because this level editor isn't meant to save the level, its a tower defense game and the components of the spline just needs to be allowed to initialize and function.
Posts: 2,124
Threads: 93
Joined: Jun 2017
(05-19-2023, 01:19 PM)Lupos Wrote: Isn't this a more expensive method meant to be called just once?
It should not be more expensive than updating the generator to create the same objects.
(05-19-2023, 01:19 PM)Lupos Wrote: I'd still like to update and re-generate while having all the prefabs already setup.
I believe this answers it:
https://forum.curvyeditor.com/thread-174...ml#pid5820
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.