docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkAnimator

    NetworkAnimator enables remote synchronization of Animator state for on network objects.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    NetworkBehaviour
    NetworkAnimator
    Implements
    ISerializationCallbackReceiver
    Inherited Members
    NetworkBehaviour.NetworkManager
    NetworkBehaviour.RpcTarget
    NetworkBehaviour.IsLocalPlayer
    NetworkBehaviour.IsOwner
    NetworkBehaviour.IsServer
    NetworkBehaviour.HasAuthority
    NetworkBehaviour.IsSessionOwner
    NetworkBehaviour.ServerIsHost
    NetworkBehaviour.IsClient
    NetworkBehaviour.IsHost
    NetworkBehaviour.IsOwnedByServer
    NetworkBehaviour.IsSpawned
    NetworkBehaviour.NetworkObject
    NetworkBehaviour.HasNetworkObject
    NetworkBehaviour.NetworkObjectId
    NetworkBehaviour.NetworkBehaviourId
    NetworkBehaviour.GetNetworkBehaviour(ushort)
    NetworkBehaviour.OwnerClientId
    NetworkBehaviour.OnDeferringDespawn(int)
    NetworkBehaviour.OnNetworkPreSpawn(ref NetworkManager)
    NetworkBehaviour.OnNetworkPostSpawn()
    NetworkBehaviour.InternalOnNetworkPostSpawn()
    NetworkBehaviour.OnNetworkSessionSynchronized()
    NetworkBehaviour.InternalOnNetworkSessionSynchronized()
    NetworkBehaviour.OnInSceneObjectsSpawned()
    NetworkBehaviour.OnGainedOwnership()
    NetworkBehaviour.OnOwnershipChanged(ulong, ulong)
    NetworkBehaviour.OnLostOwnership()
    NetworkBehaviour.OnNetworkObjectParentChanged(NetworkObject)
    NetworkBehaviour.GetNetworkObject(ulong)
    NetworkBehaviour.OnReanticipate(double)
    NetworkBehaviour.m_TargetIdBeingSynchronized
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    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.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    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
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    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, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Netcode.Components
    Assembly: Unity.Netcode.Runtime.dll
    Syntax
    [AddComponentMenu("Netcode/Network Animator")]
    public class NetworkAnimator : NetworkBehaviour, ISerializationCallbackReceiver

    Properties

    Animator

    Declaration
    public Animator Animator { get; set; }
    Property Value
    Type Description
    Animator

    Methods

    Awake()

    Declaration
    protected virtual void Awake()

    OnAfterDeserialize()

    Implement this callback to transform data back into runtime data types after an object is deserialized.

    Declaration
    public void OnAfterDeserialize()

    OnBeforeSerialize()

    Implement this callback to transform data into serializable data types immediately before an object is serialized.

    Declaration
    public void OnBeforeSerialize()

    OnDestroy()

    Invoked when the GameObject the NetworkBehaviour is attached to is destroyed. If you override this, you must always invoke the base class version of this OnDestroy() method.

    Declaration
    public override void OnDestroy()
    Overrides
    NetworkBehaviour.OnDestroy()

    OnIsServerAuthoritative()

    Override this method and return false to switch to owner authoritative mode

    Declaration
    protected virtual bool OnIsServerAuthoritative()
    Returns
    Type Description
    bool
    Remarks

    When using a distributed authority network topology, this will default to owner authoritative.

    OnNetworkDespawn()

    Gets called when the NetworkObject gets despawned. This method runs both client and server side.

    Declaration
    public override void OnNetworkDespawn()
    Overrides
    NetworkBehaviour.OnNetworkDespawn()

    OnNetworkSpawn()

    Gets called when the NetworkObject gets spawned, message handlers are ready to be registered, and the network is set up.

    Declaration
    public override void OnNetworkSpawn()
    Overrides
    NetworkBehaviour.OnNetworkSpawn()

    OnSynchronize<T>(ref BufferSerializer<T>)

    Used to synchronize newly joined clients

    Declaration
    protected override void OnSynchronize<T>(ref BufferSerializer<T> serializer) where T : IReaderWriter
    Parameters
    Type Name Description
    BufferSerializer<T> serializer
    Type Parameters
    Name Description
    T
    Overrides
    NetworkBehaviour.OnSynchronize<T>(ref BufferSerializer<T>)

    ResetTrigger(int)

    Declaration
    public void ResetTrigger(int hash)
    Parameters
    Type Name Description
    int hash

    The hash for the trigger to activate

    ResetTrigger(string)

    Resets the trigger for the associated animation. See SetTrigger for more on how triggers are special

    Declaration
    public void ResetTrigger(string triggerName)
    Parameters
    Type Name Description
    string triggerName

    The string name of the trigger to reset

    SetTrigger(int, bool)

    Sets the trigger for the associated animation

    Declaration
    public void SetTrigger(int hash, bool setTrigger = true)
    Parameters
    Type Name Description
    int hash

    The hash for the trigger to activate

    bool setTrigger

    sets (true) or resets (false) the trigger. The default is to set it (true).

    SetTrigger(string)

    Sets the trigger for the associated animation

    Declaration
    public void SetTrigger(string triggerName)
    Parameters
    Type Name Description
    string triggerName

    The string name of the trigger to activate

    Implements

    ISerializationCallbackReceiver
    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)