Add Hunter/Hider role selection on connect with role-scoped modes
Roles are chosen in the bootstrap dev panel before Host/Client. NGO
ConnectionApproval is enabled at runtime and maps the role payload to
the matching prefab variant per connection (Hunter/Hider), so each peer
spawns the correct avatar including the host.
- PlayerRole.cs (new): single source of truth enum { Hider, Hunter }.
- NetworkBootstrap.cs: role toggle, ConnectionApproval + role payload,
server ApprovalCheck mapping role -> PrefabIdHash.
- NetworkPlayerSetup.cs: serialized PlayerRole field + Role property.
- GameModeManager.cs: BuildModes(role) - Hunter -> [First Person, Paint],
Hider -> [Third Person, Paint, Free Cam]; binds role from spawned avatar.
- Hunter.prefab: role = Hunter override.
- SampleScene.unity: NetworkBootstrap prefab references wired.
Also includes user inspector scale tuning (Hunter 2.5->2.4, Hider 0.5->0.7).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
dec537a60f
commit
56caa0edd8
8 files changed
+138
-47
No files matched your search
@@ -1251,6 +1251,9 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NetworkBootstrap
|
||||
showGui: 1
|
||||
enableHotkeys: 1
|
||||
hunterPrefab: {fileID: 3510981371713521867, guid: cf153a3aea3d5da4f9d4cdbff0be8180, type: 3}
|
||||
hiderPrefab: {fileID: 5508335275054701003, guid: 6b0b58e8352625343951db00beb8cb0a, type: 3}
|
||||
selectedRole: 0
|
||||
--- !u!114 &284910515
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
Reference in new issue
Block a user