Posts: 46
Threads: 13
Joined: Jan 2020
(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.
Posts: 1,984
Threads: 82
Joined: Jun 2017
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.
Posts: 46
Threads: 13
Joined: Jan 2020
03-14-2020, 05:04 PM
(This post was last modified: 03-15-2020, 05:31 AM by ATHellboy.)
(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.
Posts: 46
Threads: 13
Joined: Jan 2020
Posts: 1,984
Threads: 82
Joined: Jun 2017
03-18-2020, 11:36 PM
(This post was last modified: 03-18-2020, 11:37 PM by _Aka_.)
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.
Posts: 46
Threads: 13
Joined: Jan 2020
03-19-2020, 05:35 AM
(This post was last modified: 03-19-2020, 06:14 AM by ATHellboy.)
(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.