Fixed null exceptions and added loot boxes

This commit is contained in:
Hazim Bin Ijaz 2025-10-17 01:18:02 +05:00
parent 1fa07220c1
commit 5e269331e3
21 changed files with 5956 additions and 182 deletions

View File

@ -1690,6 +1690,10 @@ PrefabInstance:
propertyPath: SortKey propertyPath: SortKey
value: 4136410934 value: 4136410934
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Config
value: -1
objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Offset.y propertyPath: Offset.y
value: 0 value: 0
@ -1766,6 +1770,10 @@ PrefabInstance:
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 10 value: 10
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5990956033835523603, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Flags
value: 262145
objectReference: {fileID: 0}
- target: {fileID: 5990956033835523603, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 5990956033835523603, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: AoiMode propertyPath: AoiMode
value: 0 value: 0
@ -1900,7 +1908,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _initialWeapons.Array.size propertyPath: _initialWeapons.Array.size
value: 2 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _slots.Array.data[0].Active propertyPath: _slots.Array.data[0].Active

View File

@ -2890,6 +2890,10 @@ PrefabInstance:
propertyPath: SortKey propertyPath: SortKey
value: 4136410934 value: 4136410934
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Config
value: -1
objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Offset.y propertyPath: Offset.y
value: 0 value: 0
@ -3096,7 +3100,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _initialWeapons.Array.size propertyPath: _initialWeapons.Array.size
value: 2 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _slots.Array.data[0].Active propertyPath: _slots.Array.data[0].Active

View File

@ -2150,6 +2150,10 @@ PrefabInstance:
propertyPath: SortKey propertyPath: SortKey
value: 4136410934 value: 4136410934
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Config
value: -1
objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Offset.y propertyPath: Offset.y
value: 0 value: 0
@ -2364,7 +2368,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _initialWeapons.Array.size propertyPath: _initialWeapons.Array.size
value: 2 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _slots.Array.data[0].Active propertyPath: _slots.Array.data[0].Active

View File

@ -2150,6 +2150,10 @@ PrefabInstance:
propertyPath: SortKey propertyPath: SortKey
value: 4136410934 value: 4136410934
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Config
value: -1
objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Offset.y propertyPath: Offset.y
value: 0 value: 0
@ -2364,7 +2368,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _initialWeapons.Array.size propertyPath: _initialWeapons.Array.size
value: 2 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _slots.Array.data[0].Active propertyPath: _slots.Array.data[0].Active

View File

@ -1644,6 +1644,10 @@ PrefabInstance:
propertyPath: SortKey propertyPath: SortKey
value: 4136410934 value: 4136410934
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Config
value: -1
objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Offset.y propertyPath: Offset.y
value: 0 value: 0
@ -1858,7 +1862,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _initialWeapons.Array.size propertyPath: _initialWeapons.Array.size
value: 2 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _slots.Array.data[0].Active propertyPath: _slots.Array.data[0].Active

View File

@ -1644,6 +1644,10 @@ PrefabInstance:
propertyPath: SortKey propertyPath: SortKey
value: 4136410934 value: 4136410934
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Config
value: -1
objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Offset.y propertyPath: Offset.y
value: 0 value: 0
@ -1818,7 +1822,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _initialWeapons.Array.size propertyPath: _initialWeapons.Array.size
value: 2 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _slots.Array.data[0].Active propertyPath: _slots.Array.data[0].Active

View File

@ -2482,6 +2482,10 @@ PrefabInstance:
propertyPath: SortKey propertyPath: SortKey
value: 4136410934 value: 4136410934
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Config
value: -1
objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Offset.y propertyPath: Offset.y
value: 0 value: 0
@ -2628,7 +2632,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7625200539080901463, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 7625200539080901463, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: ChillGuy 1 value: Pepe
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7669839113013824676, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 7669839113013824676, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Flags propertyPath: Flags

View File

@ -1690,6 +1690,10 @@ PrefabInstance:
propertyPath: SortKey propertyPath: SortKey
value: 4136410934 value: 4136410934
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Config
value: -1
objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Offset.y propertyPath: Offset.y
value: 0 value: 0
@ -1864,7 +1868,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6749243822846010147, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 6749243822846010147, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6948698316688109637, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 6948698316688109637, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Flags propertyPath: Flags
@ -1904,7 +1908,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _initialWeapons.Array.size propertyPath: _initialWeapons.Array.size
value: 2 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _slots.Array.data[0].Active propertyPath: _slots.Array.data[0].Active

View File

@ -1598,6 +1598,10 @@ PrefabInstance:
propertyPath: SortKey propertyPath: SortKey
value: 4136410934 value: 4136410934
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Config
value: -1
objectReference: {fileID: 0}
- target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 1018819908989435078, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: Offset.y propertyPath: Offset.y
value: 0 value: 0
@ -1804,7 +1808,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _initialWeapons.Array.size propertyPath: _initialWeapons.Array.size
value: 2 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3} - target: {fileID: 8019168302190258968, guid: c17b47fcacdfc8d4b80809005a2b2555, type: 3}
propertyPath: _slots.Array.data[0].Active propertyPath: _slots.Array.data[0].Active

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f80dbc813e993664fb6cbf972e47f10a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ac0f2af311e310c4486c6e996c692163
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 681799fc6f6442b44bfd06dda6f9737c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,112 @@
fileFormatVersion: 2
guid: dbf213621aa684e458812b1232360659
ModelImporter:
serializedVersion: 22102
internalIDToNameTable: []
externalObjects:
- first:
type: UnityEngine:Material
assembly: UnityEngine.CoreModule
name: 10 - Default
second: {fileID: 2100000, guid: e0f7961861aa5ae4a97805f16f8306b7, type: 2}
materials:
materialImportMode: 0
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 0
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -262,6 +262,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_RayTracingMode: 2 m_RayTracingMode: 2
m_RayTraceProcedural: 0 m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1 m_RenderingLayerMask: 1
m_RendererPriority: 0 m_RendererPriority: 0
m_Materials: m_Materials:
@ -435,6 +438,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_RayTracingMode: 2 m_RayTracingMode: 2
m_RayTraceProcedural: 0 m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1 m_RenderingLayerMask: 1
m_RendererPriority: 0 m_RendererPriority: 0
m_Materials: m_Materials:
@ -514,6 +520,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 25689a0a2c93b2a4b8bbf4420b12d6c7, type: 3} m_Script: {fileID: 11500000, guid: 25689a0a2c93b2a4b8bbf4420b12d6c7, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_stateAuthorityChangeErrorCorrectionDelta: 0.15
_autoCloseTime: 25 _autoCloseTime: 25
_unlockTime: 40 _unlockTime: 40
_startState: 1 _startState: 1
@ -541,11 +548,9 @@ MonoBehaviour:
Probability: 30 Probability: 30
- Pickup: {fileID: 6715959599694521071, guid: 0a542ea6c4d73284696f38edbd148a59, type: 3} - Pickup: {fileID: 6715959599694521071, guid: 0a542ea6c4d73284696f38edbd148a59, type: 3}
Probability: 30 Probability: 30
- Pickup: {fileID: 644603425118098869, guid: c750a29126ddfd7488f13f77091ed1aa, type: 3}
Probability: 30
- Pickup: {fileID: 2715304033126495746, guid: 1d7da68e9c437244a94b4a3d6bafb095, type: 3} - Pickup: {fileID: 2715304033126495746, guid: 1d7da68e9c437244a94b4a3d6bafb095, type: 3}
Probability: 30 Probability: 30
- Pickup: {fileID: 1450828408321133776, guid: 9e99cf4e2146b094abd90b7dccd1cdf8, type: 3} - Pickup: {fileID: 644603425118098869, guid: c750a29126ddfd7488f13f77091ed1aa, type: 3}
Probability: 30 Probability: 30
- Pickup: {fileID: 8389084916135308144, guid: fa21fb8dc9db56f4fb9089135a6973f2, type: 3} - Pickup: {fileID: 8389084916135308144, guid: fa21fb8dc9db56f4fb9089135a6973f2, type: 3}
Probability: 30 Probability: 30
@ -598,10 +603,11 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
SortKey: 3661375754 SortKey: 3661375754
ObjectInterest: 0 ObjectInterest: 0
Flags: 264449 Flags: 264705
NestedObjects: [] NestedObjects: []
NetworkedBehaviours: NetworkedBehaviours:
- {fileID: 1708100450960633986} - {fileID: 1708100450960633986}
ForceRemoteRenderTimeframe: 0
--- !u!111 &1708100450960633996 --- !u!111 &1708100450960633996
Animation: Animation:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -610,7 +616,7 @@ Animation:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1708100450960633998} m_GameObject: {fileID: 1708100450960633998}
m_Enabled: 1 m_Enabled: 1
serializedVersion: 3 serializedVersion: 4
m_Animation: {fileID: 7400000, guid: d33e238ef847604449df19bfcc23ce3c, type: 2} m_Animation: {fileID: 7400000, guid: d33e238ef847604449df19bfcc23ce3c, type: 2}
m_Animations: m_Animations:
- {fileID: 7400000, guid: 38dfd97675fad834291a91d2a564f655, type: 2} - {fileID: 7400000, guid: 38dfd97675fad834291a91d2a564f655, type: 2}
@ -618,6 +624,7 @@ Animation:
m_WrapMode: 0 m_WrapMode: 0
m_PlayAutomatically: 0 m_PlayAutomatically: 0
m_AnimatePhysics: 0 m_AnimatePhysics: 0
m_UpdateMode: 0
m_CullingType: 0 m_CullingType: 0
--- !u!65 &1708100450960633985 --- !u!65 &1708100450960633985
BoxCollider: BoxCollider:
@ -730,6 +737,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_RayTracingMode: 2 m_RayTracingMode: 2
m_RayTraceProcedural: 0 m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1 m_RenderingLayerMask: 1
m_RendererPriority: 0 m_RendererPriority: 0
m_Materials: m_Materials:
@ -971,6 +981,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_RayTracingMode: 2 m_RayTracingMode: 2
m_RayTraceProcedural: 0 m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1 m_RenderingLayerMask: 1
m_RendererPriority: 0 m_RendererPriority: 0
m_Materials: m_Materials:
@ -1071,6 +1084,7 @@ AudioSource:
serializedVersion: 4 serializedVersion: 4
OutputAudioMixerGroup: {fileID: 243265986909122044, guid: 5fe66330c489e4544ba809ba6cc86e2b, type: 2} OutputAudioMixerGroup: {fileID: 243265986909122044, guid: 5fe66330c489e4544ba809ba6cc86e2b, type: 2}
m_audioClip: {fileID: 0} m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 0 m_PlayOnAwake: 0
m_Volume: 1 m_Volume: 1
m_Pitch: 1 m_Pitch: 1
@ -1285,6 +1299,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_RayTracingMode: 2 m_RayTracingMode: 2
m_RayTraceProcedural: 0 m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1 m_RenderingLayerMask: 1
m_RendererPriority: 0 m_RendererPriority: 0
m_Materials: m_Materials:

View File

@ -13,16 +13,6 @@ MonoBehaviour:
m_Name: AgentSettings m_Name: AgentSettings
m_EditorClassIdentifier: m_EditorClassIdentifier:
_agents: _agents:
- _id: Agent.Chill
_displayName: Chill Guy 69
_description: Nobody knows where Soldier 66 came from. There are rumors that
he was a high profile hitman before undergoing a series of experimental operations
to become half human and half machine. He is famous for not following any sort
of rules which makes him particularly dangerous... thing.
_icon: {fileID: 21300000, guid: 7db05483dc3839c4883ca3e2b66df14d, type: 3}
_agentPrefab:
RawGuidValue: 93ce630958493824d9666ef32598805a
_menuAgentPrefab: {fileID: 2529299778790674133, guid: 4d7cd885811c2de41929ce728130362a, type: 3}
- _id: Agent.Murica - _id: Agent.Murica
_displayName: Agent Murica _displayName: Agent Murica
_description: Nobody knows where Soldier 66 came from. There are rumors that _description: Nobody knows where Soldier 66 came from. There are rumors that
@ -33,6 +23,16 @@ MonoBehaviour:
_agentPrefab: _agentPrefab:
RawGuidValue: 25bcc93b9af98714db0c016d73cdf473 RawGuidValue: 25bcc93b9af98714db0c016d73cdf473
_menuAgentPrefab: {fileID: 2529299778790674133, guid: c9914cf34da803d49b5e31f50065d2a8, type: 3} _menuAgentPrefab: {fileID: 2529299778790674133, guid: c9914cf34da803d49b5e31f50065d2a8, type: 3}
- _id: Agent.Chill
_displayName: Chill Guy 69
_description: Nobody knows where Soldier 66 came from. There are rumors that
he was a high profile hitman before undergoing a series of experimental operations
to become half human and half machine. He is famous for not following any sort
of rules which makes him particularly dangerous... thing.
_icon: {fileID: 21300000, guid: 7db05483dc3839c4883ca3e2b66df14d, type: 3}
_agentPrefab:
RawGuidValue: 93ce630958493824d9666ef32598805a
_menuAgentPrefab: {fileID: 2529299778790674133, guid: 4d7cd885811c2de41929ce728130362a, type: 3}
- _id: Agent.Giga - _id: Agent.Giga
_displayName: Agent Giga _displayName: Agent Giga
_description: Nobody knows where Soldier 66 came from. There are rumors that _description: Nobody knows where Soldier 66 came from. There are rumors that

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
using System; using System;
using DG.Tweening;
using Fusion; using Fusion;
using UnityEngine; using UnityEngine;
@ -137,7 +138,7 @@ namespace TPSBR
return; return;
} }
_nestedPickups = new StaticPickup[_pickupsSetup.Length]; _nestedPickups = new StaticPickup[_pickupsSetup.Length];
switch (_startState) switch (_startState)
@ -230,6 +231,7 @@ namespace TPSBR
if (_localState == BoxState) if (_localState == BoxState)
return; return;
_localState = BoxState; _localState = BoxState;
_lockedState.SetActive(_localState == EState.Locked); _lockedState.SetActive(_localState == EState.Locked);

View File

@ -0,0 +1,108 @@
using System;
using System.Collections.Generic;
using Fusion;
using UnityEngine;
namespace TPSBR
{
public sealed class LootBoxSpawner : NetworkBehaviour
{
[Header("Prefab")]
[SerializeField] private NetworkPrefabRef _itemBoxPrefab;
[Header("Placement")]
[Min(1)] [SerializeField] private int _count = 10;
[Min(0f)] [SerializeField] private float _radius = 40f;
[Min(0f)] [SerializeField] private float _minSpacing = 3f;
[SerializeField] private LayerMask _groundMask = ~0;
[SerializeField] private float _raycastUp = 60f;
[SerializeField] private float _raycastDown = 120f;
[SerializeField] private uint _seed = 12345;
[SerializeField] private bool _randomYaw = true;
// Keep references to despawn/respawn later if you extend it
private readonly List<NetworkObject> _spawned = new();
public override void Spawned()
{
if (!HasStateAuthority) return;
SpawnAll();
}
private void SpawnAll()
{
// If this is re-entered (e.g., soft reset), clean previous
foreach (var no in _spawned)
if (no && no.IsValid) Runner.Despawn(no);
_spawned.Clear();
var rnd = new System.Random(unchecked((int)_seed));
var positions = SamplePositions(transform.position, _radius, _count, _minSpacing, rnd);
foreach (var p in positions)
{
var rot = _randomYaw ? Quaternion.Euler(0f, (float)rnd.NextDouble() * 360f, 0f) : Quaternion.identity;
// Spawn server-side; replicated to all clients
var obj = Runner.Spawn(_itemBoxPrefab, p, rot);
_spawned.Add(obj);
}
}
// Deterministic sampling inside a circle with ground projection + spacing
private List<Vector3> SamplePositions(Vector3 center, float radius, int count, float minSpacing, System.Random rnd)
{
var results = new List<Vector3>(count);
var maxTrials = 2500; // generous to pack in cluttered areas
int trials = 0;
while (results.Count < count && trials++ < maxTrials)
{
// pick point in disc (sqrt for uniform)
float r = radius * Mathf.Sqrt((float)rnd.NextDouble());
float ang = Mathf.PI * 2f * (float)rnd.NextDouble();
Vector3 local = new Vector3(Mathf.Cos(ang) * r, 0f, Mathf.Sin(ang) * r);
Vector3 rayFrom = center + local + Vector3.up * _raycastUp;
if (Physics.Raycast(rayFrom, Vector3.down, out var hit, _raycastUp + _raycastDown, _groundMask, QueryTriggerInteraction.Ignore))
{
var pos = hit.point;
// spacing test
bool ok = true;
if (minSpacing > 0f)
{
for (int i = 0; i < results.Count; i++)
{
if (Vector3.SqrMagnitude(results[i] - pos) < minSpacing * minSpacing) { ok = false; break; }
}
}
if (ok) results.Add(pos);
}
}
if (results.Count < count)
Debug.LogWarning($"[LootBoxSpawner] Only placed {results.Count}/{count}. Increase radius or lower spacing.");
return results;
}
// Scene gizmo previews the exact deterministic layout youll get at runtime
private void OnDrawGizmosSelected()
{
Gizmos.color = new Color(0.1f, 0.8f, 1f, 0.25f);
Gizmos.DrawWireSphere(transform.position, _radius);
// preview sample using same seed
var rnd = new System.Random(unchecked((int)_seed));
var preview = SamplePositions(transform.position, _radius, _count, _minSpacing, rnd);
Gizmos.color = new Color(0.1f, 0.8f, 1f, 0.7f);
foreach (var p in preview)
{
Gizmos.DrawSphere(p + Vector3.up * 0.15f, 0.25f);
Gizmos.DrawLine(p + Vector3.up * 3f, p); // drop line
}
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b89277a4df943284bbfe0a4bd18697d3