Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move the Create Mesh of a CurvyGenerator Out of the Main Parent
#1
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
Reply
#2
Hi,
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)"
https://curvyeditor.com/documentation/ge...e_to_scene
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:
https://api.curvyeditor.com/520/class_fl...7886fbb5a8
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
https://docs.unity3d.com/ScriptReference...anged.html

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.
Reply
#3
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
Reply
#4
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.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Extrude custom mesh along a path CesarGenera 3 32 09-19-2019, 04:47 PM
Last Post: _Aka_
  Creating a ring of rectangles, then create series of rings to create a cylinder mchangxe 2 73 09-07-2019, 10:17 AM
Last Post: _Aka_
  Renaming gameObject in scene Locked when there are CurvyGenerator in scene UsernameHed 3 303 07-18-2019, 12:02 AM
Last Post: _Aka_
  Material stretched on generated mesh Tim1234 12 862 07-01-2019, 03:57 PM
Last Post: _Aka_

Forum Jump: