Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing Volume Mesh UV
#11
(03-13-2020, 11:23 PM)_Aka_ Wrote: Only Input Spline Path module (and its Shape equivalent) have a reference to a spline. It transforms it to a Path (in code CGPath), and that is what is used in the remaining of the generator.
Each CG module has a reference to its input and output modules, see Input and Output lists

Yup, I know but I don't know how to access to the pre module. I don't find the accessor.
Reply
#12
Go through the Input list, find the right link, access its module, and then repeat until you reach the right module. The code depends on your graph
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#13
(03-14-2020, 01:55 PM)_Aka_ Wrote: Go through the Input list, find the right link, access its module, and then repeat until you reach the right module. The code depends on your graph

Please tell me functions and properties which I should call. I try almost everything but I can't navigate on modules.
Reply
#14
Anything ?
Reply
#15
BuildShapeExtrusion buildShapeExtrusion = (BuildVolumeMesh.Input[0].LinkedSlots[0].Module as BuildShapeExtrusion);
InputSplinePath inputSplinePath = (buildShapeExtrusion.Input[0].LinkedSlots[0].Module as InputSplinePath);
then
inputSplinePath .Spline

An alternative is
BuildShapeExtrusion buildShapeExtrusion = (BuildVolumeMesh.InVolume.LinkedSlots[0].Module as BuildShapeExtrusion);
InputSplinePath inputSplinePath = (buildShapeExtrusion.InPath.LinkedSlots[0].Module as InputSplinePath);

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
#16
(03-18-2020, 11:36 PM)_Aka_ Wrote: BuildShapeExtrusion buildShapeExtrusion = (BuildVolumeMesh.Input[0].LinkedSlots[0].Module as BuildShapeExtrusion);
InputSplinePath inputSplinePath = (buildShapeExtrusion.Input[0].LinkedSlots[0].Module as InputSplinePath);
then
inputSplinePath .Spline

An alternative is
BuildShapeExtrusion buildShapeExtrusion = (BuildVolumeMesh.InVolume.LinkedSlots[0].Module as BuildShapeExtrusion);
InputSplinePath inputSplinePath = (buildShapeExtrusion.InPath.LinkedSlots[0].Module as InputSplinePath);

Have a nice day

I use the same approach but from beginning buildVolumeMesh.InVolume.LinkedSlots.Count is 0.
I call it in OnEnable and maybe the problem is because of this ?

https://gyazo.com/c60265eebfada6e1a591b096f1e66410

Edit: Yup, I should call after Generator initialization.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Incorrect mesh alignment after extrusion on curved path Thinkurvy 6 11 5 hours ago
Last Post: Thinkurvy
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
  Adjust radius of generated mesh via script? Shackman 1 4 03-26-2024, 01:12 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: