Commit Graph

890 Commits

Author SHA1 Message Date
vis2k
5b187fe0df Asset Store Examples added 2019-01-15 11:17:58 +01:00
vis2k
1f762afdcc Don't ignore ProjectSettings anymore (for Asset Store examples) 2019-01-15 10:56:45 +01:00
Ed
39da48a740 Changed syncInterval value is not saved - fix (#293)
syncInterval resets back to 0.1f (Value that is set in the NetworkBehaviour class) if changed using the editor. The issue is present when changing both, scene objects as well as prefabs.
2019-01-15 10:07:33 +01:00
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
Chris Langsenkamp
1a44f6ed38 Added page content 2019-01-11 22:58:26 -06:00
Chris Langsenkamp
1259ef9396 Added link to Deprecations page 2019-01-11 16:28:18 -06:00
Chris Langsenkamp
f59aad7e53 Added missing links 2019-01-08 22:49:32 -06:00
Robin Rolf
ae717810c0 Corrected doc for OnClientConnect
It used to mention it being called on the server, which is false
2019-01-08 16:49:07 -06:00
Robin Rolf
c490d9faa0 Correct order of Destroy in RemovePlayer (#262)
The RemovePlayerController call sets the playerController to null, causing a null dereference  (and a memory leak as pointed out by @paulpach, since gameobjects are never destroyed)
2019-01-08 22:12:17 +01:00
Chris Langsenkamp
eaa506fb26 Fixed formatting 2019-01-07 12:45:28 -06:00
Chris Langsenkamp
847759e055 Rename SyncVarHook to SyncVarHook.md 2019-01-07 12:40:30 -06:00
Chris Langsenkamp
cded1c41f8 Added entry for Insight 2019-01-07 11:11:26 -06:00
Chris Langsenkamp
bbaaffdae2 Create page for Insight 2019-01-07 11:11:06 -06:00
Chris Langsenkamp
e0fd799100 added cs to code markdown 2019-01-07 11:10:41 -06:00
Chris Langsenkamp
d7e3f79800 Added link to SyncVarHook 2019-01-07 11:10:19 -06:00
Chris Langsenkamp
f063f40544 Added link for Insight 2019-01-07 11:10:05 -06:00
Chris Langsenkamp
a4783094bd Create SyncVar Hook page 2019-01-07 11:09:35 -06:00
vis2k
4befafb3b8 Updated Telepathy to latest version (doesn't handle maxconnections anymore) 2019-01-07 12:12:48 +01:00
vis2k
67e6300a06 Handle MaxConnections in Mirror instead of Transports. Allows less complexity in Transports; allows a 'kickedBecauseFull' message or similar later 2019-01-07 11:41:59 +01:00
vis2k
bc4292908e Telepathy updated to latest version (Send is not blocking anymore) 2019-01-07 11:31:04 +01:00
Chris Langsenkamp
4d837542e4 Added Description Content 2019-01-06 21:48:05 -06:00
Chris Langsenkamp
c5a949eec1 Added descriptions to transports 2019-01-06 21:47:16 -06:00
Paul Pacheco
01f859c34d localConnections is no more 2019-01-06 09:52:17 -06:00
vis2k
86d41e73cb NetworkAnimator: use else-if and remove some unnecessary empty lines 2019-01-06 16:39:09 +01:00
vis2k
816a5602fc
Update CONTRIBUTING.md 2019-01-06 16:05:26 +01:00
vis2k
8b151e71cf NetworkManager.OnValidate: no need to artificially limit max connections 2019-01-06 15:47:37 +01:00
MichalPetryka
430e6bc6a7 Changed ports to be ushorts instead of ints (#246)
* Changed port to ushort

* Fix transports
2019-01-06 14:54:58 +01:00
Paul Pacheco
27a99cbcae
ensure future c# code has consistent EOL 2019-01-05 10:09:05 -06:00
Paul Pacheco
316fdddac9
Add Documentation badge 2019-01-05 09:48:31 -06:00
vis2k
ea0d15d2d1 Fix Rider error because of error message format 2019-01-05 01:11:17 +01:00
Paul Pacheco
807e1d9287 Specify bundler version 2019-01-04 08:08:11 -06:00
vis2k
65f338b318
NetworkTransform reimplemented (#236)
* NetworkTransform reimplemented

* Replace FindLocalObject with NetworkIdentity.spawned

* Syntax

* Comment typo

* Fix comment

* Tests

* Remove 'Some' compression option because Much is good enough

* Added comment
2019-01-04 13:12:08 +01:00
vis2k
83ab0d100e Removed AssemblyInfo from Weaver too 2019-01-03 21:22:55 +01:00
vis2k
c97560d814 Removed remaining AssemblyInfo files 2019-01-03 17:04:33 +01:00
Matt Jaeger
4a3fc70d14 Add error message for missing parameter-less constructor (#233)
* Add error message for missing parameter-less constructor

* Add error message for missing parameter-less constructor
2019-01-02 21:56:00 -06:00
Paul Pacheco
eb1863a96c
Detect hash collisions in rpc registration (#231) 2019-01-02 19:32:47 -06:00
Paul Pacheco
92d35a6039 Unity version check (#229)
* Check unity version

* Simplify a little bit

* Improve error message
2019-01-02 21:04:02 +01:00
vis2k
c0658b2568 NetworkBehaviour.IsDirty uses >= for sync interval check to be 100% accurate 2019-01-02 20:19:20 +01:00
vis2k
7c03bc1eb2 SyncEventProcessor.ProcessEvents syntax simplified 2019-01-02 20:04:53 +01:00
vis2k
d0fa4505d8 TargetRpcProcessor.ProcessMethodsValidateTargetRpc simplified 2019-01-02 20:04:39 +01:00
vis2k
c964ef7855 RpcProcessor.ProcessMethodsValidateRpc simplified 2019-01-02 20:04:02 +01:00
vis2k
476af23829 CommandProcessor.ProcessMethodsValidateCommand simplified 2019-01-02 20:01:42 +01:00
vis2k
be86ac5096 NetworkBehaviourProcessor: removed unused HasMethod function 2019-01-02 19:56:45 +01:00
MichalPetryka
7d905626ae Weaver - ?: (#225)
* ?:

* Pauls suggestion

* Update Weaver.cs
2019-01-02 19:26:05 +01:00