FirstGearGames / FishNet

FishNet: Unity Networking Evolved.
Other
1.39k stars 149 forks source link

Deployment on remote server causes sceneid error #707

Closed denisbieberneit closed 4 months ago

denisbieberneit commented 4 months ago

Important

If General, Description, and Replication are not completed the issue will be closed immediately.

General Unity version: 2023.2.9f1 Fish-Networking version: 4.3.5 Discord link: ** Above, post a link from our Discord where you troubleshot the issue (on Discord click the three dots next to the message, then Copy Message Link). Issue may be closed out if this is not included.

Description When clients are connecting to the remote server they are getting an error: "SceneId of xxxxx not found in SceneObjects" (Happening on new projects also) Clients are Spawning but scene objects are getting disabled. Informations about the setup: Using Playfab matchmaking with server allocation. Building server build for Linux. (Docker setup with ubuntu 18.04) Clients build for windows. Using 2 Scenes, 1 for the "Game" and one for the Menu. If a base project is needed I can share it, only a playfab setup would be required or I can share my desktop if the setup is not replicable.

Replication Steps to reproduce the behavior:

  1. Fresh install of Unity + Fishnet
  2. Install PlayfabSDK, PlayfabEditorExtension (For configs) and use MpsGsdk for Server functions in playfab.
  3. Create 2 Scenes, one game scene with FN base Networkmanager prefab + some scene objects with networkobject components
  4. Implement base playfab login + matchmaking, configure queue in playfab, enable server allocation on queue.
  5. rebuild scene ids
  6. build server build and upload to playfab, wait until deploy is done
  7. build clients and start them, start matchmaking and wait for the matchmaking to connect both clients. (2 is minimum for MM)
  8. see error in clients.

Expected behavior The error is not happening anymore and scene objects are not getting disabled

Screenshots Setup for Game scene Testobject 1-3 are networkobjects that are getting disabled once the clients connect. image

FirstGearGames commented 4 months ago

If the issue does not happen with two local builds then it's almost definitely playfab causing the problem.

The most likely scenario is there's a build mismatch between what is uploaded to playfab vs what is in your editor. SceneIds only generate when using the rebuild Ids menu, or when new scene objects are added - those new objects get Ids.

In other words, sceneIds should not be changing between editor vs build unless there is perhaps some reason the scene is not saving properly. Validate there are no warnings in editor after rebuilding sceneIds and saving the scene. Try uploading to another service and testing.

denisbieberneit commented 4 months ago

Not an FN issue, contacted Playfab without getting an answer, Build is now working without making any further changes so I think something happend in the backend?