github MirageNet/Mirage 1.0.0-master

latest releases: v149.2.0, v149.1.1, v149.1.0...
4 years ago

1.0.0 (2020-01-04)

Bug Fixes

  • (again) Telepathy updated to latest version (Send SocketExceptions now disconnect the player too) (46eddc0)
  • #1359. Revert "Destroy objects owned by this connection when disconnecting (#1179)" (4cc4279)
  • #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)
  • #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)
  • added new read/write symbol params (#806) (3a50ca6)
  • Added WriteBytesAndSize tests, and fixed the function to be pedantic. (#773) (72e4e55)
  • Additive scene can respawn objects safely (#1270) (8899d20)
  • ArraySegment work in Messages (#919) (981ba7c)
  • Call hooks when initializing objects OnStartServer on host (#1249) (7aa7815)
  • call Obsoleted OnStartClient (#681) (8dea50e)
  • call OnStartClient only once in room (#1264) (4d373c5)
  • check event prefix (7417b68)
  • 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)
  • destroy owned objects (#1352) (d7a58d2), closes #1346 #1206 #1351
  • 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 convert null arrays to empty array (#913) (dd758ca)
  • 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 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)
  • error when there are no network behaviors (#1303) (dbe0643)
  • error with missing assemblies (#1052) (00eb23a), closes #1051
  • Fix error scene error message in host mode (838d4f0)
  • hasAuthority is now visible in all overrides (#1251) (2f19c7c), closes #1250
  • hooks in host mode can call each other (#1017) (f27fd0b)
  • invalid scene id in 2019.1 by ignoring prefabs in NetworkScenePostProcess (203a823)
  • 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)
  • Mark weaver as failed if serializing invalid type (03c767d)
  • missed ushort reader/writer (74faf2a)
  • 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)
  • 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)
  • 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)
  • NetworkManager OnValidate wouldn't properly save the automatically added Transport before because Undo.RecordObject is needed for that now. (524abfc)
  • NetworkTransform clientAuthority works again via clientAuthority option that is configurable in inspector. this had to be fixed after we removed local authority. (d712cd0)
  • non ready connections should not observe objects (1352334)
  • null reference exception (7ce95c5)
  • OnClientReady is called and passed the appropriate ready state value in NetworkLobbyPlayer (#618) (c9eac57)
  • OnSetHostVisibility can now check if it has authority (888e46c)
  • pack works if message is boxed (55c9bb6)
  • Pass the name of the invoking class and desired command when an object has no authority. (#1216) (701f4f4)
  • 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)
  • 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)
  • Rebuild observers when we switch scenes, fixes #978 (#1016) (6dd1350)
  • reduce allocations at the transport (80e4f17)
  • release unitypackage (#1355) (d0cc669)
  • remove samples from upm package (#25) (a71e21f)
  • replace player (remove authority by default) (#1261) (ad724fe), closes #1257 #1257 #1257
  • ReplacePlayer now calls OnStartLocalPlayer (#1280) (0e1bc81), closes #962
  • replacing the player does not mean giving up authority (#1254) (a2c273e)
  • Respect Player Prefab Position & Rotation (#825) (8ebda0f)
  • 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)
  • Round Robin Spawning by Hierarchy Order (#790) (531e202), closes #724
  • SceneId was not set to 0 for prefab variants (#976) (#977) (2ca2c48)
  • set authority when replacing the player (2195fee)
  • Set syncvar variables after calling the hook (#659) (2d63ee1)
  • set version number (#1338) (0d1d7b5)
  • spawnwithauthority works again in host mode (5b04836)
  • Stop calling ClientDisconnect on host (#597) (b67b3e4)
  • suppress warning on standalone build #1053 (4ef680a)
  • Suspend server transport while changing scenes (#1169) (e8fac8a)
  • Sync full netAnimator for new clients, fix #980 (#1110) (db8310f)
  • syncvars in commands work again (#1131) (c24a73f)
  • TargetRpc now works accross assemblies (#1130) (5ecd646), closes #1128
  • 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 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. connectionId counter is properly reset after stopping server. (abf06df)
  • TelepathyTransport.ToString UWP exception (8a190bf)
  • Updated Telepathy to latest version to fix IPAddress.Parse error for "localhost" (cc6e4f6)
  • version file (#1337) (ed7e509)
  • webgl build fix #1136 (#1137) (c85d0df)
  • 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)
  • 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)
  • Telepathy updated to latest version: protect against allocation attacks via MaxMessageSize. Can be configured in the TelepathyTransport component now. (67d715f)
  • update NetworkIdentityEditor FindProperty to renamed variables (a2cc14b)
  • weaver Cmd/Rpc/Target prefix check is no longer trash (#707) (699a261)
  • workaround for #791 (5c850aa)

Features

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 allocation with message structs (#939) (7c7c910)

  • avoid boxing for getting message id (#1144) (9513842)

  • avoid boxing if there is no profiler (a351879)

  • ClientAuthorityMessage is now a value type (#991) (d071438)

  • Custom IEnumerator for SyncLists to avoid allocations on foreach (#904) (4ffd5a2)

  • don't varint bytes and shorts (4867415)

  • eliminate boxing with lists (#901) (8f6d4cb)

  • eliminate small allocation on remote calls (#907) (1c18743)

  • eliminate string concat during remote method calls (#908) (70a532b)

  • empty messages are value types now (145edaa)

  • messages should be value types (#987) (633fb19)

  • MultiplexTransport: avoid Linq allocations that would happen on every packet send because Send calls .ServerActive() each time (7fe8888)

  • Networkreader nonalloc (#910) (18f035d)

  • objdestroy message is now a value type (#993) (a32c5a9)

  • ObjHideMessage is now a value type (#992) (a49d938)

  • OnDeserializeSafely without GC (#804) (27b7e25)

  • Optimize interest management (f1ceb0c)

  • Optimize interest management (#899) (ff1a234)

  • Pack small 32 bit negatives efficiently (480af1a)

  • Pack small 64 bit negatives efficiently (5f1ef4a)

  • Recycle argument writer to avoid allocations (#945) (9743216)

  • Reduce enum bandwidth (#794) (97e9ac2)

  • remove allocations during syncvar sync (#946) (d2381ce)

  • remove BinaryWriter, it allocates like crazy (#929) (7b3e82a)

  • remove network transform allocation (9e3ecc1)

  • remove syncvar boxing (#927) (b2ba589)

  • return the contents of the writer as an array segment (#916) (ced3690)

  • reuse the network writer used for rpc parameters (5dafc4d)

  • rpc messages are now value types (#997) (b5b2f3e)

  • SceneMessage is now a value type (#989) (407b36a)

  • 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)

  • update vars is now a value type (#990) (f99e71e)

  • Use 0 for null byte arrays (#925) (21ca49d)

  • use 0 for null strings (#926) (7181cd9)

  • use bitshift operations instead of division in varint (fff765c)

  • Use RemoveAt to remove elements from lists (22b45f7)

  • use value types for empty messages (#988) (81d915e)

  • Use WritePackedUInt32 in SyncList (#688) (2db7576)

  • Merge pull request #650 from vis2k/networkclient_static_2 (fac0542), closes #650

BREAKING CHANGES

  • Remove obsolete OnServerAddPlayer

Any person that overrides this method has a broken game. These methods are never called anywhere.

The user gets a warning because they are overriding an obsolete method, which might get ignored if they have lots of other warnings. They would run their game and their game would not work at all. No errors.

By removing these methods, users that override these methods will get a compile time error instead. So they cannot ignore this error and they will fix it.

  • Method is no longer available in NetworkLobbyManager
  • Make NetworkClient Great Again!

Don't miss a new Mirage release

NewReleases is sending notifications on new releases.