docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CanvasUpdateRegistry

    A place where CanvasElements can register themselves for rebuilding.

    Inheritance
    object
    CanvasUpdateRegistry
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.UI
    Assembly: UnityEngine.UI.dll
    Syntax
    public class CanvasUpdateRegistry

    Constructors

    CanvasUpdateRegistry()

    Declaration
    protected CanvasUpdateRegistry()

    Properties

    instance

    Get the singleton registry instance.

    Declaration
    public static CanvasUpdateRegistry instance { get; }
    Property Value
    Type Description
    CanvasUpdateRegistry

    Methods

    DisableCanvasElementForRebuild(ICanvasElement)

    Disable the given element from both the graphic and the layout rebuild lists.

    Declaration
    public static void DisableCanvasElementForRebuild(ICanvasElement element)
    Parameters
    Type Name Description
    ICanvasElement element

    IsRebuildingGraphics()

    Are graphics currently being rebuild.

    Declaration
    public static bool IsRebuildingGraphics()
    Returns
    Type Description
    bool

    True if the rebuild loop is CanvasUpdate.PreRender or CanvasUpdate.Render

    IsRebuildingLayout()

    Are graphics layouts currently being calculated..

    Declaration
    public static bool IsRebuildingLayout()
    Returns
    Type Description
    bool

    True if the rebuild loop is CanvasUpdate.Prelayout, CanvasUpdate.Layout or CanvasUpdate.Postlayout

    RegisterCanvasElementForGraphicRebuild(ICanvasElement)

    Try and add the given element to the rebuild list. Will not return if successfully added.

    Declaration
    public static void RegisterCanvasElementForGraphicRebuild(ICanvasElement element)
    Parameters
    Type Name Description
    ICanvasElement element

    The element that is needing rebuilt.

    RegisterCanvasElementForLayoutRebuild(ICanvasElement)

    Try and add the given element to the layout rebuild list. Will not return if successfully added.

    Declaration
    public static void RegisterCanvasElementForLayoutRebuild(ICanvasElement element)
    Parameters
    Type Name Description
    ICanvasElement element

    The element that is needing rebuilt.

    TryRegisterCanvasElementForGraphicRebuild(ICanvasElement)

    Try and add the given element to the rebuild list.

    Declaration
    public static bool TryRegisterCanvasElementForGraphicRebuild(ICanvasElement element)
    Parameters
    Type Name Description
    ICanvasElement element

    The element that is needing rebuilt.

    Returns
    Type Description
    bool

    True if the element was successfully added to the rebuilt list. False if either already inside a Graphic Update loop OR has already been added to the list.

    TryRegisterCanvasElementForLayoutRebuild(ICanvasElement)

    Try and add the given element to the layout rebuild list.

    Declaration
    public static bool TryRegisterCanvasElementForLayoutRebuild(ICanvasElement element)
    Parameters
    Type Name Description
    ICanvasElement element

    The element that is needing rebuilt.

    Returns
    Type Description
    bool

    True if the element was successfully added to the rebuilt list. False if either already inside a Graphic Update loop OR has already been added to the list.

    UnRegisterCanvasElementForRebuild(ICanvasElement)

    Remove the given element from both the graphic and the layout rebuild lists.

    Declaration
    public static void UnRegisterCanvasElementForRebuild(ICanvasElement element)
    Parameters
    Type Name Description
    ICanvasElement element
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)