Skip to content

Kick players with helpful error when starting scene isn't in gameconfig#719

Open
lukechatton wants to merge 1 commit intomainfrom
feature/invalid-starting-scene-kick
Open

Kick players with helpful error when starting scene isn't in gameconfig#719
lukechatton wants to merge 1 commit intomainfrom
feature/invalid-starting-scene-kick

Conversation

@lukechatton
Copy link
Member

@lukechatton lukechatton commented Feb 12, 2026

Summary

  • add startup-scene validation in server bootstrap before ServerChangeScene
  • if the configured startup scene cannot be resolved from published game scene bundles, mark the server with a startup-scene failure instead of trying to boot the scene
  • kick clients on join (during greeting / finished-preparing handshake) with a clear reason when startup-scene failure is present

Problem

Server transfers that target a scene not present in the game config/published scene set can leave the destination server in a broken boot state with poor diagnostics. This makes it hard for developers to identify that the root cause is an invalid transfer scene.

Result

Destination servers now fail gracefully for invalid startup scenes:

  • server does not attempt to load a missing scene
  • clients that join are explicitly kicked with an actionable error message indicating the scene is not in published game scenes / game config
  • behavior is easier to debug than a silent or opaque boot failure

Files Changed

  • Runtime/Code/Bootstrap/ServerBootstrap.cs
  • Runtime/Code/Bootstrap/ClientBundleLoader.cs

Risks

  • The bundle scene lookup code could be wrong and it's too hard to test locally. So I will need to roll this out while keeping an eye on things when deploying.
  • Dedicated mode in editor works fine.
  • Shouldn't be any change to RPC's so no risk of clients not being able to communicate with server.

@lukechatton
Copy link
Member Author

Just remembered I can totally test this on staging. I will do so before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant