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:
1 parent
be6db5b0a9
commit
91ce8ff329
12 files changed
+227
-1284
No files matched your search
@@ -0,0 +1,74 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2945604797830805689
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 220258476003039388}
|
||||
- component: {fileID: 1422780962201790593}
|
||||
- component: {fileID: 4782589843340916272}
|
||||
m_Layer: 0
|
||||
m_Name: Spectator
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &220258476003039388
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2945604797830805689}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1422780962201790593
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2945604797830805689}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
|
||||
GlobalObjectIdHash: 92610583
|
||||
InScenePlacedSourceGlobalObjectIdHash: 0
|
||||
DeferredDespawnTick: 0
|
||||
Ownership: 1
|
||||
AlwaysReplicateAsRoot: 0
|
||||
SynchronizeTransform: 1
|
||||
<InScenePlaced>k__BackingField: 0
|
||||
ActiveSceneSynchronization: 0
|
||||
SceneMigrationSynchronization: 0
|
||||
SpawnWithObservers: 1
|
||||
DontDestroyWithOwner: 0
|
||||
AutoObjectParentSync: 1
|
||||
SyncOwnerTransformWhenParented: 1
|
||||
AllowOwnerToParent: 0
|
||||
--- !u!114 &4782589843340916272
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2945604797830805689}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: afc5afb485e7fdb4e94dec910509cc97, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::SpectatorSetup
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
Reference in new issue
Block a user