Commit Graph

31 Commits

Author SHA1 Message Date
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
shulinnn
60a2595093 Update SyncLists.md (#1445)
OP_DIRTY & OP_REMOVE are obsolete.
2020-01-21 05:00:25 -05:00
MrGadget
0a49b435cc
Added Serializable and SerializeField 2020-01-14 19:42:04 -05:00
MrGadget
f621a4aaf1
Added Serializable and SerializeField 2020-01-14 19:36:53 -05:00
MrGadget
98652e708f
Added Serializable and SerializeField 2020-01-14 19:32:39 -05:00
MrGadget
7011fade2d
Added public 2020-01-14 19:23:46 -05:00
MrGadget
503c722eb0
Added [System.Serializable] 2020-01-14 19:20:33 -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
Chris Langsenkamp
952855ef64 Restore Overview entries in TOC's 2019-12-30 04:35:18 -05: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
MrGadget
f09b06584e
Merge pull request #1313 from FirstGearGames/patch-7
Changedvideo link to video within playlist.
2019-12-16 17:30:43 -05:00
FirstGearGames
beca3dfd20
Added SyncVar hook video link. 2019-12-16 16:51:53 -05:00
FirstGearGames
0cabfff9c8
Changedvideo link to video within playlist. 2019-12-16 16:49:34 -05:00
Paul Pacheco
3e1d0bd147 doc: Improved alt for video tutorial 2019-12-14 14:16:07 -06:00
Paul Pacheco
39c934af54 docs:Use video tutorial image 2019-12-14 13:50:35 -06:00
FirstGearGames
3033ed7541 docs: Added video tutorial URL (#1308)
* Update SyncVars.md

* Update doc/Guides/Sync/SyncVars.md

Co-Authored-By: Paul Pacheco <paulpach@gmail.com>

* Update SyncVars.md

- Removed starting time from video URL.

* Resize image and move to the top

* Make video bigger
2019-12-14 10:23:52 -06:00
Robin Gustafsson
a8795b3449 Fix spelling mistakes 2019-12-07 23:31:48 +01:00
vis2k
13e2dcccd9
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)
* feature: 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.

* update tests

* update docs
2019-12-03 08:35:41 +01:00
Paul Pacheco
706fc23127 docs: explain what sync to owner does 2019-11-28 10:20:29 -06:00
Paul Pacheco
f5e2fd49ff docs: suggest custom data types instead of overriding OnSerialize 2019-11-28 10:01:44 -06:00
Chris Langsenkamp
ca0ec5e36c Doc formatting 2019-11-27 21:48:41 -05:00
Paul Pacheco
e02200c5fa docs: document how inheritance works with syncvars 2019-11-27 19:30:43 -06:00
gestewa
2f1458f3ff
Update index.md
Typo found in documentation, OnDeSerialize -> OnDeserialize
2019-11-24 13:59:17 -08: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
c6251bc15b SyncVar Limit is 64 per NetworkBehaviour 2019-10-03 08:13:39 -04:00
Chris Langsenkamp
4306e08eb5 updated code snip 2019-10-02 13:48:58 -04:00
Chris Langsenkamp
e71dd77f80 fixed code sample 2019-09-25 20:12:59 -04:00
Chris Langsenkamp
964c88e4be Eliminated Classes section 2019-09-20 23:34:03 -04:00