Class TMP_UpdateRegistry
Class for handling and scheduling text object updates.
Inherited Members
Namespace: TMPro
Assembly: Unity.TextMeshPro.dll
Syntax
public class TMP_UpdateRegistry
Constructors
TMP_UpdateRegistry()
Register to receive callback from the Canvas System.
Declaration
protected TMP_UpdateRegistry()
Properties
instance
Get a singleton instance of the registry
Declaration
public static TMP_UpdateRegistry instance { get; }
Property Value
| Type | Description |
|---|---|
| TMP_UpdateRegistry |
Methods
RegisterCanvasElementForGraphicRebuild(ICanvasElement)
Registers elements which require a graphic rebuild.
Declaration
public static void RegisterCanvasElementForGraphicRebuild(ICanvasElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| ICanvasElement | element | Canvas element to enqueue for vertex or material updates before the next canvas prerender pass. |
Remarks
Processes after layout rebuilds so font atlases and mesh buffers apply once RectTransform dimensions are finalized for the frame.
RegisterCanvasElementForLayoutRebuild(ICanvasElement)
Registers elements which require a layout rebuild.
Declaration
public static void RegisterCanvasElementForLayoutRebuild(ICanvasElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| ICanvasElement | element | Canvas element (typically TMP_Text) to enqueue; duplicates are skipped using the object entity id. |
Remarks
Queues the element for Prelayout during Canvas.willRenderCanvases so TMP can refresh preferred size before mesh generation.
UnRegisterCanvasElementForRebuild(ICanvasElement)
Unregisters elements which no longer require a rebuild.
Declaration
public static void UnRegisterCanvasElementForRebuild(ICanvasElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| ICanvasElement | element | Canvas element to remove from both internal layout and graphic rebuild queues when disabling or destroying the object. |
Remarks
Clears pending work so stale ICanvasElement references are not processed after the component becomes inactive or is pooled.