Commit Graph

6407 Commits

Author SHA1 Message Date
vis2k
43baeff444
[SyncVar] GameObjects are now 100% based on their underlying netId field. Fixes #149 (#292)
* fix

* Test file

* Syntax

* NetworkBehaviour.Set/GetSyncVarNetworkIdentity functions added

* add definitions to weaver

* Use them

* add NetworkIdentity cases everywhere else too

* ProcessInstructionSetter/GetterField replaces for OnDeserialize too, so that [SyncVar]GameObjects/NetworkIdentities work with custom On(De)Serialize as well

* Custom on(De)serialize test

* Weaver.ProcessSiteMethod doesn't ignore OnDeserialize anymore either

* [SyncVar] GameObject/NetworkIdentity hooks work again

* testscene

* public gameobject field test

* pass gameobject field to getsyncvargameobject etc.

* GetSyncVarGameObject/NetworkIdentity always returns the field if server, looks up netId otherwise; functions aren't static anymore.

* Use original OnSerialize generation again, so it simply calls writer.Write(go) on server, which sends the netId internally anyway.

* fixed hooks not using 'this.' because getter function isn't static anymore.

* add scene referencing test

* remove tests
2019-01-14 23:39:29 +01:00
Paul Pacheco
3c0ff33c94 Additive sceneloading sceneid fix (#175)
* Fix additive scene loading causing duplicate sceneIds by using an offset per scene.

* TEST: moved SpawnableObjects to NetworkIdentity. OnDisable adds it to the dict. SpawnObject removes it.

* Log if we don't find the spawn scene object

* Fix compilation issues

* Make PrepareToSpawnSceneObjects public
2019-01-14 22:00:13 +01:00
Paul Pacheco
1785039601 2018.3 master prefab changes etc. (#283)
* 2018.3 warning fix. The old way to check if something is a porefab is depricated so needs replacing with new code.

* 2018.3 warning fix. The old way to check if something is a porefab is depricated so needs replacing with new code.

* Bug fix for 2018.3+ where NetworkIdentity GUIDs are set to blank in prefab files and shown as blank in the editor.

* Another 2018.3 warning fix. The old way to check if something is a porefab is depricated so needs replacing with new code.

* Make sure it works in 2017.4

* Change not needed

* Revert "Change not needed"

This reverts commit 13747739df.

* Mark LLAPI as obsolete

* Don't use obsolete api

* Suppress obsolete LLAPI warning for now

* Remove warning

* Make conditional a little clearer
2019-01-14 11:24:30 +01:00
Hertzole
012e1a1885 Fixed scene reload. 2019-01-13 19:19:47 -06:00
vis2k
266f262665 WeaverLists.replacedFields and replacementProperties merged into replacementSetterProperties dict for easier code and more obvious naming. 2019-01-13 21:21:11 +01:00
vis2k
4fa584e72a Weaver.ProcessInstructionField renamed to ProcessInstructionSetterField 2019-01-13 21:19:19 +01:00
Paul Pacheco
524c183294 Source based instead of dll (#277)
* Ignore unity generated files and folders

* Import mirror as source

* Source based does not build dlls anymore

* nuget packages not used in source based

* Produce an archive with the release

* generate archive with Mirror folder to avoid accidents

* Deploy to github releases

* Document new installation procedures
2019-01-13 21:08:54 +01:00