Esempio n. 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;
     }
 }
Esempio n. 2
0
 protected override void OnDisable()
 {
     if (m_curvedCanvas != null)
     {
         m_curvedCanvas.RemoveElement(this);
         m_curvedCanvas = null;
     }
     base.OnDisable();
 }
Esempio n. 3
0
 protected override void OnEnable()
 {
     base.OnEnable();
     m_curvedCanvas = GetValidCurved3DCanvas();
     if (m_curvedCanvas != null)
     {
         m_curvedCanvas.AddElement(this);
     }
 }