void OnEnable() { _previousPosition = transform.position; CatmullRomRoot root = transform.GetComponentInParent <CatmullRomRoot>(); if (root != null) { _splineRoot = root; } else { Debug.LogError("Spline nodes must be parented to a root."); } }
static void RenderCustomGizmo(CatmullRomRoot splineRoot, GizmoType gizmoType) { DrawSpline(splineRoot.PointsAlongSpline); //DrawNodes(splineRoot.GetComponentsInChildren<CatmullRomNode>()); }