diff --git a/doc/Guides/Sync/SyncVars.md b/doc/Guides/Sync/SyncVars.md index dfbe6159c..868e19c1e 100644 --- a/doc/Guides/Sync/SyncVars.md +++ b/doc/Guides/Sync/SyncVars.md @@ -1,5 +1,7 @@ # SyncVars +[Video Tutorial](https://www.youtube.com/watch?v=T7AoozedYfI) + SyncVars are properties of classes that inherit from NetworkBehaviour, which are synchronized from the server to clients. When a game object is spawned, or a new player joins a game in progress, they are sent the latest state of all SyncVars on networked objects that are visible to them. Use the `SyncVar` custom attribute to specify which variables in your script you want to synchronize. The state of SyncVars is applied to game objects on clients before `OnStartClient()` is called, so the state of the object is always up-to-date inside `OnStartClient()`. @@ -11,7 +13,6 @@ The server automatically sends SyncVar updates when the value of a SyncVar chang > The [SyncVar hook](SyncVarHook.md) attribute can be used to specify a method to be called when the SyncVar changes value on the client. ## SyncVar Example - Let's say we have a networked object with a script called Enemy: ``` cs