07-26-2024, 02:33 AM
(07-23-2024, 02:23 PM)_Aka_ Wrote: Hi
(07-22-2024, 02:28 PM)merobbins5 Wrote: When I create a new Rail like this, the first problem I see is that a ton of additional meshes are created unnecessarily (you can see the bottom left in the hierarchy. I'm not sure why or where Curvy is generating them. Do you have any idea how I could fix this?
I am not sure about what is happening there, but I "feel" it is triggered by nesting generators. Let's put this aside for a moment, solve the other problem, and then come back to it if still unsolved.
(07-22-2024, 02:28 PM)merobbins5 Wrote: What is the best practice for handling storing a curvy spline intended for procedural generation use as a prefab?
I would recommend to do the following:
- Add to the scene the generator A that generates the rail support gameobjects.
- Those game objects should contain only the rail support mesh and their associated spline to be modified, no other generators.
- Have a script on a separate GO that will be triggered at each generator A's refresh, and will generate and/or update a multitude of generators B, one for each support spline.
- I suggest, to avoid complications with prefabs, to use Templates to store your generator B and load it. You can load templates at runtime using CGEditorUtility.LoadTemplate
More about templates: https://curvyeditor.com/documentation/ge.../templates
I hope this helped.
I didn't realize templates could be instantiated at runtime. Thank you for the reply I will give that a try!