예제 #1
0
 protected void ChangeCurved3DCanvas()
 {
     if (isActiveAndEnabled)
     {
         var curretCurvedCanvas = GetValidCurved3DCanvas();
         if (curretCurvedCanvas != m_curvedCanvas)
         {
             if (m_curvedCanvas != null)
             {
                 m_curvedCanvas.RemoveElement(this);
             }
             m_curvedCanvas = curretCurvedCanvas;
             if (m_curvedCanvas != null)
             {
                 m_curvedCanvas.AddElement(this);
             }
         }
     }
     else
     {
         if (m_curvedCanvas != null)
         {
             m_curvedCanvas.RemoveElement(this);
         }
         m_curvedCanvas = null;
     }
 }
예제 #2
0
 protected override void OnEnable()
 {
     base.OnEnable();
     m_curvedCanvas = GetValidCurved3DCanvas();
     if (m_curvedCanvas != null)
     {
         m_curvedCanvas.AddElement(this);
     }
 }