NetworkAnimator
The NetworkAnimator component synchronizes the state and parameters of an Animator Controller across the network.
Basic Setup
To use the NetworkAnimator component, the following components are required.
- NetworkIdentity component
- Animator component
Inspector Settings
The following settings can be configured in the Inspector.
Client Authority
This setting determines whether the client controls the animation.
- true: Changes to animation parameters on the client will be sent to the server.
- false: The server is the only entity that can control the animation.
Animator
This field specifies the Animator component to synchronize.
Trigger Usage
note
Animator triggers are not synchronized directly. Instead, you need to use NetworkAnimator.SetTrigger to trigger animations.
// Example of triggering
networkAnimator.SetTrigger("TriggerName");