Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: zhaohywork/Mirror

Tags

v66.0.8

Toggle v66.0.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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

v66.0.7

Toggle v66.0.7's commit message
fix: NetworkWriterExtensions:WriteTexture2D call WriteArray instead o…

…f Write

v66.0.6

Toggle v66.0.6's commit message
fix: MirrorNetworking#2705 NetworkClient.SpawnPrefab looks for spawn …

…handlers before looking for registered prefabs, instead of the other way around

v66.0.5

Toggle v66.0.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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

v66.0.4

Toggle v66.0.4's commit message
fix: MirrorNetworking#2972 ReadNetworkBehaviour now reads the correct…

… amount of data even if the NetworkIdentity has disappeared on the client.

added test to guarantee it never happens again.

v66.0.3

Toggle v66.0.3's commit message
fixed comment

v66.0.2

Toggle v66.0.2's commit message
fix: added Queue.TryDequeue extension for Unity 2019

v66.0.1

Toggle v66.0.1's commit message
fix: MirrorNetworking#2954 calling StopClient in host mode does not d…

…estroy other client's objects anymore

v66.0.0

Toggle v66.0.0's commit message
fix: NetworkStatistics Unity 2019 support (part two)

v65.0.1

Toggle v65.0.1's commit message
fix test