public void Awake() { // set up internal members mSpline = GetComponent <SplineSetup>(); mCheckPoints = new List <CheckPoint>(GetComponentsInChildren <CheckPoint>()); ConnectChildren(); }
public void OnHandleChanged(int i) { SplineSetup spline = GetComponentInParent <SplineSetup>(); if (spline) { spline.OnHandleChanged(i); } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); SplineSetup spline = target as SplineSetup; if (spline == null) { return; } if (GUILayout.Button("Connect ControlPoints")) { spline.ConnectPoints(); EditorUtility.SetDirty(spline); } }