Skip to content

Commit 8e03175

Browse files
committed
Adding distributed authority note to NetworkAnimator
1 parent b2facd9 commit 8e03175

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/components/networkanimator.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Using `NetworkAnimator`, animation states are synchronized with players joining
1919

2020
`NetworkAnimator` can operate in two authoritative modes:
2121

22-
* [Server authoritative](#server-authoritative-mode) (default): The server initiates animation state changes.
22+
* [Server authoritative](#server-authoritative-mode): The server initiates animation state changes. This is the default in [client-server topologies](../terms-concepts/client-server.md).
2323
* Owners can still invoke `NetworkAnimator.SetTrigger`.
24-
* [Client authoritative](#owner-authoritative-mode): Client owners start animation state changes.
24+
* [Client authoritative](#owner-authoritative-mode): Client owners start animation state changes. This is the default in [distributed authority topologies](../terms-concepts/distributed-authority.md).
2525

2626

2727
:::note
@@ -42,7 +42,7 @@ If you set a trigger property using `Animator.SetTrigger` then this won't be syn
4242

4343
## Server authoritative mode
4444

45-
The default setting for `NetworkAnimator` is server authoritative mode. When operating in server authoritative mode, any animation state changes that are set (triggers) or detected (change in layer, state, or any `Animator` properties excluding triggers) on the server side will be synchronized with all clients. Because the server initiates any synchronization of changes to an `Animator`'s state, a client that's the owner of the NetworkObject associated with the `NetworkAnimator` can lag by roughly the full round trip time (RTT). Below is a timing diagram to show this:
45+
In [client-server contexts](../terms-concepts/client-server.md), the default setting for `NetworkAnimator` is server authoritative mode. When operating in server authoritative mode, any animation state changes that are set (triggers) or detected (change in layer, state, or any `Animator` properties excluding triggers) on the server side will be synchronized with all clients. Because the server initiates any synchronization of changes to an `Animator`'s state, a client that's the owner of the NetworkObject associated with the `NetworkAnimator` can lag by roughly the full round trip time (RTT). Below is a timing diagram to show this:
4646

4747
![ServerAuthMode](/img/NetworkAnimatorServerAuthTiming.png)
4848

@@ -59,7 +59,9 @@ In the above diagram, a client might be sending the server an RPC to tell the se
5959

6060
## Owner authoritative mode
6161

62-
Your project's design (or personal preference) might require that owners are immediately updated with any `Animator` state changes, typically to give the local player instantaneous visual (animation) feedback. To create an owner authoritative `NetworkAnimator`, you need to create a new class that's derived from `NetworkAnimator`, override the `NetworkAnimator.OnIsServerAuthoritative` method, and within the overridden `OnIsServerAuthoritative` method you should return false like in the example provided below:
62+
Your project's design (or personal preference) might require that owners are immediately updated with any `Animator` state changes, typically to give the local player instantaneous visual (animation) feedback. In [distributed authority contexts](../terms-concepts/distributed-authority.md), the default setting for `NetworkAnimator` is owner authoritative mode.
63+
64+
To create an owner authoritative `NetworkAnimator` in a client-server context, you need to create a new class that's derived from `NetworkAnimator`, override the `NetworkAnimator.OnIsServerAuthoritative` method, and within the overridden `OnIsServerAuthoritative` method you should return false like in the example provided below:
6365

6466
```csharp
6567
public class OwnerNetworkAnimator : NetworkAnimator

0 commit comments

Comments
 (0)