Search Results for

    Show / Hide Table of Contents

    Class MessageType<T0>

    Base class for all MessageTypes with parameter.

    Inheritance
    System.Object
    MessageTypeBase
    MessageType<T0>
    Namespace: MalteHusung.GlobalMessage
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class MessageType<T0> : MessageTypeBase
    Type Parameters
    Name Description
    T0

    Methods

    AddReceiver(UnityAction<T0>)

    Adds the receiver to this message.

    Declaration
    public void AddReceiver(UnityAction<T0> receiverAction)
    Parameters
    Type Name Description
    UnityAction<T0> receiverAction

    is now invoked when the message is sent

    AddReceiver<TMessageType>(UnityAction<T0>)

    Adds the receiver to this message.

    Declaration
    public static void AddReceiver<TMessageType>(UnityAction<T0> receiverAction)
        where TMessageType : MessageType<T0>
    Parameters
    Type Name Description
    UnityAction<T0> receiverAction

    is now invoked when the message is sent

    Type Parameters
    Name Description
    TMessageType

    type of the message the receiver will be added to

    RemoveReceiver(UnityAction<T0>)

    Removes the receiver from this message.

    Declaration
    public void RemoveReceiver(UnityAction<T0> receiverAction)
    Parameters
    Type Name Description
    UnityAction<T0> receiverAction

    is not invoked anymore when the message is sent

    RemoveReceiver<TMessageType>(UnityAction<T0>)

    Removes the receiver from the message.

    Declaration
    public static void RemoveReceiver<TMessageType>(UnityAction<T0> receiverAction)
        where TMessageType : MessageType<T0>
    Parameters
    Type Name Description
    UnityAction<T0> receiverAction

    is not invoked anymore when the message is sent

    Type Parameters
    Name Description
    TMessageType

    type of the message the receiver will be removed from

    Send(T0, Object)

    Sends this message to it's receivers

    Declaration
    public void Send(T0 param0, object sender)
    Parameters
    Type Name Description
    T0 param0

    the parameter that is sent to the receivers

    System.Object sender

    is displayed as the sender in the unity editor. Can be null if you don't need that info.

    Send<TMessageType>(T0, Object)

    Sends a message of type TMessageType to all it's receivers.

    Declaration
    public static void Send<TMessageType>(T0 param0, object sender)
        where TMessageType : MessageType<T0>
    Parameters
    Type Name Description
    T0 param0

    1st message parameter

    System.Object sender

    is displayed as the sender in the unity editor. Can be null if you don't need that info.

    Type Parameters
    Name Description
    TMessageType
    In This Article
    Back to top Malte HusungLeave a ReviewLegal Noticethank you ❤️