Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move the Create Mesh of a CurvyGenerator Out of the Main Parent
Hello it's me again Smile

I have 2 little question:

1) About the CurvyGenerator, I would like to Move the CreateMesh Outside de main parent, and keep the link wiht the Curvy Generator:
[Image: IGijBnNXnEa_Capture.PNG]
Then, put the Tag [EditorOnly] on the CurvyGenerator Object, for saving performance in build (in the build, I want only the mesh)

But when I do, in the CurvyGenerator Graph editor it is no longer present:
[Image: IGijDMmqzNa_Capture2.PNG]

And when I try to relink it again, it does'nt work...
From the inspector in the field VolumeMesh>Slots>VMesh, it say in the console 
"[Curvy] Linking modules from the inspector isn't supported yet! Use the Graph editor instead!"

and from the graph, I just can't add it any more. 

EDIT: For relinking it I have to: close the graph editor, then move the Create Mesh as child of the CurvyGenerator, and then open the graph again to relink it. So it seems to keep the link the first time I move CreateMesh from outside, but as soon as I open the graphEditor, I have to manyally do this trick

2) A realy quick question about the Event of the Curvy Spline:
If I want to trigger an event when the spline is changed (add/delete controle point, OR just move a controlPoint), it seems like the event OnAfterControlPointChanges seems the right one, but in the documentation it's say only for add/delete point, not for move. Does it trigger also for moving a control point ?

Thanks you Smile
1) The modules are expected to stay under the generator that created them. To export a mesh, there are two actions in the Create Mesh module, "Save to scene" and "Save mesh asset(s)"
After exporting your mesh, just disable the curvy generator's game object, and do your build. I guess, even though I haven't tested it, you can use some Unity pre-build hook to automate this operation using Curvy's API

2)You can find here more information about those events:
OnAfterControlPointChanges does not trigger when a Control Point moves.
OnGlobalCoordinatesChanged is related to the spline's transform, not the CPs' ones.
Unity's Transform.hasChanged will help you achieve what you need. This is what I used to implement CurvySpline.OnGlobalCoordinatesChanged

Please let me know if you still have any questions.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
1) Ok, I guess I will let the Mesh inside the generator for now. It Would be great if I could Say to the generator to load the mehs in a special gameObject. Does the Generator take processing time in play mode ? I will disable the CurvyGenerator in play mode, I think that will do for now.

2) Oh ok, I will do my custom test with Transform.HasChanded when looping on all CP Smile

Thanks you
1) The module is expected to stay inside the generator, not the mesh it generates. "Say to the generator to load the mehs in a special gameObject" is what the "Save to scene" button does.
The generator, expect if disabled, does take processing time in play mode, when starting the game.

Is my answer what you were expecting or am I misunderstanding your question?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Batch processing of the Generator to create a bunch of Meshes HatraE 3 97 10-21-2020, 11:21 AM
Last Post: _Aka_
  Generate Mesh Spline from GameObject processor 4 277 10-01-2020, 11:00 AM
Last Post: _Aka_
  Mesh Lines - Horizontal and Vertical Edges Krypton 14 709 09-23-2020, 02:16 AM
Last Post: Krypton
  Generated mesh using bezier spline is not following the path accurately processor 3 355 08-25-2020, 04:39 PM
Last Post: _Aka_

Forum Jump: