Class Message
An object passed in a message queue.
Inherited Members
Namespace: UnityEngine.Dt.App.Core
Syntax
public class Message
Properties
arg1
An arbitrary integer value to attach with the message.
Declaration
public int arg1 { get; }
Property Value
Type | Description |
---|---|
Int32 |
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 |
---|---|
Int32 |
Methods
Obtain(Handler, Int32, Int32, 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. |
Int32 | id | The message ID. |
Int32 | arg1 | An arbitrary integer value. |
Object | obj | An arbitrary object. |
Returns
Type | Description |
---|---|
Message | The message. |
Obtain(Handler, Int32, 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. |
Int32 | 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()