Mirror/doc/Guides/Sync
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
..
index.md Fix spelling mistakes 2019-12-07 23:31:48 +01:00
SyncDictionary.md Eliminated Classes section 2019-09-20 23:34:03 -04:00
SyncEvent.md Eliminated Classes section 2019-09-20 23:34:03 -04:00
SyncHashSet.md Eliminated Classes section 2019-09-20 23:34:03 -04:00
SyncLists.md breaking: SyncList.Callback passes old and new entries instead of only passing one entry which is sometimes the old, sometimes the new entry. This is more consistent and it's very useful to know the previous value in a hook for OP_SET and OP_DIRTY. (#1273) 2019-12-03 08:35:41 +01:00
SyncSortedSet.md Eliminated Classes section 2019-09-20 23:34:03 -04:00
SyncVarHook.md 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) 2020-01-10 16:17:13 +01:00
SyncVars.md Changedvideo link to video within playlist. 2019-12-16 16:49:34 -05:00
toc.yml Restore Overview entries in TOC's 2019-12-30 04:35:18 -05:00