how could I get the selected knot? (See image)
My goal is to be able to move it to the sceneview's camera's position and rotation.
public void MoveSelectedKnotToCamera()
{
var sceneView = SceneView.lastActiveSceneView;
if (!sceneView) return;
if (Selection.activeObject is CinemachineSplineDolly spline)
{
var splineContainer = spline.Spline;
if (splineContainer.Splines.Count == 0)
{
Debug.LogError("No splines found on selected asset!");
return;
}
var existingSpline = splineContainer.Splines.First();
// todo: now I need to get selected knot in spline, but I can't find any matching funciton!
}
}
In the following image, the first knot is selected.