1.0.0-master
1.0.0 (2020-07-16)
breaking
- AsyncFallbackTransport -> FallbackTransport (f8f643a)
- AsyncMultiplexTransport -> MultiplexTransport (832b7f9)
- Rename [Command] to [ServerRpc] (#271) (fff7459)
- rename AsyncWsTransport -> WsTransport (9c394bc)
- Transports can now provide their Uri (#1454) (b916064), closes #38
Bug Fixes
- (again) Telepathy updated to latest version (Send SocketExceptions now disconnect the player too) (46eddc0)
- #1241 - Telepathy updated to latest version. All tests are passing again. Thread.Interrupt was replaced by Abort+Join. (228b32e)
- #1278 - only call initial state SyncVar hooks on clients if the SyncVar value is different from the default one. (#1414) (a3ffd12)
- #1359. Revert "Destroy objects owned by this connection when disconnecting (#1179)" (4cc4279)
- #1380 - NetworkConnection.clientOwnedObjects changed from uint HashSet to NetworkIdentity HashSet for ease of use and to fix a bug where DestroyOwnedObjects wouldn't find a netId anymore in some cases. (a71ecdb)
- #1515 - StopHost now invokes OnServerDisconnected for the host client too (#1601) (678ac68)
- #1593 - NetworkRoomManager.ServerChangeScene doesn't destroy the world player before replacing the connection. otherwise ReplacePlayerForConnection removes authority form a destroyed object, causing all kidns of errors. The call wasn't actually needed. (#1594) (347cb53)
- #1599 - NetworkManager HUD calls StopHost/Server/Client depending on state. It does not call StopHost in all cases. (#1600) (8c6ae0f)
- #1659 Telepathy LateUpdate processes a limited amount of messages per tick to avoid deadlocks (#1830) (d3dccd7)
- #573 (part 1) NetworkScenePostProcess handles NetworkIdentities of all scenes except DontDestroyOnLoad. this way it works for additively loaded scenes too. (c1af84e)
- #573 (part 2) NetworkManager detects additive scene loads and respawns objects on server/client again (e521a20)
- #573 NullReferenceException because destroyed NetworkIdentities were never removed from sceneIds dict (a2d6317)
- #609 by spawning observers in NetworkServer.AddPlayerForConnection after setting the controller. There is no point in trying to spawn with a null controller in SetReady, because by definition no one can observer something that is null. (#623) (5c00577)
- #640 InternalReplacePlayerForConnection calls SpawnObserversForConnection now too (bdf12c8)
- #651 GetSceneAt assumes default scene (#654) (65eaba1)
- #652 OnPostProcessScene includes disabled NetworkIdentities in scene (ee2ace8)
- #679 package for unity (4a6a4df)
- #679 unity package (9895647)
- #692 by always adding connectionToClient when rebuilding observers (ab44ac8)
- #718 remove Tests folder from unitypackage (#827) (7e487af)
- #723 - NetworkTransform teleport works properly now (fd7dc5e)
- #791 corrected assembly paths passed to weaver (#803) (3ba546e)
- #791 stack overflow in the weaver (#792) (7b57830)
- #840 by allowing Mirror to respect the forceHidden flag (#893) (3ec3d02)
- add Changelog metadata fix #31 (c67de22)
- add client only test for FinishLoadScene (#262) (50e7fa6)
- Add missing channelId to NetworkConnectionToClient.Send calls (#1509) (b8bcd9a)
- add tests for NetworkTransform and NetworkRigidbody (#273) (e9621dd)
- Add the transport first so NetworkManager doesn't add Telepathy in OnValidate (bdec276)
- Added ClientOnly check (fb927f8)
- Added LogFilter.Debug check in a few places (#1575) (3156504)
- added new read/write symbol params (#806) (3a50ca6)
- Added WriteBytesAndSize tests, and fixed the function to be pedantic. (#773) (72e4e55)
- Adding warning when adding handler with RegisterSpawnHandler if assetid already exists (#1819) (7f26329)
- Adding warning when adding prefab with RegisterPrefab if assetid already exists (#1828) (9f59e0c)
- addingNetwork rigidbody icon and AddComponentMenu attribute (#2051) (ab1b92f)
- Additive scene can respawn objects safely (#1270) (8899d20)
- additive scene example (9fa0169)
- Additive Scene Example was missing Player Auth on movement. (#234) (09bbd68)
- additive scene player movement is client authoritative (e683a92)
- AdditiveSceneExample missing comp and assignments (#267) (ab394b8)
- Allow sync objects to be re-used (#1744) (58c89a3), closes #1714
- Allowing overrides for virtual commands to call base method (#1944) (b92da91)
- ArraySegment work in Messages (#919) (981ba7c)
- assign spawn locations and fix null refs in example (#242) (3adf343)
- AsyncTcp now exits normally when client disconnects (#141) (8896c4a)
- attributes causing a NRE (#69) (fc99c67)
- auto reference mirrorng assembly (93f8688)
- Avoid FindObjectOfType when not needed (#66) (e2a4afd)
- better error for Command, ClientRpc and TargetRpc marked as abstract (#1947) (62257d8)
- Better errors when trying to replace existing assetid (#1827) (822b041)
- build in IL2CPP (#1524) (59faa81), closes #1519 #1520
- call callback after update dictionary in host (#1476) (1736bb0)
- Call hooks when initializing objects OnStartServer on host (#1249) (7aa7815)
- call Obsoleted OnStartClient (#681) (8dea50e)
- call OnStartClient only once in room (#1264) (4d373c5)
- call the virtual OnRoomServerDisconnect before the base (e6881ef)
- calling base method when the first base class did not have the virtual method (#2014) (4af72c3)
- calling Connect and Authenticate handler twice (#102) (515f5a1)
- calling syncvar hook when not connected yet (#77) (e64727b)
- changing namespace to match folder name (#2037) (e36449c)
- chat example (e6e10a7)
- chat example works (0609d50)
- check event prefix (7417b68)
- Check SceneManager GetSceneByName and GetSceneByPath (#1684) (e7cfd5a)
- Clean up roomSlots on clients in NetworkRoomPlayer (5032ceb)
- Cleaning up network objects when server stops (#1864) (4c25122)
- cleanup the server even after error (#255) (7bd015e)
- clear all message handlers on Shutdown (#1829) (a6ab352)
- client being disconnected twice (#132) (36bb3a2)
- client disconnected on server event never raised (#133) (9d9efa0)
- ClientRpc methods now work accross assemblies (#1129) (13dbcb9), closes #1128
- Cmds can be called from child classes in other assemblies (d8a98d8), closes #1108
- code generation works with il2cpp again (#1056) (8738562)
- code smell rename Ready (#256) (6d92d14)
- Command and Rpc debugging information (#1551) (658847b), closes #1550
- comment punctuation (4d827cd)
- compilation error (df7baa4)
- compilation error (dc74256)
- compilation error on standalone build (bb70bf9)
- compilation issue after merge from mirror (daf07be)
- compilation issues (22bf925)
- comply with MIT license in upm package (b879bef)
- Decouple ChatWindow from player (#1429) (42a2f9b)
- Default port is 7777 (960c39d)
- destroy owned objects (#1352) (d7a58d2), closes #1346 #1206 #1351
- Destroyed NetMan due to singleton collision must not continue. (#1636) (d2a58a4)
- disconnect even if there is an exception (#152) (2eb9de6)
- disconnect properly from the server (c89bb51)
- disconnect transport without domain reload (20785b7)
- do not accumulate changes if there are no observers fixes #963 (#964) (64a0468)
- Do not call InternalAddPlayer twice (#1246) (7119dd1)
- don't call hook in host if no change, fixes #1142 (#1143) (d8ce80f)
- don't call OnStartLocalPlayer twice (#1263) (c753089)
- Don't call RegisterClientMessages every scene change (#1865) (05c119f)
- Don't call RegisterClientMessages twice (#1842) (2a08aac)
- don't convert null arrays to empty array (#913) (dd758ca)
- don't crash when stopping the client (f584388)
- Don't destroy the player twice (#1709) (cbc2a47)
- Don't disconnect host (#608) (c1707e5)
- Don't give host player authority by default (#1158) (1fc1ed2)
- Don't increment counter in Awake (#971) (45b7118)
- don't report error when stopping the server (c965d4b)
- Don't set asset id for scene objects (7e40232)
- Don't set framerate in host mode (4644bc4)
- Don't throw exception getting address (7df3ce3)
- don't use obsolete method (12437ba)
- Draw SyncVar label for Unity objects inline (#1291) (a0425e4)
- Dummy file for SyncListStructProcessor.cs (#798) (75e4f15)
- Eliminate NetworkAnimator SetTrigger double firing on Host (#1723) (e5b728f)
- empty scene name isn't considered as empty (ec3a939)
- error when there are no network behaviors (#1303) (dbe0643)
- error with missing assemblies (#1052) (00eb23a), closes #1051
- examples now work with prefabs in NC (df4149b)
- examples run in background (#233) (4755650)
- Fallback and Multiplex now disable their transports when they are disabled (#2048) (61d44b2)
- FinishLoadSceneHost calls FinishStart host which now calls StartHostClient AFTER server online scene was loaded. Previously there was a race condition where StartHostClient was called immediately in StartHost, before the scene change even finished. This was still from UNET. (df9c29a)
- first connection id = 1 (#60) (891dab9)
- fix adding and saving Components (2de7ecd)
- Fix error scene error message in host mode (838d4f0)
- fix release pipeline (2a3db0b)
- Fix Room Slots for clients (#1439) (268753c)
- Fixed Capitalization (c45deb8)
- Fixed ClienRpc typos (e946c79)
- Fixed NetworkRoomManager Template (1662c5a)
- Fixed toc link (3a0c7fb)
- Fixing ClientScene UnregisterPrefab (#1815) (9270765)
- Fixing SyncVars not serializing when OnSerialize is overridden (#1671) (c66c5a6)
- folders for meta files no longer in the codebase (#237) (192fd16)
- hasAuthority is now visible in all overrides (#1251) (2f19c7c), closes #1250
- headless build (7864e8d)
- headless build (ab47a45)
- hooks in host mode can call each other (#1017) (f27fd0b)
- Host Player Ready Race Condition (#1498) (4c4a52b)
- If socket is undefined it will return false. See #1486 (#2017) (4ffff19)
- Improved error checking for ClientScene.RegisterPrefab (#1823) (a0aa4f9)
- Improved error checking for ClientScene.RegisterPrefab with handler (#1841) (54071da)
- invalid scene id in 2019.1 by ignoring prefabs in NetworkScenePostProcess (203a823)
- Invoke server.Disconnected before identity is removed for its conn (#165) (b749c4b)
- isClient now reports true onStartServer in host mode (#1252) (d00c95b)
- isLocalPlayer is true during OnStartClient for Player (#1255) (fb26d00), closes #1250
- isLocalPlayer works in host mode onStartServer (#1253) (9acde20), closes #1250
- it is not safe to modify this outside this class (bc7a961)
- list server logs properly when disconnected (f02d317)
- ListServer Ping not found in WebGL (6c4b34b)
- Lobby Remove button not showing for P1 when Server Only (377c47c)
- maintain Unity's copyright notice (#961) (7718955)
- Make assembly definition 2018.4 compatible (99ecc9e)
- make build pass (08df6d0)
- Make SendToReady non-ambiguous (#1578) (b627779)
- making weaver include public fields in base classes in auto generated Read/Write (#1977) (3db57e5)
- Mark weaver as failed if serializing invalid type (03c767d)
- Message base class not being Serialized if processed in the wrong order (#2023) (3418fa2)
- MirrorNG works with 2019.2 (9f35d6b)
- Misc Code Smells (#257) (278a127)
- Misc code smells (#269) (23dcca6)
- missed ushort reader/writer (74faf2a)
- missing meta (87ace4d)
- Mono.CecilX namespace to work around Unity 2019 Cecil namespace collision (#832) (5262592)
- move listserver classes into package (2668b17)
- move NetworkStreamExtension in a namespace (12de543)
- movement in room demo (49f7904)
- MultiplexTransport GetMaxMessageSize NullReferenceException when called on server. And fixes potential exploits / out of sync issues where clients with different transports might see different game states because of different max message sizes. (#1332) (b3127be)
- Network rigidbody fixes (#2050) (0c30d33)
- NetworkBehaviour.SyncVarGameObjectEqual made protected again so that Weaver finds it again (165a1dd)
- NetworkBehaviour.SyncVarNetworkIdentityEqual made protected again so that Weaver finds it again (20a2d09)
- NetworkBehaviourInspector wouldn't show SyncMode if syncvars / syncobjects were only private (ed572da)
- NetworkClient.Shutdown calls ClientScene.Shutdown again to properly clean up client scene. ClientScene only cleans up itself without touching transport or NetworkIdentities (fixes the bug where the player object wouldn't be destroyed after calling StopClient) (fb716df)
- NetworkConnectionEvent should be serialized in editor (0e756ce)
- NetworkIdentity.OnStartLocalPlayer catches exceptions now too. fixes a potential bug where an exception in PlayerInventory.OnStartLocalPlayer would cause PlayerEquipment.OnStartLocalPlayer to not be called (5ed5f84)
- NetworkIdentity.RebuildObservers: added missing null check for observers coming from components that implement OnRebuildObservers. Previously this caused a NullReferenceException. (a5f495a)
- NetworkIdentity.SetClientOwner: overwriting the owner was still possible even though it shouldn't be. all caller functions double check and return early if it already has an owner, so we should do the same here. (548db52)
- NetworkManager OnValidate wouldn't properly save the automatically added Transport before because Undo.RecordObject is needed for that now. (524abfc)
- NetworkRoomManager.minPlayers is now protected so it's available for derived classes. (3179f08)
- NetworkServer.SpawnObjects: return false if server isn't running (d4d524d)
- NetworkTransform clientAuthority works again via clientAuthority option that is configurable in inspector. this had to be fixed after we removed local authority. (d712cd0)
- NinjaWS code smells (#272) (71d9428)
- no longer requires hook to be the first overload in a class (#1913) (0348699)
- non ready connections should not observe objects (1352334)
- not removing server if id is empty (#2078) (f717945)
- NRE on gamemanager in scene (#268) (58a124a)
- NRE when destroying all objects (#85) (71e78a7)
- null reference exception (7ce95c5)
- OnClientEnterRoom should only fire on clients (d9b7bb7)
- OnClientReady is called and passed the appropriate ready state value in NetworkLobbyPlayer (#618) (c9eac57)
- OnSetHostVisibility can now check if it has authority (888e46c)
- Optional Server or Client for PlayerSpawner (#231) (3fa5f89)
- overriden hooks are invoked (fixes #1581) (#1584) (cf55333)
- pack works if message is boxed (55c9bb6)
- pass the correct connection to TargetRpcs (#146) (9df2f79)
- Pass the name of the invoking class and desired command when an object has no authority. (#1216) (701f4f4)
- port network discovery (d6a1154)
- Potential DOS attack by sending invalid UTF8 byte sequences (#727) (3cee3ab)
- Potential DOS attack on server by sending packed ulongs when packed uints are expected. (#730) (015d0d5)
- potential exploits / out of sync issues where clients with different transports might see different game states because of different max message sizes when using FallbackTransport. (#1331) (5449840)
- potential null reference exception with debug logging (33493a0)
- Prevent Compiler Paradox (#1145) (fd43c67)
- Prevent Double Call of NetworkServer.Destroy (#1554) (2d1b142)
- Prevent host client redundantly changing to offline scene (b4511a0)
- prevent NRE when operating as a separated client and server (#283) (e10e198)
- properly detect NT rotation (#1516) (f0a993c)
- properly stop client and server in OnApplicationQuit so that clients still get a chance to send then 'quit' packet instead of just timing out. Also fixes a bug where OnStopServer/OnStopClient were not called when stopping the Editor. (#936) (d6389e6)
- race condition closing tcp connections (717f1f5)
- Re-enable transport if aborting additive load/unload (#1683) (bc37497)
- Rebuild observers when we switch scenes, fixes #978 (#1016) (6dd1350)
- release job requires node 10 (3f50e63)
- release unitypackage (#1355) (d0cc669)
- remove customHandling as its no longer used (#265) (dbd9d84)
- Remove leftover AddPlayer methods now that extraData is gone (#1751) (2d006fe)
- remove pause network comment and log (#238) (1a8c09d)
- Remove RoomPlayer from roomSlots on Disconnect (2a2f76c)
- remove samples from upm package (#25) (a71e21f)
- remove scriptableobject error Tests (479b78b)
- remove tests from npm package (#32) (5ed9b4f)
- remove Tests from UPM (#33) (8f42af0)
- remove Tests from upm package (#34) (8d8ea0f)
- Removed NetworkClient.Update because NetworkManager does it in LateUpdate (984945e)
- Removed NetworkServer.Listen because HostSetup does that (cf6823a)
- Removed unnecessary registration of player prefab in NetworkRoomManager (b2f52d7)
- Removed unused variable (ae3dc04)
- replace player (remove authority by default) (#1261) (ad724fe), closes #1257 #1257 #1257
- Replaced Icosphere with centered pivot (1dc0d98)
- ReplacePlayer now calls OnStartLocalPlayer (#1280) (0e1bc81), closes #962
- Replacing ClearDelegates with RemoveDelegates for test (#1971) (927c4de)
- Report correct channel to profiler in SendToObservers (0b84d4c)
- reset buffer every time (a8a62a6)
- Respect Player Prefab Position & Rotation (#825) (8ebda0f)
- return & continue on separate line (#1504) (61fdd89)
- Revert "NetworkClient.Shutdown: call ClientScene.Shutdown, otherwise it's never called" - caused client's player to not be removed from scene after disconnecting (13bb748)
- Revert "NetworkIdentity.observers dictionary is always created, but always empty on clients. Gets rid of all null checks." to fix server-only bug not allowing movement on client, e.g. in uMMORPG (f56507f)
- Revert "refactor: consolidate prefab and spawn handlers (#817)" to fix a bug where if editor=host, build=client, we receive scene object not found when walking out of and back into an observer's range (1f07af0)
- Room example to use new override (e1d1d41)
- rooms demo (44598e5)
- Round Robin Spawning by Hierarchy Order (#790) (531e202), closes #724
- SceneId was not set to 0 for prefab variants (#976) (#977) (2ca2c48)
- SceneManager Exceptions and Tests (#287) (388d218)
- SendToAll sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. (4b90aaf)
- SendToObservers missing result variable (9c09c26)
- SendToObservers sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. (4267983)
- SendToReady sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. (4596b19)
- set authority when replacing the player (2195fee)
- Set syncvar variables after calling the hook (#659) (2d63ee1)
- set version number (#1338) (0d1d7b5)
- show private serializable fields in network behavior inspector (#1557) (b8c87d9)
- smell cleanup left if bug. repaired with parenthesis. (#275) (dd52be3)
- Spawn Handler Order (#223) (8674274), closes #222
- spawnwithauthority works again in host mode (5b04836)
- stack overflow getting logger (55e075c)
- Stop calling ClientDisconnect on host (#597) (b67b3e4)
- StopHost with offline scene calls scene change twice (#1409) (a0c96f8)
- Suppress warning (fffd462)
- suppress warning on standalone build #1053 (4ef680a)
- Suspend server transport while changing scenes (#1169) (e8fac8a)
- sync events can not have the same name if they are in different classes (#2054) (c91308f)
- Sync full netAnimator for new clients, fix #980 (#1110) (db8310f)
- syncvars in commands work again (#1131) (c24a73f)
- syntax error in release job (2eeaea4)
- TargetRpc now works accross assemblies (#1130) (5ecd646), closes #1128
- tcp server Tests (3b95477)
- Telepathy already supports IPv6, but can no also connect to IPv4-only servers again (e.g. Mirror Booster) (488446a)
- Telepathy fix a bug where calling Disconnect while connecting to a dead end would freeze Unity because .Join would wait forever. Interrupt fixes it. (3831cbd)
- Telepathy forgot to set socket options for accepted clients on the server (22931fc)
- Telepathy reverted to older version to fix freezes when calling Client.Disconnect on some platforms like Windows 10 (d0d77b6)
- Telepathy updated to latest version (IPv6 fix again) (535b4d4)
- Telepathy updated to latest version (Send SocketExceptions now disconnect the player too) (98d3fb0)
- Telepathy updated to latest version: Correctly support IPv4 and IPv6 sockets (2761ff2)
- Telepathy updated to latest version: protect against allocation attacks via MaxMessageSize. Can be configured in the TelepathyTransport component now. (67d715f)
- Telepathy updated to latest version. connectionId counter is properly reset after stopping server. (abf06df)
- Telepathy updated to latest version. Threads are closed properly now. (4007423)
- Telepathy works on .net core again (cb3d9f0)
- TelepathyTransport.ToString UWP exception (8a190bf)
- the Room scene references other scenes (9b60871)
- there is no lobby example (b1e05ef)
- update NetworkIdentityEditor FindProperty to renamed variables (a2cc14b)
- Updated NetworkRoomPlayer inspector and doc and image (a4ffcbe)
- Updated Telepathy to latest version to fix IPAddress.Parse error for "localhost" (cc6e4f6)
- Use big endian for packet size (1ddcbec)
- Use path instead of name in Room Example (5d4bc47)
- Use ReplaceHandler instead of RegisterHandler in NetworkManager (ffc276c)
- version file (#1337) (ed7e509)
- weaver Cmd/Rpc/Target prefix check is no longer trash (#707) (699a261)
- weaver now processes multiple SyncEvent per class (#2055) (b316b35)
- weaver support array of custom types (#1470) (d0b0bc9)
- weaver syncLists now checks for SerializeItem in base class (#1768) (1af5b4e)
- webgl build fix #1136 (#1137) (c85d0df)
- Websockets Transport now handles being disabled for scene changes (#1994) (5480a58)
- WebSockets: Force KeepAliveInterval to Zero (9a42fe3)
- when modifying a prefab, Unity calls OnValidate for all scene objects based on that prefab, which caused Mirror to reset the sceneId because we only checked if a prefab is currently edited, not if THIS prefab is currently edited (db99dd7)
- workaround for #791 (5c850aa)
- Wrong method names in ClientSceneTests (ab3f353)
- serialization: Added NetworkWriter tests, found and fixed a bug in Write(Ray). (#769) (99c8f5c)
- tests: Added missing SyncListByteValid test file (#634) (b0af876)
- weaver: #696 detect .mystruct = new MyStruct() changes with syncvars (#702) (053949b)
- weaver: fix #706 find system dlls (#729) (53be9b6)
- weaver: fix #796, reload assemblies after initial import (#1106) (d91b387)
- websocket: #829 fix InvalidOperationException with wss:// (#830) (2d682b5)
- websocket: Remove send queues (they never worked) and SSL (temporarily) (#879) (3c60b08)
- websocket: Use a buffer for most WS messages in WebGL client resulting in 0 alloc for most messages (#848) (8967a20)
Code Refactoring
- Client and server keep their own spawned list (#71) (c2599e2)
- observers is now a set of connections (#74) (4848920)
- Remove networkAddress from NetworkManager (#67) (e89c32d)
- Remove offline/online scenes (#120) (a4c881a)
Features
- #869 support structs in other assemblies (#1022) (62d1887)
- Add excludeOwner option to ClientRpc (#1954) (864fdd5), closes #1963 #1962 #1961 #1960 #1959 #1958 #1957 #1956
- Add fallback transport (1b02796)
- Add Network Menu (#253) (d81f444)
- Add NetworkServer.RemovePlayerForConnection (#1772) (e3790c5)
- Add roomPlayer parameter to OnRoomServerCreateGamePlayer (#1317) (abf5cdc)
- Add Sensitivity to NetworkTransform (#1425) (f69f174)
- Add SyncHashSet and SyncSortedSet (#685) (695979e)
- add SyncList.RemoveAll (#1881) (eb7c87d)
- Add UPM configuration (#11) (9280af1)
- Add version to package file (#1361) (e97ab93)
- Add weaver support for Vector2Int and Vector3Int (#646) (e2a6ce9)
- Added NetworkConnection to OnRoomServerSceneLoadedForPlayer (b5dfcf4)
- Added Read Method to NetworkReader (#1480) (58df3fd)
- Added SyncList.Find and SyncList.FindAll (#1716) (0fe6328), closes #1710
- Added Virtual OnRoomStopServer to NetworkRoomManager and Script Template (d034ef6)
- Added virtual SyncVar hook for index in NetworkRoomPlayer (0c3e079)
- adding demo for mirror cloud services (#2026) (f1fdc95)
- Adding ignoreAuthority Option to Command (#1918) (3ace2c6)
- adding log handler that sets console color (#2001) (4623978)
- Adding onLocalPlayerChanged to ClientScene for when localPlayer is changed (#1920) (b4acf7d)
- adding OnRoomServerPlayersNotReady to NetworkRoomManager that is called when player ready changes and atleast 1 player is not ready (#1921) (9ae7fa2)
- Adding ReplaceHandler functions to NetworkServer and NetworkClient (#1775) (877f4e9)
- adding script that displays ping (#1975) (7e93030)
- additive scene msging added to server (#285) (bd7a17a)
- allow more than one NetworkManager (#135) (92968e4)
- Allow Multiple Network Animator (#1778) (34a76a2)
- allow Play mode options (f9afb64)
- allow users to detect mirror version 3 (ee9c737)
- Allowing extra base types to be used for SyncLists and other SyncObjects (#1729) (9bf816a)
- Allowing Multiple Concurrent Additive Scenes (#1697) (e32a9b6)
- An authenticator that times out other authenticators (#1211) (09f6892)
- async multiplex transport (#145) (c0e7e92)
- asynchronous transport (#134) (0e84f45)
- Authentication Framework (#1057) (56bcb02)
- Authenticators can now provide AuthenticationData (310ce81)
- awaitable connect (#55) (952e8a4)
- Block Play Mode and Builds for Weaver Errors (#1479) (0e80e19)
- Button to register all prefabs in NetworkClient (#179) (9f5f0b2)
- Chat example (#1305) (9926472)
- Check for client authority in CmdClientToServerSync (#1500) (8b359ff)
- Check for client authority in NetworkAnimator Cmd's (#1501) (ecc0659)
- Client attribute now throws error (#274) (f1b52f3)
- ClientRpc no longer need Rpc prefix (#2086) (eb93c34)
- ClientScene uses log window (b3656a9)
- Commands no longer need Cmd prefix (#2084) (b6d1d09)
- Commands no longer need to start with Cmd (#263) (9578e19)
- Component based NetworkSceneManager (#244) (7579d71)
- component based SyncToOwner, fixes #39 (#1023) (c6d86b3)
- connections can retrieve end point (#114) (d239718)
- Cosmetic Enhancement of Network Manager (#1512) (f53b12b)
- Creating method to replace all log handlers (#1880) (d8aaf76)
- custom reader/writer via extension methods (#1047) (b45afad)
- default log level option (#1728) (5c56adc)
- Disconnect Dead Clients (#1724) (a2eb666), closes #1753
- Disposable PooledNetworkReader / PooledNetworkWriter (#1490) (bb55baa)
- Example with 10k monster that change unfrequently (2b2e71c)
- Exclude fields from weaver's automatic Read/Write using System.NonSerialized attribute (#1727) (7f8733c)
- Experimental Network Transform (#1990) (7e2b733)
- Experimental NetworkRigidbody (#1822) (25285b1)
- fallback transport now supports uri (#1296) (e4a701e)
- generate serializers for IMessageBase structs (#1353) (3c0bc28)
- get a convenient property to get network time (1e8c2fe)
- HasAuthority attribute now throws error (#276) (da2355b)
- Implement IReadOnlyList in SyncLists (#903) (3eaaa77)
- Implemented NetworkReaderPool (#1464) (9257112)
- Improve weaver error messages (#1779) (bcd76c5)
- Improved Log Settings Window Appearance (#1885) (69b8451)
- Improved RoomPayer template (042b4e1)
- include generated changelog (#27) (a60f1ac)
- Include version in release (#1336) (e4f89cf)
- individual events for SyncDictionary (#112) (b3c1b16)
- individual events for SyncSet (#111) (261f5d6)
- LAN Network discovery (#1453) (e75b45f), closes #38
- LLAPI transport can receive port from uri (#1294) (7865a84)
- LocalPlayer attribute now throws error (#277) (15aa537)
- logger factory works for static classes by passing the type (f9328c7)
- logging api (#1611) (f2ccb59)
- LogSettings that can be saved and included in a build (#1863) (fd4357c)
- Mirror Icon for all components (#1452) (a7efb13)
- Mirror now supports message inheritance (#1286) (f9d34d5)
- More examples for Mirror Cloud Service (#2029) (7d0e907)
- Multiple Concurrent Additive Physics Scenes Example (#1686) (87c6ebc)
- Multiplex based on url (#1295) (c206f9a)
- Network Animator can reset triggers (#1420) (dffdf02)
- Network Scene Checker Component (#1271) (71c0d3b)
- network writer and reader now support uri (0c2556a)
- network writer pool to avoid expensive allocations (3659acb)
- network writer pool to avoid expensive allocations (#928) (f5e9318)
- NetworkAnimator warns if you use it incorrectly (#1424) (c30e4a9)
- NetworkClient raises event after authentication (#96) (c332271)
- NetworkConnection is optional for handlers (#1202) (bf9eb61)
- NetworkConnection manages messages handlers (#93) (5c79f0d)
- NetworkConnection to client and server use logger framework (72154f1)
- NetworkConnection uses logging framework (ec319a1)
- NetworkIdentity lifecycle events (#88) (9a7c572)
- NetworkIdentity use logger framework (2e39e13)
- NetworkMatchChecker Component (#1688) (21acf66), closes #1685 #1681 #1689
- NetworkSceneChecker use Scene instead of string name (#1496) (7bb80e3)
- NetworkServer uses new logging framework (8b4f105)
- NetworkServer.SendToReady (#1773) (f6545d4)
- new virtual OnStopServer called when object is unspawned (#1743) (d1695dd)
- new way to connect using uri (#1279) (7c3622c)
- new websocket transport (#156) (23c7b0d)
- next gen async transport (#106) (4a8dc67)
- now you can assign scenes even if not in Editor (#1576) (c8a1a5e)
- Now you can pass NetworkIdentity and GameObjects (#83) (dca2d40)
- onstopserver event in NetworkIdentity (#186) (eb81190)
- Pass all information to spawn handler (#1215) (d741bae)
- Piped connection (#138) (471a881)
- PlayerSpawner component (#123) (e8b933d)
- Prettify Log Names (c7d8c09)
- profiler info is available in production builds (5649cc6)
- Remove Command shortcut for host mode (#1168) (94eda38)
- safer and consistent writers names (#979) (b4077c1)
- Script Templates (#1217) (8cf6a07)
- Secure messages that require authentication, fixes #720 (#1089) (7ac43cd)
- Semantic release for UPM (#24) (8cbc005)
- Server and Client share the same scene loading method (#286) (acb6dd1)
- Server attribute now throws error (#270) (f3b5dc4)
- Server raises an event when it starts (#126) (d5b0a6f)
- ship as a unitypackage (11edc14)
- Show compile time error if overriding unused OnServerAddPlayer (#682) (a8599c1)
- Spawn objects in clients in same order as server (#247) (b786646)
- spawning invalid object now gives exception (e2fc829)
- support sending and receiving ArraySegment (#898) (e5eecbf)
- support writing and reading array segments (#918) (f9ff443)
- supports scriptable objects (4b8f819)
- supports scriptable objects (#1471) (0f10c72)
- Sync Events no longer need Event prefix (#2087) (ed40c2d)
- SyncDictionary can now be used for any IDictionary (#703) (2683572)
- SyncList now supports any IList implementation (#704) (040bcb4)
- SyncList.FindIndex added (#823) (b5ff43a)
- synclists has individual meaningful events (#109) (e326064), closes #103
- SyncSet and SyncDictionary now show in inspector (#1561) (5510711)
- SyncSet custom Equality Comparer support (#1147) (0f95185)
- SyncToOwner now works with authority (#1204) (92d0df7)
- TargetRpc no longer need Target prefix (#2085) (d89ac9f)
- telepathy can now receive port from uri (#1284) (06946cf)
- throw exception if assigning incorrect asset id (#250) (7741fb1)
- Time sync is now done per NetworkClient (b24542f)
- transport can provide their preferred scheme (774a07e)
- Transport can send to multiple connections at once (#1120) (bc7e116)
- transports can give server uri (#113) (dc700ec)
- Transports can have multiple uri (#292) (155a29c)
- Transports can tell if they are supported (#282) (890c6b8)
- Transports may support any number of schemes (#291) (2af7b9d)
- update upm package if tests pass (#21) (7447776)
- Use logger framework for NetworkClient (#1685) (6e92bf5)
- Use SortedDictionary for LogSettings (#1914) (7d4c0a9)
- user friendly weaver error (#896) (954a3d5)
- Users may provide custom serializers for any type (#1153) (9cb309e)
- Weaver can now automatically create Reader/Writer for types in a different assembly (#1708) (b1644ae), closes #1570
- websocket can receive port in url (#1287) (c8ad118)
- Websockets now give client address, fix #1121 (#1125) (c9f317d)
- scene: Add support for scene loading params (#644) (d48a375)
- syncvar: Add SyncDictionary (#602) (7d21bde)
- telepathy: Split MaxMessageSize to allow setting a different value for client and server (#749) (f0a8b5d)
- websocket: Re-enable native SSL (#965) (7ed4a9a)
Performance Improvements
-
AddPlayerMessage is now a value type (246a551)
-
allocation free enumerator for syncsets, fixes #1171 (#1173) (035e630)
-
allocation free syncdict foreach, fix #1172 (#1174) (1ec8910)
-
avoid allocation for error messages (c669ff1)
-
Avoid allocation when reading message payload (#912) (11750a9)
-
avoid boxing if there is no profiler (a351879)
-
Custom IEnumerator for SyncLists to avoid allocations on foreach (#904) (4ffd5a2)
-
don't varint bytes and shorts (4867415)
-
eliminate string concat during remote method calls (#908) (70a532b)
-
empty messages are value types now (145edaa)
-
MultiplexTransport: avoid Linq allocations that would happen on every packet send because Send calls .ServerActive() each time (7fe8888)
-
NetworkProximityChecker checks Server.connections instead of doing 10k sphere casts for 10k monsters. 2k NetworkTransforms demo is significantly faster. Stable 80fps instead of 500ms freezes in between. (#1852) (2d89f05)
-
Optimize interest management (f1ceb0c)
-
Pack small 32 bit negatives efficiently (480af1a)
-
Pack small 64 bit negatives efficiently (5f1ef4a)
-
Recycle argument writer to avoid allocations (#945) (9743216)
-
remove BinaryWriter, it allocates like crazy (#929) (7b3e82a)
-
remove network transform allocation (9e3ecc1)
-
replace isValueType with faster alternative (#1617) (61163ca), closes /github.com/vis2k/Mirror/issues/1614#issuecomment-605443808
-
return the contents of the writer as an array segment (#916) (ced3690)
-
reuse the network writer used for rpc parameters (5dafc4d)
-
simplify and speed up getting methods in weaver (c1cfc42)
-
spawn with client authority only takes 1 message (#1206) (3b9414f)
-
SpawnPrefabMessage is now a value type (a44efd1)
-
SpawnSceneObjectMessage is now a value type (40c7d97)
-
Transports now give ArraySegment instead of byte[] (based on #569 and #846) (77bee45)
-
use bitshift operations instead of division in varint (fff765c)
-
use byte[] directly instead of MemoryStream (#1618) (166b8c9)
-
Use RemoveAt to remove elements from lists (22b45f7)
-
remove NetworkConnection.isAuthenticated (#167) (8a0e0b3), closes #167
-
Remove NetworkConnectionToClient (#155) (bd95cea), closes #155
-
Server Disconnect is now an event not a message (#121) (82ebd71), closes #121
-
remove OnClientStart virtual (eb5242d)
-
merge clientscene and networkclient (#84) (dee1046), closes #84
-
Assign/Remove client authority now throws exception (7679d3b)
-
Removed LLAPI (b0c936c)
-
Remove all compiler defines (a394345)
-
Renamed localEulerAnglesSensitivity (#1474) (eee9692), closes #1474
-
Rename NetworkServer.localClientActive (7cd0894)
-
Simplify spawning (c87a38a)
-
Merge pull request #650 from vis2k/networkclient_static_2 (fac0542), closes #650
Reverts
- Revert "Revert "Explain why 10"" (d727e4f)
- Revert "Revert "perf: faster NetworkWriter pooling (#1616)"" (20e9e5d), closes #1616
- Revert "fix: replacing the player does not mean giving up authority (#1254)" (b8618d3), closes #1254
- Revert "feat: Add Timeout to NetworkAuthenticator (#1091)" (12c5a8f), closes #1091
- Revert "Remove add component from deprecated components (#1087)" (9f09c21), closes #1087
- Revert "Inserted blank lines where appropriate" (913d503)
- Revert "feat: Custom readers and writers" (07ef8c9)
- Revert "New Basic Example (#985)" (35b9919), closes #985
- Revert "fix: reduce allocations at the transport" (bb128fe)
- Revert "doc: messages can be struct now" (79f7c81)
- Revert "ClientScene.OnSpawnPrefab and NetworkManager.OnServerAddPlayerInternal: spawn objects with prefab names to avoid unnecessary "(Clone)" suffix from Unity. otherwise we need a name sync component in all games that show the names, e.g. MMOs for all monsters. This way we only need name sync components for objects that actually do change names, e.g. players." because of issue #426 (82d4cf0), closes #426
- Revert "Source based weaver (#319)" (9b232b0), closes #319
- Revert "Code style and comment typo fix." (#386) (dc3b767), closes #386
- Revert "Onserialize improvements (#302)" (00a3610), closes #302
- Revert "Documented the attributes." (9e3dcc7)
- Revert "Documented NetworkBehaviour and NetworkIdentity." (a5cfc81)
- Revert "Documented NetworkManager." (5bc44a9)
- Revert "Don't generate OnSerialize/OnDeserialize if not needed (#199)" (#217) (40a3ecc), closes #199 #217
- Revert "Don't require Cmd, Rpc and Target prefixes (#127)" (96992c3), closes #127
BREAKING CHANGES
-
rename AsyncMultiplexTransport -> MultiplexTransport
-
rename AsyncFallbackTransport -> FallbackTransport
-
rename AsyncWsTransport -> WsTransport
-
[LocalPlayerCallback] is now [LocalPlayer(error = false)]
-
Local Player guard
Co-authored-by: Paul Pacheco [email protected]
-
[ClientCallback] is now [Client(error = false)]
-
[HasAuthorityCallback] is now [HasAuthority(error = false)]
-
fix test
Co-authored-by: Paul Pacheco [email protected]
-
[ServerCallback] is now [Server(error = false)]
-
fixed weaver test
-
Remove unused code
-
fix comment
-
document replacement of ServerCallback
-
No need to be serializable
-
Exception should be serializable?
-
Fix code smell
-
No need to implement interface, parent does
Co-authored-by: Paul Pacheco [email protected]
-
Renamed [Command] to [ServerRpc]
-
NetworkManager no longer handles scene changes
-
Remove isAuthenticated
-
Fix typo
-
Fix smells
-
Remove smells
-
NetworkConneciton.RegisterHandler only needs message class
-
NetworkConnectionToClient and networkConnectionToServer are gone
-
connecition Id is gone
-
websocket transport does not work, needs to be replaced.
-
NetworkManager no longer has OnServerStart virtual
-
NetworkManager no longer spawns the player. You need to add PlayerSpawner component if you want that behavior
-
You will need to reassign your scenes after upgrade
-
Automatically fix properties that were using name
If you open a NetworkManager or other gameobject that uses a scene name
it now gets converted to scene path by the SceneDrawer
-
Use get scene by name
-
Scene can never be null
-
Update Assets/Mirror/Examples/AdditiveScenes/Scenes/MainScene.unity
-
Issue warning if we drop the scene
-
Issue error if scene is lost
-
Add suggestion on how to fix the error
-
Keep backwards compatibility, check for scene name
-
cache the active scene
-
Update Assets/Mirror/Editor/SceneDrawer.cs
Co-Authored-By: James Frowen [email protected]
-
GetSceneByName only works if scene is loaded
-
Remove unused using
Co-authored-by: James Frowen [email protected]
- Room feature and example are gone
- offline/online scenes are gone
- OnServerDisconnect is gone
- Removed OnStartClient virtual, use event from NetworkClient instead
- OnStopClient virtual is replaced by event in Client
- SyncDictionary callback has been replaced
- callback signature changed in SyncSet
- Sync lists no longer have a Callback event with an operation enum
- NetworkBehavior no longer has virtuals for lifecycle events
- ClientScene is gone
- removed obsoletes
- NetworkTime.Time is no longer static
- observers is now a set of connections, not a dictionary
- cannot pass GameObjects and NetworkIdentities anymore.
Will be restored in the future. - StartClient now receives the server ip
- NetworkManager no longer has Netw...