Added Fog and other fixes

This commit is contained in:
2026-07-06 18:01:21 +03:00
parent fc837b2f9a
commit 72b48492cc
573 changed files with 397423 additions and 104 deletions
@@ -30,6 +30,7 @@ Transform:
m_LocalScale: {x: 1.4300001, y: 1.4300001, z: 1.4300001}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 4241303935150576162}
- {fileID: 6275691048546651888}
m_Father: {fileID: 2142486437948056408}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -83,12 +84,8 @@ Transform:
m_LocalScale: {x: 2.3, y: 2.3, z: 2.3}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 5654568607253032593}
- {fileID: 3465164562324571489}
- {fileID: 964461987450590075}
- {fileID: 526238810678627125}
- {fileID: 4537245042502648194}
- {fileID: 7069137824874474621}
- {fileID: 4629877846210905751}
- {fileID: 1126431882509735281}
m_Father: {fileID: 2264751121530880260}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &828714796444295574
@@ -117,12 +114,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 828714796444295574}
serializedVersion: 2
m_LocalRotation: {x: 0.000000021855694, y: 0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: -0.121375024, z: -0.04949999}
m_LocalRotation: {x: 0.000000021855694, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.12137502, z: -0.04949999}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 643528348970133323}
m_Father: {fileID: 4629877846210905751}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8511581684620864240
MeshFilter:
@@ -203,12 +200,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1205214087950268742}
serializedVersion: 2
m_LocalRotation: {x: 0.000000021855694, y: 0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0.03362499, z: 0.068}
m_LocalRotation: {x: 0.000000021855694, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.033625003, z: 0.06800001}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 643528348970133323}
m_Father: {fileID: 4629877846210905751}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &425729962511623310
MeshFilter:
@@ -289,12 +286,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1384727264422880376}
serializedVersion: 2
m_LocalRotation: {x: 0.000000021855694, y: 0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0.013624985, z: -0.082}
m_LocalRotation: {x: 0.000000021855694, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.013625001, z: -0.082}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 643528348970133323}
m_Father: {fileID: 4629877846210905751}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7011287180475166347
MeshFilter:
@@ -375,12 +372,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1642751575405675236}
serializedVersion: 2
m_LocalRotation: {x: 0.000000021855694, y: 0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: -0.12762499, z: -0.04949999}
m_LocalRotation: {x: 0.000000021855694, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.127625, z: -0.04949999}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 643528348970133323}
m_Father: {fileID: 4629877846210905751}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6161276569237105281
MeshFilter:
@@ -493,7 +490,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 389677881
GlobalObjectIdHash: 2748281708
InScenePlacedSourceGlobalObjectIdHash: 2748281708
DeferredDespawnTick: 0
Ownership: 1
@@ -593,6 +590,7 @@ MonoBehaviour:
MinSecondsBetweenUpdates: 0
MaxSecondsBetweenUpdates: 0
m_InternalValue: 0
pitImmunityDuration: 1
--- !u!114 &3924378418118045030
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -678,6 +676,11 @@ MonoBehaviour:
playerShoot: {fileID: 3924378418118045030}
playerShield: {fileID: 9223372036854775807}
playerUIController: {fileID: 0}
thirdPersonVisualRoot: {fileID: 0}
playerCamera: {fileID: 0}
playerHandCamera: {fileID: 0}
fpvHands: {fileID: 0}
tpvHands: {fileID: 0}
--- !u!114 &7845123456789012345
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -798,6 +801,9 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6852442680359315026}
- {fileID: 110710246835271599}
- {fileID: 4256298773231646051}
- {fileID: 1134071734113194381}
- {fileID: 8999780569168204246}
m_Father: {fileID: 2264751121530880260}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -819,7 +825,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &6852442680359315026
Transform:
m_ObjectHideFlags: 0
@@ -1109,12 +1115,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4435377287780094787}
serializedVersion: 2
m_LocalRotation: {x: 0.000000021855694, y: 0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: -0.00012500212, z: 0.010500014}
m_LocalRotation: {x: 0.000000021855694, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.00012501427, z: 0.010500006}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 643528348970133323}
m_Father: {fileID: 4629877846210905751}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6178688719613980825
MeshFilter:
@@ -1519,7 +1525,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &6275691048546651888
Transform:
m_ObjectHideFlags: 0
@@ -1876,12 +1882,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7503089222261149576}
serializedVersion: 2
m_LocalRotation: {x: 0.000000021855694, y: 0, z: -0, w: 1}
m_LocalPosition: {x: -0.000000044703484, y: 0.01862501, z: 0.041750014}
m_LocalRotation: {x: 0.000000021855694, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.018625, z: 0.04175002}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 643528348970133323}
m_Father: {fileID: 4629877846210905751}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4718299893093354087
MeshFilter:
@@ -2022,6 +2028,105 @@ MeshRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &8293172493494656696
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4629877846210905751}
m_Layer: 7
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &4629877846210905751
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8293172493494656696}
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:
- {fileID: 5654568607253032593}
- {fileID: 3465164562324571489}
- {fileID: 964461987450590075}
- {fileID: 526238810678627125}
- {fileID: 4537245042502648194}
- {fileID: 7069137824874474621}
m_Father: {fileID: 643528348970133323}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &2365125335679001341
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 5017856760505747688}
m_Modifications:
- target: {fileID: 1191243283007474980, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_Name
value: Eyes_Woble_01
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalPosition.y
value: 1.18
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
--- !u!4 &4256298773231646051 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2000712971001223070, guid: b0c1a33b06ea5ef4588fd6716b019981, type: 3}
m_PrefabInstance: {fileID: 2365125335679001341}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3128540855029970530
PrefabInstance:
m_ObjectHideFlags: 0
@@ -2105,3 +2210,283 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 6465249256851274223, guid: d5774d459f0f43d4591f34994be1404e, type: 3}
m_PrefabInstance: {fileID: 3128540855029970530}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3330501516580067093
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 5017856760505747688}
m_Modifications:
- target: {fileID: 2664674905337592320, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_Name
value: Mouth_Mustache_02
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalPosition.y
value: 1.121
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
--- !u!4 &110710246835271599 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3436531399995891898, guid: 9e026f66c59cc4743bebc7c6075a9ff5, type: 3}
m_PrefabInstance: {fileID: 3330501516580067093}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3427071568085399263
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 5017856760505747688}
m_Modifications:
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3132746089237757416, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
propertyPath: m_Name
value: Body_BW_01
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
--- !u!4 &1134071734113194381 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2320039167942387538, guid: a47d8c6a4628014429d0ebc1aea5b725, type: 3}
m_PrefabInstance: {fileID: 3427071568085399263}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &5394000751061335659
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 643528348970133323}
m_Modifications:
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalScale.x
value: 0.03
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalScale.y
value: 0.03
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalScale.z
value: 0.03
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: -927199367670048503, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_Name
value: bGUN01h
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
--- !u!4 &1126431882509735281 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
m_PrefabInstance: {fileID: 5394000751061335659}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &9198206121159194936
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 4744484706230885847}
m_Modifications:
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalScale.x
value: 0.03
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalScale.y
value: 0.03
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalScale.z
value: 0.03
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalPosition.x
value: -0.04
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalPosition.y
value: 0.02
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: -927199367670048503, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
propertyPath: m_Name
value: bGUN01h
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
--- !u!4 &4241303935150576162 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 616599f5bb9b98244bf44adfb851fb11, type: 3}
m_PrefabInstance: {fileID: 9198206121159194936}
m_PrefabAsset: {fileID: 0}
@@ -4,42 +4,126 @@ using System.Collections;
public class PlayerFacade : NetworkBehaviour
{
// [SerializeField] private PlayerController playerController;
private const string OwnerHiddenBodyLayerName = "OwnerHiddenBody";
[SerializeField] private PlayerMovement playerMovement;
[SerializeField] private PlayerHealth playerHealth;
[SerializeField] private PlayerShoot playerShoot;
[SerializeField] private PlayerShield playerShield;
[SerializeField] private PlayerUIController playerUIController;
public PlayerHealth PlayerHealth => playerHealth;
[Header("First / third person setup")]
[SerializeField] private Transform thirdPersonVisualRoot;
[SerializeField] private Camera playerCamera;
[SerializeField] private Camera playerHandCamera;
[SerializeField] private GameObject fpvHands;
[SerializeField] private GameObject tpvHands;
public PlayerHealth PlayerHealth => playerHealth;
private void Awake()
{
if (thirdPersonVisualRoot == null)
thirdPersonVisualRoot = transform.Find("Root");
Transform _cameraRoot = transform.Find("Camera");
if (playerCamera == null && _cameraRoot != null)
playerCamera = _cameraRoot.GetComponent<Camera>();
if (playerHandCamera == null && _cameraRoot != null)
playerHandCamera = _cameraRoot.Find("Camera-Hands")?.GetComponent<Camera>();
if (fpvHands == null && _cameraRoot != null)
fpvHands = _cameraRoot.Find("FPV-Hands")?.gameObject;
if (tpvHands == null)
tpvHands = transform.Find("TPV-Hands")?.gameObject;
}
public override void OnNetworkSpawn()
{
// Клон (GhostPlayer) — серверный объект. На хосте он считается IsOwner,
// из-за чего перехватывал HUD игрока. Игроковую логику на клоне не запускаем.
if(GetComponent<GhostPlayer>() != null) return;
if (GetComponent<GhostPlayer>() != null) return;
if(IsOwner)
SetupCamerasAndHands();
if (IsOwner)
HideOwnThirdPersonVisual();
if (IsOwner)
{
StartCoroutine(InitPlayerUIController());
if(playerMovement != null)
{
if (playerMovement != null)
playerMovement.Init();
}
if(playerShoot != null)
{
if (playerShoot != null)
playerShoot.Init();
}
if (playerShield != null)
playerShield.InitInput();
}
if(playerHealth != null)
{
if (playerHealth != null)
playerHealth.Init(IsServer);
}
private void SetupCamerasAndHands()
{
if (playerCamera != null)
{
playerCamera.enabled = IsOwner;
AudioListener _listener = playerCamera.GetComponent<AudioListener>();
if (_listener != null)
_listener.enabled = IsOwner;
}
if (playerHandCamera != null)
playerHandCamera.enabled = IsOwner;
if (fpvHands != null)
fpvHands.SetActive(IsOwner);
if (tpvHands != null)
tpvHands.SetActive(!IsOwner);
if (!IsOwner)
return;
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
int _hiddenLayer = LayerMask.NameToLayer(OwnerHiddenBodyLayerName);
if (playerCamera != null && _hiddenLayer >= 0)
playerCamera.cullingMask &= ~(1 << _hiddenLayer);
}
// Свой Root у владельца переводим на слой, который его FPV-камера не рисует.
// На других клиентах Root остаётся как в префабе — чужие тела видны.
// Слой меняется только локально у владельца, в сеть не уходит.
private void HideOwnThirdPersonVisual()
{
if (thirdPersonVisualRoot == null)
return;
int _hiddenLayer = LayerMask.NameToLayer(OwnerHiddenBodyLayerName);
if (_hiddenLayer < 0)
{
Debug.LogWarning($"Layer '{OwnerHiddenBodyLayerName}' is missing. Create it in Tags & Layers.");
return;
}
GameObject _shieldVisual = playerShield != null ? playerShield.ShieldVisual : null;
foreach (Transform _child in thirdPersonVisualRoot.GetComponentsInChildren<Transform>(true))
{
if (_shieldVisual != null &&
(_child.gameObject == _shieldVisual || _child.IsChildOf(_shieldVisual.transform)))
continue;
_child.gameObject.layer = _hiddenLayer;
}
}
@@ -51,9 +135,7 @@ public class PlayerFacade : NetworkBehaviour
return playerUIController != null;
});
if(playerUIController != null)
{
if (playerUIController != null)
playerUIController.Init(this);
}
}
}
@@ -17,6 +17,7 @@ public class PlayerShield : NetworkBehaviour
public bool IsShieldUp => isActive.Value;
public float MoveSpeedMultiplier => isActive.Value ? shieldMoveSpeedMultiplier : 1f;
public GameObject ShieldVisual => shieldVisual;
public override void OnNetworkSpawn()
{
@@ -1,6 +1,7 @@
using Unity.Netcode;
using UnityEngine;
[DefaultExecutionOrder(100)] // после PlayerMovement.LateUpdate (pitch камеры)
public class PlayerShoot : NetworkBehaviour
{
[SerializeField] float damageAmount = 10f;
@@ -24,7 +25,7 @@ public class PlayerShoot : NetworkBehaviour
weaponView = GetComponentInChildren<WeaponView>(true);
}
void Update()
private void LateUpdate()
{
if (!isActive) return;
@@ -33,40 +34,63 @@ public class PlayerShoot : NetworkBehaviour
if (Input.GetMouseButtonDown(0))
{
Vector3 _origin = cameraRoot.position;
Vector3 _direction = cameraRoot.forward;
weaponView?.PlayShoot();
ShootServerRpc(cameraRoot.position, cameraRoot.forward);
// Мгновенный фидбек на стреляющем клиенте — не ждём серверный ClientRpc
if (TryRaycastShot(_origin, _direction, out RaycastHit _predictedHit))
SpawnHitEffectLocal(_predictedHit.point);
ShootServerRpc(_origin, _direction);
}
}
[ServerRpc]
private void ShootServerRpc(Vector3 _origin, Vector3 _direction)
{
// Записываем выстрел для клона — ровно то, что пришло в RPC
GetComponent<GhostRecorder>()?.RecordShot(_origin, _direction);
Collider[] ownerColliders = GetComponentsInChildren<Collider>();
if (!TryRaycastShot(_origin, _direction, out RaycastHit _hit))
return;
if (Physics.Raycast(_origin, _direction, out RaycastHit _hit, range))
{
if (System.Array.Exists(ownerColliders, c => c == _hit.collider))
{
return;
}
PlayerHealth _targetHealth = _hit.collider.GetComponentInParent<PlayerHealth>();
if (_targetHealth != null)
_targetHealth.TakeDamage((int)damageAmount);
PlayerHealth _playerHealth = _hit.collider.GetComponentInParent<PlayerHealth>();
if (_playerHealth != null)
{
_playerHealth.TakeDamage((int)damageAmount);
}
SpawnHitEffectClientRpc(_hit.point);
}
SpawnHitEffectClientRpc(_hit.point);
}
[ClientRpc]
private void SpawnHitEffectClientRpc(Vector3 _hitPosition)
{
// Debug.Log($"Spawning hit effect at {_hitPosition}");
// Владелец уже показал эффект локально при клике
if (IsOwner) return;
SpawnHitEffectLocal(_hitPosition);
}
private bool TryRaycastShot(Vector3 _origin, Vector3 _direction, out RaycastHit _hit)
{
_hit = default;
if (!Physics.Raycast(_origin, _direction, out _hit, range))
return false;
Collider[] _ownerColliders = GetComponentsInChildren<Collider>();
for (int i = 0; i < _ownerColliders.Length; i++)
{
if (_ownerColliders[i] == _hit.collider)
return false;
}
return true;
}
private void SpawnHitEffectLocal(Vector3 _hitPosition)
{
if (hitEffectPrefab == null) return;
Instantiate(hitEffectPrefab, _hitPosition, Quaternion.identity);
}
}
}