06-03-2019, 10:17 AM
Hello,
I Would Like from an editor script, to access this 2 property and modify it, and then Update the CurvyGenerator.
My goal is: I have 2 custom SPlineController on the road, and depending of their percent on the road, create a mesh from the start of it to the end, like that:
(For now, I have set this value from your CurvyGenerator editor)
So now from code: I have in my script the CurvyGenerator reference.
1) First, I would like to Set the Spline of the curvyGenegator dynamically.
I Guess I have to search for.
But I don't find how to get it.
2) Next, I would like to do something like:
3) And then:
-> will it refresh the mesh ?
I Would Like from an editor script, to access this 2 property and modify it, and then Update the CurvyGenerator.
My goal is: I have 2 custom SPlineController on the road, and depending of their percent on the road, create a mesh from the start of it to the end, like that:
(For now, I have set this value from your CurvyGenerator editor)
So now from code: I have in my script the CurvyGenerator reference.
1) First, I would like to Set the Spline of the curvyGenegator dynamically.
I Guess I have to search for
Code:
curvyGenerator.InputSplinePath.Spline = mySpline
But I don't find how to get it.
2) Next, I would like to do something like:
Code:
curvyGenerator.BuildShapeExtrusion.Range = 0.02f;
curvyGenerator.BuildShapeExtrusion.Lenght = 0.001f;
3) And then:
Code:
curvyGenerator.Refresh()