From 3033ed7541cf0c48cac23260bd2942d7302c5e7c Mon Sep 17 00:00:00 2001 From: FirstGearGames Date: Sat, 14 Dec 2019 11:23:52 -0500 Subject: [PATCH] docs: Added video tutorial URL (#1308) * Update SyncVars.md * Update doc/Guides/Sync/SyncVars.md Co-Authored-By: Paul Pacheco * Update SyncVars.md - Removed starting time from video URL. * Resize image and move to the top * Make video bigger --- doc/Guides/Sync/SyncVars.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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