Class SignalReceiver | Timeline | 1.2.18
docs.unity3d.com
    Show / Hide Table of Contents

    Class SignalReceiver

    Listens for emitted signals and reacts depending on its defined reactions.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    SignalReceiver
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.Timeline
    Syntax
    public class SignalReceiver : MonoBehaviour, INotificationReceiver

    Methods

    AddEmptyReaction(UnityEvent)

    Appends a null SignalAsset with a reaction specified by the UnityEvent.

    Declaration
    public int AddEmptyReaction(UnityEvent reaction)
    Parameters
    Type Name Description
    UnityEvent reaction

    The new reaction to be appended.

    Returns
    Type Description
    Int32

    The index of the appended reaction.

    Remarks

    Multiple null assets are valid.

    AddReaction(SignalAsset, UnityEvent)

    Defines a new reaction for a SignalAsset.

    Declaration
    public void AddReaction(SignalAsset asset, UnityEvent reaction)
    Parameters
    Type Name Description
    SignalAsset asset

    The SignalAsset for which the reaction is being defined.

    UnityEvent reaction

    The UnityEvent that describes the reaction.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when the asset is null.

    ArgumentException

    Thrown when the SignalAsset is already registered with this receiver.

    ChangeReactionAtIndex(Int32, UnityEvent)

    Replaces the reaction at a specific index with a new UnityEvent.

    Declaration
    public void ChangeReactionAtIndex(int idx, UnityEvent reaction)
    Parameters
    Type Name Description
    Int32 idx

    The index of the reaction to be replaced.

    UnityEvent reaction

    The replacement reaction.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when the replacement reaction is null.

    ChangeSignalAtIndex(Int32, SignalAsset)

    Replaces the SignalAsset associated with a reaction at a specific index.

    Declaration
    public void ChangeSignalAtIndex(int idx, SignalAsset newKey)
    Parameters
    Type Name Description
    Int32 idx

    The index of the reaction.

    SignalAsset newKey

    The replacement SignalAsset.

    Remarks

    The new SignalAsset can be null.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the replacement SignalAsset is already registered to this SignalReceiver.

    Count()

    Returns the count of registered SignalAssets.

    Declaration
    public int Count()
    Returns
    Type Description
    Int32

    GetReaction(SignalAsset)

    Gets the first UnityEvent associated with a SignalAsset.

    Declaration
    public UnityEvent GetReaction(SignalAsset key)
    Parameters
    Type Name Description
    SignalAsset key

    A SignalAsset defining the signal.

    Returns
    Type Description
    UnityEvent

    Returns the reaction associated with a SignalAsset. Returns null if the signal asset does not exist.

    GetReactionAtIndex(Int32)

    Gets the reaction at a specific index.

    Declaration
    public UnityEvent GetReactionAtIndex(int idx)
    Parameters
    Type Name Description
    Int32 idx

    The index of the reaction.

    Returns
    Type Description
    UnityEvent

    Returns a reaction.

    GetRegisteredSignals()

    Gets a list of all registered SignalAssets.

    Declaration
    public IEnumerable<SignalAsset> GetRegisteredSignals()
    Returns
    Type Description
    IEnumerable<SignalAsset>

    Returns a list of SignalAssets.

    GetSignalAssetAtIndex(Int32)

    Gets the SignalAsset at a specific index

    Declaration
    public SignalAsset GetSignalAssetAtIndex(int idx)
    Parameters
    Type Name Description
    Int32 idx

    The index of the SignalAsset.

    Returns
    Type Description
    SignalAsset

    Returns a SignalAsset.

    OnNotify(Playable, INotification, Object)

    Called when a notification is sent.

    Declaration
    public void OnNotify(Playable origin, INotification notification, object context)
    Parameters
    Type Name Description
    Playable origin
    INotification notification
    Object context
    Implements
    INotificationReceiver.OnNotify(Playable, INotification, Object)

    Remove(SignalAsset)

    Removes the first occurrence of a SignalAsset.

    Declaration
    public void Remove(SignalAsset asset)
    Parameters
    Type Name Description
    SignalAsset asset

    The SignalAsset to be removed.

    RemoveAtIndex(Int32)

    Removes the SignalAsset and reaction at a specific index.

    Declaration
    public void RemoveAtIndex(int idx)
    Parameters
    Type Name Description
    Int32 idx

    The index of the SignalAsset to be removed.

    See Also

    SignalEmitter
    SignalAsset
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023