docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Message

    An object passed in a message queue.

    Inheritance
    object
    Message
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.Core
    Assembly: Unity.AppUI.dll
    Syntax
    public class Message

    Properties

    arg1

    An arbitrary integer value to attach with the message.

    Declaration
    public int arg1 { get; }
    Property Value
    Type Description
    int

    obj

    An arbitrary object to attach with the message.

    Declaration
    public object obj { get; }
    Property Value
    Type Description
    object

    target

    The Handler instance which has obtained this message.

    Declaration
    public Handler target { get; }
    Property Value
    Type Description
    Handler

    what

    The message ID.

    Declaration
    public int what { get; }
    Property Value
    Type Description
    int

    Methods

    Obtain(Handler, int, int, object)

    Obtain a message from the pool with pre specified properties.

    Declaration
    public static Message Obtain(Handler handler, int id, int arg1, object obj)
    Parameters
    Type Name Description
    Handler handler

    The target.

    int id

    The message ID.

    int arg1

    An arbitrary integer value.

    object obj

    An arbitrary object.

    Returns
    Type Description
    Message

    The message.

    Obtain(Handler, int, object)

    Obtain a message from the pool with pre specified properties.

    Declaration
    public static Message Obtain(Handler handler, int id, object obj)
    Parameters
    Type Name Description
    Handler handler

    The target.

    int id

    The message ID.

    object obj

    An arbitrary object.

    Returns
    Type Description
    Message

    The message.

    Recycle()

    Recycle this message and put if back into the pool.

    Declaration
    public void Recycle()
    In This Article
    Back to top
    Copyright © 2025 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)