Replace stripped-player spectator with a minimal dedicated prefab

Mid-match joiners now spawn a dedicated empty Spectator prefab (NetworkObject
+ SpectatorSetup only) instead of a fully stripped Player prefab. The FreeCam
rig is a standalone scene object in Main, so the spectator needs no avatar body,
renderer, collider, or CharacterController -- eliminating the leftover-body
artifact and the fragile per-peer strip path entirely.

- SpectatorSetup.cs (new): owner binds GameModeManager.BindSpectator (FreeCam-only)
- Spectator.prefab (new): empty avatar (Transform + NetworkObject + SpectatorSetup),
  registered in DefaultNetworkPrefabs, wired on MatchManager in Main
- GameModeManager: add BindSpectator/BuildSpectatorModes; drop the spectator
  branch from BindLocalPlayer; ReleaseToNoPlayer frees the cursor on teardown
- MatchManager: independent entropy-seeded RNG for fair hunter pick (was sharing
  the global engine RNG and always landing on the same client); spawn the
  spectator prefab for mid-match joiners; cursor-safe return-to-Main teardown
- FreeCamController: guard IgnorePlayerCollision against a disabled capsule

Also bundled (unrelated user asset/UI edits): PaintHudPanel layout tuning,
font atlas (arialroundedmtprocyr_bold SDF), forestpack_foliage material.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-06-28 00:31:49 +02:00
1 parent be6db5b0a9
commit 91ce8ff329
12 files changed
+227 -1284

No files matched your search

+3
View File
@@ -486,10 +486,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c5a1205b169c81541ae07e8f32fd3673, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::MatchManager
mainSceneName: Main
lobbySceneName: Lobby
matchSceneName: Test Map
hunterPrefab: {fileID: 3510981371713521867, guid: cf153a3aea3d5da4f9d4cdbff0be8180, type: 3}
hiderPrefab: {fileID: 5508335275054701003, guid: 6b0b58e8352625343951db00beb8cb0a, type: 3}
spectatorPrefab: {fileID: 2945604797830805689, guid: 6e001668808a3d64680522e4c8d582b0, type: 3}
lobbySpawnCenter: {x: 0, y: 1, z: 0}
matchSpawnCenter: {x: 0, y: 1, z: 0}
--- !u!1 &330585543
GameObject: