Commit Graph

11 Commits

Author SHA1 Message Date
Chris Langsenkamp
733bb92d37 doc: Updated SyncVar Hook doc 2020-03-24 08:39:08 -04:00
Chris Langsenkamp
04a8e86578 Updated SyncVarHook doc 2020-03-21 12:47:05 -04:00
Chris Langsenkamp
25edcf0d41 docs: Updated SyncVar docs 2020-02-23 02:48:21 -05:00
Chris Langsenkamp
bf47ae4cf1 removed blank line in doc 2020-02-18 12:11:55 -05:00
Sebastian König
c0feee8845
Changed namespace in code snippet. (#1505)
Added "using Mirror;" instead of "using UnityEngine.Networking;"
2020-02-18 12:10:04 -05:00
Chris Langsenkamp
cad02a2b1d Added note to SyncVarHooks doc 2020-01-28 02:48:21 -05:00
vis2k
b9f52fdb46
breaking: fix: #1151 - assign SyncVars before calling the Hook. Hook now passes old and new value instead of changing it from new value to old value, as this would break all SyncVar Hook projects silently. (#1416)
* test

* new docs

* adjust CheckForHookFunction to expect two hooks

* update example

* update example

* update example

* update test

* update example

* SyncVar.set: store value in oldValue variable

* SyncVar.set: pass old value to hook too

* TODO

* SyncVar deserialize store value in oldValue variable (for simple types)

* SyncVar deserialize: pass old value to hook too (for simple types)

* add test for GameObject type

* fix comment

* SyncVar deserialize: set value before calling hook

* add TODO

* SyncVar.set: set value before calling hook

* replace tests

* GO test

* SyncVar deserialize: move oldvalue code higher up so it applies to GO/NI too

* syntax

* SyncVar deserialize: pass oldValue to hook (GO/NI types)

* SyncVar deserialize: set netid before calling hook (GO/NI types)

* update comment

* update comment

* update comment

* shorter

* comment, TODO

* put oldValue code into separate cases again

* fix SyncVarEqual comparing the same two __goNetId values

* get rid of tmpValue

* fix weaver tests

* remove TODO

* SyncVar deserialize simple types: get rid of tmpValue here too

* remove tests
2020-01-10 16:17:13 +01:00
Icezman001
a21ab8934b
Update SyncVarHook.md
In the example while reading the guides it just seemed easier to put the variables at the top (as you read the OnStartServer method you see a variable and try to find what it is, but it's further down.
Easier to understand in my mind. Not sure if it's a huge issue for others
2019-12-19 15:54:35 +01:00
FirstGearGames
beca3dfd20
Added SyncVar hook video link. 2019-12-16 16:51:53 -05:00
Paul Pacheco
d6f07cd8ac docs: it is safe to update a syncvar inside it's hook 2019-10-27 10:18:15 -05:00
Chris Langsenkamp
964c88e4be Eliminated Classes section 2019-09-20 23:34:03 -04:00