12-04-2019, 12:32 PM
Hi,
It is way easier that that: just update the Spline value of the InputSplinePath module used in your CurvyGenerator, and that's it. Everything else is done automatically
Here is a simple example:
It is way easier that that: just update the Spline value of the InputSplinePath module used in your CurvyGenerator, and that's it. Everything else is done automatically
Here is a simple example:
Code:
public class Test: MonoBehaviour
{
public InputSplinePath InputModule;
public CurvySpline S1;
public CurvySpline S2;
public bool Switch;
// Update is called once per frame
void Update()
{
if (Switch)
{
Switch = !Switch;
if (InputModule.Spline == S2)
InputModule.Spline = S1;
else
{
InputModule.Spline = S2;
}
}
}
}
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.