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
@@ -10,7 +10,7 @@ PrefabInstance:
|
||||
m_Modifications:
|
||||
- target: {fileID: 273411532115212066, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: scale
|
||||
value: 0.5
|
||||
value: 0.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1557561356852236266, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: GlobalObjectIdHash
|
||||
@@ -22,15 +22,15 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6997860362608943113, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 0.5
|
||||
value: 0.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6997860362608943113, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 0.5
|
||||
value: 0.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6997860362608943113, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 0.5
|
||||
value: 0.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6997860362608943113, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
||||
@@ -10,7 +10,7 @@ PrefabInstance:
|
||||
m_Modifications:
|
||||
- target: {fileID: 273411532115212066, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: scale
|
||||
value: 2.5
|
||||
value: 2.4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1035623159758896108, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: sprintSpeedMultiplier
|
||||
@@ -26,15 +26,15 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6997860362608943113, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 2.5
|
||||
value: 2.4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6997860362608943113, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 2.5
|
||||
value: 2.4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6997860362608943113, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 2.5
|
||||
value: 2.4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6997860362608943113, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@@ -76,6 +76,10 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8574096554986372233, guid: 97017ed3bb40aff4e885440d9a7336ee, type: 3}
|
||||
propertyPath: role
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
|
||||
Reference in new issue
Block a user