private IEnumerator WaitForCanvas()
        {
            yield return(new WaitWhile(() => canvas == null));

            curvedHelper.Reset();
            controller = curvedHelper.GetCurvedUIController(canvas);
            controller.CurveSettingsChangedEvent += Controller_CurveSettingsChangedEvent;
            OnTransformParentChanged();
            UpdateCurvature();
        }
Exemplo n.º 2
0
        private void OnEnable()
        {
            graphic = GetComponent <Graphic>();
            helper.Reset();
            helper.GetCurvedUIController(graphic.canvas);

            if (controller != null)
            {
                controller.CurveSettingsChangedEvent -= Controller_CurveSettingsChangedEvent;
                controller.CurveSettingsChangedEvent += Controller_CurveSettingsChangedEvent;
            }

            UpdateMatrices();
        }
Exemplo n.º 3
0
 protected override void OnEnable()
 {
     base.OnEnable();
     curvedUIHelper.Reset();
 }