#[Hot Patch] No reader writer found for custom NetworkMessage, class, struct.

15 messages · Page 1 of 1 (latest)

atomic quartz
#

First, UserSpawnInfo should be a struct, not a class. 2nd, the error indicates something is being excluded from the client build, that it doesn't understand what that is. Hot updates are fine for mono behaviours and art assets, but won't work for anything network related.

slow jungle
atomic quartz
#

I'm saying changes to network behaviours, network messages or objects with networking components probably cannot be hot patched

slow jungle
#

Ah that UserSpawnInfo did come from Network behaviour. It's also used in SyncVar

atomic quartz
#

right, and should be a struct, as I said

slow jungle
#

Sure I will change that

slow jungle
#

I am sorry to inform that even switching to struct, still not working for client build. 😭

No writer found for Player.UserSpawnInfo. This happens either if you are missing a NetworkWriter extension for your custom type, or if weaving failed. Try to reimport a script to weave again.
UnityEngine.StackTraceUtility:ExtractStackTrace()
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Mirror.SyncList`1:OnSerializeAll(NetworkWriter)
Mirror.NetworkBehaviour:OnSerialize(NetworkWriter, Boolean)
Mirror.NetworkBehaviour:Serialize(NetworkWriter, Boolean)
Mirror.NetworkIdentity:SerializeServer(Boolean, NetworkWriter, NetworkWriter)
Mirror.NetworkServer:SendSpawnMessage(NetworkIdentity, NetworkConnection)
Mirror.NetworkConnectionToClient:AddToObserving(NetworkIdentity)
Mirror.NetworkIdentity:AddObserver(NetworkConnectionToClient)
Mirror.NetworkServer:AddAllReadyServerConnectionsToObservers(NetworkIdentity)
Mirror.NetworkServer:SpawnObject(GameObject, NetworkConnection)
Mirror.NetworkServer:AddPlayerForConnection(NetworkConnectionToClient, GameObject)
Mirror.NetworkManager:OnServerAddPlayer(NetworkConnectionToClient)
Mirror.NetworkManager:OnServerAddPlayerInternal(NetworkConnectionToClient, AddPlayerMessage)
Mirror.<>c__DisplayClass8_0`2:<WrapHandler>b__0(NetworkConnection, NetworkReader, Int32)
Mirror.NetworkServer:OnTransportData(Int32, ArraySegment`1, Int32)
Mirror.LocalConnectionToServer:Send(ArraySegment`1, Int32)
Mirror.NetworkConnection:Send(T, Int32)
Mirror.NetworkClient:AddPlayer()
Mirror.LocalConnectionToServer:Update()
Mirror.NetworkClient:NetworkLateUpdate()
atomic quartz
slow jungle
#

Okay

atomic quartz
slow jungle
#

I need a couple sec.

The production cloud desktop cannot visit this website.

Let me write an example code. It also have that issue with a new unity project which has only HybridCLR and Mirror when I do some tests.

slow jungle
#

Works in Editor but not hot update client build.

#

I test with HybridCLR and Addressable turned off and drag the empty scene with the script into build settings. It works.