05-27-2021, 08:33 PM
Hi
1- You can get all the connections using FindObjectsOfType (a unity method). Then, for each spline, get the yourConnection.ControlPointsList, and for each of the control points, you can get the spline from yourControlPoint.Spline
As a suggestion, using LINQ can help you make requests easily, with few code. Some requests can allocate memory though, so profile them in critical paths: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/
2) Get the tf on the desired spline using yourSpline.GetNearestPointTF. Then set that TF as an input for yourSplineController.RelativePosition
Have a nice day
1- You can get all the connections using FindObjectsOfType (a unity method). Then, for each spline, get the yourConnection.ControlPointsList, and for each of the control points, you can get the spline from yourControlPoint.Spline
As a suggestion, using LINQ can help you make requests easily, with few code. Some requests can allocate memory though, so profile them in critical paths: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/
2) Get the tf on the desired spline using yourSpline.GetNearestPointTF. Then set that TF as an input for yourSplineController.RelativePosition
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.