Tags: cobject2014/Mirror
Tags
fix: MirrorNetworking#3144 Reader/Writer Sprite null support & test t… …o guarantee it never happens again
breaking: Removed Obsoletes (MirrorNetworking#3142) * Removed Experimental NetworkTransform * NetworkRoomManager: Removed Obsoletes * NetworkTransformBase: Removed Obsoletes * NetworkBehaviour: Removed Obsoletes * NetworkManager: Removed Obsoletes * NetworkServer: Removed Obsoletes * SyncObject: Removed Obsoletes * fixed comment * fixed XML comment
fix: MirrorNetworking#3138, 3135 revert Cmd/Rpc from 2 byte indices b… …ack to 4 byte function hashes for stability (MirrorNetworking#3139) * Revert "fix: Weaved static constructors need to always run (MirrorNetworking#3135)" This reverts commit b0624b2. * Revert "perf: Rpcs/Cmds functionHash bandwidth reduced from 4 => 2 bytes (with the potential for 1 byte VarInt) (MirrorNetworking#3119)" This reverts commit a868368. * comment
fix: Weaved static constructors need to always run (MirrorNetworking#… …3135) Static constructors are lazily called when the class is first "used" https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/static-constructors > It is called automatically before the first instance is created or any static members are referenced. This means, in particular circumstances, client and server may diverge on which classes they have "loaded" and thus the rpc index will be desynced One such example would be on-demand-loading of prefabs via custom spawn handlers: A game might not want to preload all its monster prefabs since there's quite many of them and it is practically impossible to encounter them all (or even a majority of them) in a single play session. So a custom spawn handler is used to load the monster prefabs on demand. All monsters would have the "Monster" NetworkBehaviour class, which would have a few RPCs on it. Since the monster prefabs are loaded ONLY when needed via a custom spawn handler and the Monster class itself isn't referenced or "loaded" by anything else other than the prefab, the monster classes static constructor will not have been called when a client first joins a game, while it may have been called on the server/host. This will in turn cause Rpc indexes to not match up between client/server By just forcing the static constructors to run via the [RuntimeInitializeOnLoadMethod] attribute this is not a problem anymore, since all static constructors are always run and all RPCs will always be registered by the time they are used
fix: MirrorNetworking#2705 NetworkClient.SpawnPrefab looks for spawn … …handlers before looking for registered prefabs, instead of the other way around
fix: MirrorNetworking#2060 serializing GameObjects / NetworkIdentitie… …s now throws an obvious exception for prefabs / unspawned objects (MirrorNetworking#3132) * fix: MirrorNetworking#2060 serializing GameObjects / NetworkIdentities now throws an obvious exception for prefabs / unspawned objects * NetworkWriter: WriteGameObject reuses WriteNetworkIdentity * warning instead of exception
PreviousNext