예제 #1
0
        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;
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
	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;
    }