void Awake() { BezierSplineComponent splineComponent = GetComponent<BezierSplineComponent>(); if (splineComponent == null) { Debug.LogError("[ERROR] You have to add a BezerierSplineComponent to this GameObject. Disabling..."); gameObject.SetActive(false); return; } else { spline = splineComponent.Spline; iterator = spline.GetIterator(); UpdatePointArray(); } }
public virtual void OnEnable() { if(AssetDatabase.Contains(target)) { m_splinecomp = null; m_spline = null; m_edithelper = null; } else { m_splinecomp = (BezierSplineComponent)target; m_spline = m_splinecomp.Spline; m_edithelper = m_spline.GetEditHelper(); } Undo.undoRedoPerformed += UndoPerformed; }
internal EditHelper(BezierSpline spline) { m_spline = spline; }