Closed maxkratt closed 6 months ago
There was no error displayed when building as development mode. The DebugManager is non-functioning when building as release. So the client is expecting debug, but the server is not sending it as intended. Let me know if I'm missing anything!
The bug is happen in release build connect to a development build.
https://discord.com/channels/424284635074134018/1034477094731784302/1231127923050680330
FishNet.Managing.Object.ManagedObjects.WriteSpawn_Server(NetworkObject nob, NetworkConnection connection, Writer writer) `#if DEVELOPMENT //Check to write additional information if a scene object. if (NetworkManager.DebugManager.WriteSceneObjectDetails) { headerWriter.WriteString(nob.gameObject.scene.name); headerWriter.WriteString(nob.gameObject.name); }
FishNet.Managing.Client.ClientObjects.WriteSpawn_Client(NetworkObject nob, Writer writer) ` if (sceneObject) { headerWriter.WriteUInt64(nob.SceneId, AutoPackType.Unpacked);
base.CheckWriteSceneObjectDetails(nob, headerWriter);
}`
Reader FishNet.Managing.Client.ClientObjects.CacheSpawn(PooledReader reader) ` if (sceneObject) { ReadSceneObject(reader, out sceneId);
base.CheckReadSceneObjectDetails(reader, ref sceneName, ref objectName);
}`
Notice the different in reading and writing ? The #if is different and does not cover the case release build connect to dev build. If different build connect is an intended behaviour, At least it should be noted somewhere ?
Here's where it wrote packet in picture
Here's where it read
I'm actually not sure if there's more issue similar to this case where like 'working in editor but outright fail in release build' "just build two release build" should be the solution but no, I think there's more issue in dedicated server build.
That's normal. Debug code doesn't run in release builds so the builds are different.
On Sat, May 4, 2024, 5:34 PM SackMaggie @.***> wrote:
The bug is happen in release build connect to a development build.
https://discord.com/channels/424284635074134018/1034477094731784302/1231127923050680330
— Reply to this email directly, view it on GitHub https://github.com/FirstGearGames/FishNet/issues/642#issuecomment-2094404135, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGPJC3U5WSOMWEWHMZRIB3TZAVH4PAVCNFSM6AAAAABF2T5V5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGQYDIMJTGU . You are receiving this because you modified the open/close state.Message ID: @.***>
Alright If you said so, But to prevent this issue there should be some error printing when client connect and on a different build that hey this is not supported, should save a lot of frustration/time.
I agree. I was actually thinking about this moments after your previous comment. I've done just this for the FishNet version in the next release, I can piggyback off the same code for this too.
Added and tested working in next release, 4.3.0
General Unity version: 2021.3.33f1 Fish-Networking version: 4.1.6 Discord link: https://discord.com/channels/424284635074134018/1217847853314080820/1217907567456424006 Credit to rikusen0335 for creating the original example.
Description Using the DebugManager's "Write Scene Object Details" option can in some cases produce the following error:
Replication Steps to reproduce the behavior:
Example File DebugManagerError.zip
Video
https://github.com/FirstGearGames/FishNet/assets/60508288/5e6b8b4a-db52-4c61-b8b8-0594010c79b6