Replace the connection-approval role selection with a server-authoritative match flow built on NGO additive scene management: - Scenes: Main is the persistent foundation (NetworkManager, GameModeManager, cameras, HUD); Lobby and Test Map load/unload additively. Add Lobby + Test Map to the build settings; remove the obsolete SampleScene. - MatchManager (plain MonoBehaviour singleton): loads Lobby on server start, StartMatchTrigger lets the host start the match, rolls one random Hunter (rest Hider), swaps Lobby -> Test Map (strictly serialized per NGO), respawns each player as its role variant. Forces additive client sync mode so clients keep Main instead of single-loading it (fixes "Destination scene is not valid"). - Server-driven spawning: null out NetworkConfig.PlayerPrefab at runtime to disable auto-spawn, then spawn players after the lobby floor exists (fixes falling through the floor) with double-spawn and transition guards. - StartMatchTrigger: server-gated OnTriggerEnter, only the host's own player starts the match. - NetworkBootstrap: drop role selection / connection approval; everyone spawns as the neutral Player prefab. Host/Client/Server/Shutdown buttons stay. - NetworkPlayerSetup.ScopedModes flag (baked on Hunter/Hider prefabs): lobby avatar gets the full mode set, match variants get the role-scoped set. - GameModeManager.BindLocalPlayer reads ScopedModes and rebinds the painter unconditionally (fixes stale painter binding on respawn -> brush painting in every mode). - MeshPainter.PaintingEnabled defaults to false (unbound/pre-spawn/remote never paints); PaintHud visibility now also gates on a bound painter (fixes the HUD showing at startup before any avatar exists). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
585 B
Plaintext
20 lines
585 B
Plaintext
%YAML 1.1
|
|
%TAG !u! tag:unity3d.com,2011:
|
|
--- !u!1045 &1
|
|
EditorBuildSettings:
|
|
m_ObjectHideFlags: 0
|
|
serializedVersion: 2
|
|
m_Scenes:
|
|
- enabled: 1
|
|
path: Assets/Scenes/Main.unity
|
|
guid: 99c9720ab356a0642a771bea13969a05
|
|
- enabled: 1
|
|
path: Assets/Scenes/Lobby.unity
|
|
guid: 3d1c04c698b4f32438a69661b90ff58b
|
|
- enabled: 1
|
|
path: Assets/Scenes/Test Map.unity
|
|
guid: 427f9e7bc57fb6e49a9233fc60022383
|
|
m_configObjects:
|
|
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
|
m_UseUCBPForAssetBundles: 0
|