コード例 #1
0
 private void EnsureLayoutHasRebuilt()
 {
     if (!m_HasRebuiltLayout && !CanvasUpdateRegistry.IsRebuildingLayout())
     {
         Canvas.ForceUpdateCanvases();
     }
 }
コード例 #2
0
ファイル: IMCText.cs プロジェクト: pilipalaBeng/UIFrame
        public void FontTextureChanged()
        {
            // Only invoke if we are not destroyed.
            if (!this)
            {
                FontUpdateTracker.UntrackText(this);
                return;
            }

            if (m_DisableFontTextureRebuiltCallback)
            {
                return;
            }

            cachedTextGenerator.Invalidate();

            if (!IsActive())
            {
                return;
            }

            // this is a bit hacky, but it is currently the
            // cleanest solution....
            // if we detect the font texture has changed and are in a rebuild loop
            // we just regenerate the verts for the new UV's
            if (CanvasUpdateRegistry.IsRebuildingGraphics() || CanvasUpdateRegistry.IsRebuildingLayout())
            {
                UpdateGeometry();
            }
            else
            {
                SetAllDirty();
            }
        }
コード例 #3
0
ファイル: Graphic.cs プロジェクト: pilipalaBeng/UIFrame
 protected override void OnRectTransformDimensionsChange()
 {
     if (gameObject.activeInHierarchy)
     {
         // prevent double dirtying...
         if (CanvasUpdateRegistry.IsRebuildingLayout())
         {
             SetVerticesDirty();
         }
         else
         {
             SetVerticesDirty();
             SetLayoutDirty();
         }
     }
 }