Added many other things and processings

This commit is contained in:
2026-08-13 17:55:05 +03:00
parent 36ecac038a
commit 3c490bdae8
625 changed files with 929224 additions and 151067 deletions
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: f7cb3bf80f9eec2429456177b478a2ed
timeCreated: 1765628610
licenseType: Store
timeCreated: 1647161130
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
@@ -12,6 +12,7 @@ Material:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ENVIRONMENTREFLECTIONS_OFF
- _SPECULARHIGHLIGHTS_OFF
m_InvalidKeywords:
- _GLOSSYREFLECTIONS_OFF
@@ -157,7 +158,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.7941176, g: 0.4969275, b: 0.2685986, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.7941176, g: 0.49692744, b: 0.26859856, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _VolumeInvSize: {r: 1000001, g: 1000001, b: 1000001, a: 1}
+2 -1
View File
@@ -12,6 +12,7 @@ Material:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ENVIRONMENTREFLECTIONS_OFF
- _SPECULARHIGHLIGHTS_OFF
m_InvalidKeywords:
- _GLOSSYREFLECTIONS_OFF
@@ -157,7 +158,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.7647059, g: 0.7647059, b: 0.7647059, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.7647059, g: 0.7647059, b: 0.7647059, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _VolumeInvSize: {r: 1000001, g: 1000001, b: 1000001, a: 1}
+2 -1
View File
@@ -12,6 +12,7 @@ Material:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ENVIRONMENTREFLECTIONS_OFF
- _SPECULARHIGHLIGHTS_OFF
m_InvalidKeywords:
- _GLOSSYREFLECTIONS_OFF
@@ -157,7 +158,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 1, b: 0.006896496, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0, g: 1, b: 0.006896496, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _VolumeInvSize: {r: 1000001, g: 1000001, b: 1000001, a: 1}
+2 -1
View File
@@ -12,6 +12,7 @@ Material:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ENVIRONMENTREFLECTIONS_OFF
- _SPECULARHIGHLIGHTS_OFF
m_InvalidKeywords:
- _GLOSSYREFLECTIONS_OFF
@@ -157,7 +158,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.83823526, g: 0, b: 0.2254565, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.83823526, g: 0, b: 0.22545648, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _VolumeInvSize: {r: 1000001, g: 1000001, b: 1000001, a: 1}
+49 -8
View File
@@ -1,5 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-5696866968431475504
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
@@ -8,25 +21,34 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: demotrain
m_Shader: {fileID: 4800000, guid: 3334d0a534d2dac45b2c1a9a7e0a6c64, type: 3}
m_Shader: {fileID: -6465566751694194690, guid: c13b7071fc06bb646b061f89205f01ac, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- BAKERY_VERTEXLMMASK
- BAKERY_VERTEXLMSH
- BAKERY_VOLUME
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BakeryLitBase_7a7bbda58bdbe88b9878b358f4a19616_Smoothnessmap_1619280207_Texture2D:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BakeryLitBase_7a7bbda58bdbe88b9878b358f4a19616_Specularmap_3317505707_Texture2D:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
@@ -87,8 +109,21 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- BAKERY_COMPRESSED_VOLUME: 0
- _BAKERY_2SIDED: 2
- _BAKERY_2SIDEDON: 0
- _BAKERY_BICUBIC: 0
@@ -118,6 +153,10 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueControl: 0
- _QueueOffset: 0
- _Smoothness: 0
- _SmoothnessFromMetallic: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
@@ -125,9 +164,11 @@ Material:
- _VolumeNormalOffset: 0
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.64705884, g: 0.64705884, b: 0.64705884, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecOcclusionParams: {r: 10, g: -0.5, b: 0.8, a: 0}
- _Tiling_and_offset: {r: 1, g: 1, b: 0, a: 0}
- _VolumeInvSize: {r: 1000001, g: 1000001, b: 1000001, a: 0}
- _VolumeMin: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
@@ -12,6 +12,7 @@ Material:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ENVIRONMENTREFLECTIONS_OFF
- _SPECULARHIGHLIGHTS_OFF
m_InvalidKeywords:
- _GLOSSYREFLECTIONS_OFF
@@ -1,77 +1,163 @@
fileFormatVersion: 2
guid: 51259141edc618b4aaf79bd3cd3c9be8
timeCreated: 1605866141
licenseType: Store
ModelImporter:
serializedVersion: 19
fileIDToRecycleName:
100000: lamp
100002: lamp2
100004: main
100006: main_rear
100008: terrain
100010: //RootNode
100012: wagon
100014: wagon001
100016: wagon_joint
100018: wagon_joint001
400000: lamp
400002: lamp2
400004: main
400006: main_rear
400008: terrain
400010: //RootNode
400012: wagon
400014: wagon001
400016: wagon_joint
400018: wagon_joint001
2300000: lamp
2300002: lamp2
2300004: main
2300006: terrain
2300008: wagon
2300010: wagon001
3300000: lamp
3300002: lamp2
3300004: main
3300006: terrain
3300008: wagon
3300010: wagon001
4300000: terrain
4300002: lamp
4300004: lamp2
4300006: main
4300008: wagon
4300010: wagon001
7400000: Take 001
9500000: //RootNode
11100000: //RootNode
serializedVersion: 22200
internalIDToNameTable:
- first:
1: 100000
second: lamp
- first:
1: 100002
second: lamp2
- first:
1: 100004
second: main
- first:
1: 100006
second: main_rear
- first:
1: 100008
second: terrain
- first:
1: 100010
second: //RootNode
- first:
1: 100012
second: wagon
- first:
1: 100014
second: wagon001
- first:
1: 100016
second: wagon_joint
- first:
1: 100018
second: wagon_joint001
- first:
4: 400000
second: lamp
- first:
4: 400002
second: lamp2
- first:
4: 400004
second: main
- first:
4: 400006
second: main_rear
- first:
4: 400008
second: terrain
- first:
4: 400010
second: //RootNode
- first:
4: 400012
second: wagon
- first:
4: 400014
second: wagon001
- first:
4: 400016
second: wagon_joint
- first:
4: 400018
second: wagon_joint001
- first:
23: 2300000
second: lamp
- first:
23: 2300002
second: lamp2
- first:
23: 2300004
second: main
- first:
23: 2300006
second: terrain
- first:
23: 2300008
second: wagon
- first:
23: 2300010
second: wagon001
- first:
33: 3300000
second: lamp
- first:
33: 3300002
second: lamp2
- first:
33: 3300004
second: main
- first:
33: 3300006
second: terrain
- first:
33: 3300008
second: wagon
- first:
33: 3300010
second: wagon001
- first:
43: 4300000
second: terrain
- first:
43: 4300002
second: lamp
- first:
43: 4300004
second: lamp2
- first:
43: 4300006
second: main
- first:
43: 4300008
second: wagon
- first:
43: 4300010
second: wagon001
- first:
74: 7400000
second: Take 001
- first:
95: 9500000
second: //RootNode
- first:
111: 11100000
second: //RootNode
externalObjects: {}
materials:
importMaterials: 0
materialImportMode: 0
materialName: 0
materialSearch: 1
materialLocation: 0
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:
- '#BAKERY{"meshName":["lamp","terrain","lamp2"],"padding":[157,6,157],"unwrapper":[0,0,0]}'
clipAnimations:
- serializedVersion: 16
name: Take 001
takeName: Take 001
internalID: 0
firstFrame: 0
lastFrame: 500
wrapMode: 2
@@ -123,26 +209,49 @@ ModelImporter:
globalScale: 0.2
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 0
importVisibility: 0
importBlendShapes: 1
importCameras: 0
importLights: 0
nodeNameCollisionStrategy: 0
fileIdsGeneration: 1
swapUVChannels: 0
generateSecondaryUV: 1
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15
secondaryUVHardAngle: 1
secondaryUVMarginMethod: 0
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 0
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 0
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
@@ -152,14 +261,19 @@ ModelImporter:
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 0.2
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 1
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 1
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 0
importBlendShapeDeformPercent: 0
remapMaterialsIfMaterialImportModeIsNone: 1
additionalBone: 0
userData:
assetBundleName:
@@ -867,7 +867,7 @@ MonoBehaviour:
renderSettingsForceRebuildGeometry: 1
renderSettingsPerformRendering: 1
renderSettingsUserRenderMode: 0
renderSettingsDistanceShadowmask: 0
renderSettingsDistanceShadowmask: 1
renderSettingsSettingsMode: 2
renderSettingsFixSeams: 1
renderSettingsDenoise: 1
@@ -214,7 +214,7 @@ MonoBehaviour:
renderSettingsForceRebuildGeometry: 1
renderSettingsPerformRendering: 1
renderSettingsUserRenderMode: 0
renderSettingsDistanceShadowmask: 0
renderSettingsDistanceShadowmask: 1
renderSettingsSettingsMode: 2
renderSettingsFixSeams: 1
renderSettingsDenoise: 1
@@ -270,7 +270,7 @@ MonoBehaviour:
renderSettingsAlphaDithering: 0
renderSettingsBeepOnFinish: 0
renderSettingsExportTerrainAsHeightmap: 0
renderSettingsRTXMode: 0
renderSettingsRTXMode: 1
renderSettingsLightProbeMode: 1
renderSettingsClientMode: 0
renderSettingsServerAddress: 127.0.0.1
@@ -292,17 +292,17 @@ MonoBehaviour:
renderSettingsRTPVHeight: 360
renderSettingsRTPVExposure: 0.99999994
renderSettingsRemoveDuplicateLightmaps: 0
lastBakeTime: 7
lastBakeTime: 6
enlightenWarningShown: 0
enlightenWarningShown2: 0
uniqueLights:
- {fileID: 250158893}
- {fileID: 1382655386}
implicitGroups:
- {fileID: 1555528346}
- {fileID: 1317175472}
- {fileID: 1317175472}
- {fileID: 1317175472}
- {fileID: 1950816983}
- {fileID: 1477737642}
- {fileID: 1477737642}
- {fileID: 1477737642}
implicitGroupedObjects:
- {fileID: 0}
- {fileID: 880385936}
@@ -396,12 +396,11 @@ MonoBehaviour:
- Assets/Bakery/examples/content/volume_test_scene.FBX
modifiedAssets:
- meshName:
- lamp2
- lamp
- terrain
- wagon
padding: 9d0000009d0000000600000032000000
unwrapper: 00000000000000000000000000000000
- lamp2
padding: 9d000000060000009d000000
unwrapper: 000000000000000000000000
bakedRenderers:
- {fileID: 880385938}
- {fileID: 1191666461}
@@ -410,7 +409,7 @@ MonoBehaviour:
bakedLights: []
bakedRenderersTerrain: []
maps:
- {fileID: 2800000, guid: dd43c870925910249abdd4bb2092c92e, type: 3}
- {fileID: 2800000, guid: a8883668aff010141945cc6b6ff4daa3, type: 3}
masks: []
dirMaps: []
rnmMaps0: []
@@ -419,9 +418,9 @@ MonoBehaviour:
mapsMode:
bakedIDs: 000000000000000000000000
bakedScaleOffset:
- {x: 0.07480579, y: 0.0752388, z: -0.011469247, w: -0.011535637}
- {x: 1.0089183, y: 1.0087734, z: -0.0059116306, w: -0.0059107817}
- {x: 0.074805774, y: 0.075238794, z: 0.12943095, w: 0.05891446}
- {x: 0.07480578, y: 0.075238794, z: -0.011469246, w: -0.011535636}
- {x: 1.0089182, y: 1.0094868, z: -0.0059116296, w: -0.005914962}
- {x: 0.07480577, y: 0.07523879, z: 0.12943095, w: 0.058914464}
bakedVertexOffset: ffffffffffffffffffffffff
bakedVertexColorMesh:
- {fileID: 0}
@@ -453,9 +452,9 @@ MonoBehaviour:
- {fileID: 1209676341}
bakedIDs: 000000000000000000000000
bakedScaleOffset:
- {x: 0.060632106, y: 0.057397224, z: -0.00023684416, w: -0.0002242079}
- {x: 1.00626, y: 1.0063591, z: -0.0039307033, w: -0.0039310902}
- {x: 0.0606321, y: 0.057397217, z: 0.14066336, w: 0.078053676}
- {x: 0.07480579, y: 0.0752388, z: -0.011469247, w: -0.011535637}
- {x: 1.0089183, y: 1.0087734, z: -0.0059116306, w: -0.0059107817}
- {x: 0.074805774, y: 0.075238794, z: 0.12943095, w: 0.05891446}
bakedVertexColorMesh:
- {fileID: 0}
- {fileID: 0}
@@ -524,9 +523,9 @@ MonoBehaviour:
firstLightIsAlwaysAlpha: 0
denoise: 0
isGlobal: 1
bakedTexture0: {fileID: 11700000, guid: 9fa087d5d86254e42b27c50d23902070, type: 2}
bakedTexture1: {fileID: 11700000, guid: ddfb88c576fef1342b70ce773e4efa17, type: 2}
bakedTexture2: {fileID: 11700000, guid: 53a3bce25d44c464aabf207b39fa92b8, type: 2}
bakedTexture0: {fileID: 11700000, guid: 5790825c7bf97f342afc849e47fb0ff0, type: 2}
bakedTexture1: {fileID: 11700000, guid: 66427328f79c49344a6be74a38847352, type: 2}
bakedTexture2: {fileID: 11700000, guid: d38c233c180e915479565431c18b9333, type: 2}
bakedTexture3: {fileID: 0}
bakedMask: {fileID: 0}
supportRotationAfterBake: 0
@@ -663,51 +662,6 @@ MeshRenderer:
m_CorrespondingSourceObject: {fileID: 2300002, guid: 51259141edc618b4aaf79bd3cd3c9be8, type: 3}
m_PrefabInstance: {fileID: 1018329185}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1317175472
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec0b4dd729a12d046982652f834580a2, type: 3}
m_Name: example_volumes_simple_LM0
m_EditorClassIdentifier:
resolution: 512
bitmask: 1
id: 0
sortingID: 1
isImplicit: 1
area: 17982.99
totalVertexCount: 0
vertexCounter: 0
sceneLodLevel: -1
autoResolution: 0
sceneName: example_volumes_simple
tag: -1
containsTerrains: 0
probes: 0
mode: 1
renderMode: 1000
renderDirMode: 1000
atlasPacker: 1000
holeFilling: 0
vertexSamplingDensity: 0
computeSSS: 0
sssSamples: 16
sssDensity: 10
sssColor: {r: 1, g: 1, b: 1, a: 1}
sssScale: 1
fakeShadowBias: 0
transparentSelfShadow: 0
flipNormal: 0
parentName:
overridePath:
fixPos3D: 0
voxelSize: {x: 1, y: 1, z: 1}
passedFilter: 0
--- !u!1 &1382655386
GameObject:
m_ObjectHideFlags: 0
@@ -768,7 +722,7 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 37.799004, y: 166.09201, z: 205.53099}
--- !u!114 &1555528346
--- !u!114 &1477737642
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -778,25 +732,25 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec0b4dd729a12d046982652f834580a2, type: 3}
m_Name: volumes
m_Name: example_volumes_simple_LM0
m_EditorClassIdentifier:
resolution: 16
resolution: 512
bitmask: 1
id: 1
sortingID: 0
id: 0
sortingID: 1
isImplicit: 1
area: 0
totalVertexCount: 813120
area: 17982.99
totalVertexCount: 0
vertexCounter: 0
sceneLodLevel: -1
autoResolution: 0
sceneName:
sceneName: example_volumes_simple
tag: -1
containsTerrains: 0
probes: 1
mode: 2
probes: 0
mode: 1
renderMode: 1000
renderDirMode: 5
renderDirMode: 1000
atlasPacker: 1000
holeFilling: 0
vertexSamplingDensity: 0
@@ -810,8 +764,8 @@ MonoBehaviour:
flipNormal: 0
parentName:
overridePath:
fixPos3D: 1
voxelSize: {x: 0.50082904, y: 0.51591885, z: 0.50144845}
fixPos3D: 0
voxelSize: {x: 1, y: 1, z: 1}
passedFilter: 0
--- !u!1 &1755572499
GameObject:
@@ -923,6 +877,51 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!114 &1950816983
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec0b4dd729a12d046982652f834580a2, type: 3}
m_Name: volumes
m_EditorClassIdentifier:
resolution: 16
bitmask: 1
id: 1
sortingID: 0
isImplicit: 1
area: 0
totalVertexCount: 813120
vertexCounter: 0
sceneLodLevel: -1
autoResolution: 0
sceneName:
tag: -1
containsTerrains: 0
probes: 1
mode: 2
renderMode: 1000
renderDirMode: 5
atlasPacker: 1000
holeFilling: 0
vertexSamplingDensity: 0
computeSSS: 0
sssSamples: 16
sssDensity: 10
sssColor: {r: 1, g: 1, b: 1, a: 1}
sssScale: 1
fakeShadowBias: 0
transparentSelfShadow: 0
flipNormal: 0
parentName:
overridePath:
fixPos3D: 1
voxelSize: {x: 0.50082904, y: 0.51591885, z: 0.50144845}
passedFilter: 0
--- !u!1 &2058759529
GameObject:
m_ObjectHideFlags: 0
@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: a8883668aff010141945cc6b6ff4daa3
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 6
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5790825c7bf97f342afc849e47fb0ff0
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11700000
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 66427328f79c49344a6be74a38847352
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11700000
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d38c233c180e915479565431c18b9333
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11700000
userData:
assetBundleName:
assetBundleVariant:
+2 -2
View File
@@ -77,9 +77,9 @@ Material:
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
- intensity: 1
- intensity: 2
m_Colors:
- _Color: {r: 0.8867924, g: 0.7080269, b: 0.56470275, a: 1}
- _Color: {r: 0.56287825, g: 0.7167561, b: 0.8584906, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
+18 -4
View File
@@ -19,7 +19,8 @@ MonoBehaviour:
- Assets/Rocks and Boulders 2/Rocks/Source/Models/Rock5A.fbx
- Assets/Rocks and Boulders 2/Rocks/Source/Models/Rock3.fbx
- Assets/Rocks and Boulders 2/Rocks/Source/Models/Rock4A.fbx
modifiedAssetPaddingHash: d6a958ff333fd3d9343fd3d9353fd3d93e3fd3d94adc894b
- Assets/Bakery/examples/content/volume_test_scene.FBX
modifiedAssetPaddingHash: d6a958ff333fd3d9343fd3d9353fd3d93e3fd3d94adc894bb5fc2581
modifiedMeshList: []
modifiedMeshPaddingList:
modifiedAssets:
@@ -422,6 +423,12 @@ MonoBehaviour:
- polySurface115
padding: 10000000
unwrapper: 00000000
- meshName:
- lamp
- terrain
- lamp2
padding: 9d000000060000009d000000
unwrapper: 000000000000000000000000
assetList:
- Assets/Bakery/examples/content/sponza/bush.FBX
- Assets/Bakery/examples/content/floor_lamp.FBX
@@ -492,7 +499,14 @@ MonoBehaviour:
- Assets/Plugins/RootMotion/Shared Demo Assets/Humanoid Animations/Walk Turn Sharp.fbx
- Assets/Plugins/RootMotion/Shared Demo Assets/Humanoid Animations/Aim MP-40/Aim
MP-40 Standing Up.FBX
uvOverlapAssetList: 00000000ffffffff01010000010100000101000000000000000000000000000000000000000000000101000000000000000000000101000000000000000000000000000000000000000000000000000001010000000000000000000000000000010100000000000001010000000000000000000000000000010100000000000001010000000000000101000000000000000000000101000001010000000000000000000001010000000000000000000001010000010100000000000000000000000000000000000000000000000000000000000000000000
- Assets/UnityTechnologies/EffectExamples/WeaponEffects/Models/RocketWarhead.FBX
- Assets/UnityTechnologies/EffectExamples/Shared/Models/BackGround.FBX
- Assets/UnityTechnologies/EffectExamples/Shared/Models/FPSWeapon.fbx
- Assets/UnityTechnologies/EffectExamples/WeaponEffects/Models/ShellCasing.FBX
- Assets/UnityTechnologies/EffectExamples/WaterEffects/Models/WaterFaucet.FBX
- Assets/UnityTechnologies/EffectExamples/Shared/Models/LowMan.fbx
- Assets/UnityTechnologies/EffectExamples/WaterEffects/Models/ImpactSplash.FBX
uvOverlapAssetList: 00000000ffffffff0101000001010000010100000000000000000000000000000000000000000000010100000000000000000000010100000000000000000000000000000000000000000000000000000101000000000000000000000000000001010000000000000101000000000000000000000000000001010000000000000101000000000000010100000000000000000000010100000101000000000000000000000101000000000000000000000101000001010000000000000000000000000000000000000000000000000000000000000000000001010000000000000101000001010000000000000000000000000000
xatlasWarningShown: 0
foundCompatibleSetup: 1
gpuName_2: NVIDIA GeForce RTX 5080
@@ -594,5 +608,5 @@ MonoBehaviour:
renderSettingsRTPVExposure: 1
renderSettingsRemoveDuplicateLightmaps: 0
tagOverrides: []
modifiedMeshPaddingArray: 10000000
modifiedMeshUnwrapperArray: 00000000
modifiedMeshPaddingArray: 9d000000060000009d000000
modifiedMeshUnwrapperArray: 000000000000000000000000
+2 -1
View File
@@ -19,4 +19,5 @@ MonoBehaviour:
- Assets/Rocks and Boulders 2/Rocks/Source/Models/Rock5A.fbx
- Assets/Rocks and Boulders 2/Rocks/Source/Models/Rock3.fbx
- Assets/Rocks and Boulders 2/Rocks/Source/Models/Rock4A.fbx
modifiedAssetPaddingHash: d6a958ff333fd3d9343fd3d9353fd3d93e3fd3d94adc894b
- Assets/Bakery/examples/content/volume_test_scene.FBX
modifiedAssetPaddingHash: d6a958ff333fd3d9343fd3d9353fd3d93e3fd3d94adc894bb5fc2581
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1a5ec1a6632a0c441997e2fb386df764
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11700000
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5ca00f3b494b510488250ffc7da90096
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11700000
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 93b1c0592abe6744d9a9b52285ff86b1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11700000
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -69,7 +69,7 @@ TextureImporter:
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 1024
maxTextureSize: 4096
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
Binary file not shown.
@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: c674e9cadd5c8df4584d6e2a58be5276
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 6
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 4096
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: f21f024f3a86f264695f48cd96e51b72
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 6
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
+7
View File
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5d7ce31a10d90ad4a96c04bae5cfe14f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+175
View File
@@ -0,0 +1,175 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-1671200284100939852
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M-Bakery
m_Shader: {fileID: -6465566751694194690, guid: 5307d81f6ff873f45a88212286d0a150, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- BAKERY_MODE_NONE
- VOLUME_SHADOWMASK
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BakeryLitBase_7a7bbda58bdbe88b9878b358f4a19616_Smoothnessmap_1619280207_Texture2D:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BakeryLitBase_7a7bbda58bdbe88b9878b358f4a19616_Specularmap_3317505707_Texture2D:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Smoothness_map:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Specular_map:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- BAKERY_COMPRESSED_VOLUME: 0
- BAKERY_LMSPEC: 0
- BAKERY_MODE: 0
- VOLUME_SHADOWMASK: 1
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _CastShadows: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Lightmap_specular_as_reflection_occlusion: 0
- _Metallic: 0
- _Normal_map_power: 1
- _OcclusionStrength: 1
- _Occlusion_map_power: 1
- _PER_VERTEX: 0
- _Parallax: 0.005
- _QueueControl: 0
- _QueueOffset: 0
- _REFLECTIONS: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessFromMetallic: 0
- _SmoothnessSource: 0
- _SmoothnessTextureChannel: 0
- _SpecOcclusionParamsInvZ: 0.3
- _SpecOcclusionParamsX: 2
- _SpecOcclusionParamsY: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _SupportBakedVolumeRotation: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZTest: 4
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _Specular_color: {r: 0, g: 0, b: 0, a: 0}
- _Tiling_and_offset: {r: 1, g: 1, b: 0, a: 0}
m_BuildTextureStacks: []
m_AllowLocking: 1
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9403e023e1ff61b4f9dbd0d77f1f4148
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -276,8 +276,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
spawnCenter: {x: 0, y: 1, z: 0}
spawnRadius: 1
edgePadding: 0.75
heightAboveFloor: 0.15
--- !u!114 &5032171862004131710
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 82113aa5aa0ce154ab2a27bdda00cdbc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b0c79cebdb4201743be8612545ee180e, type: 3}
m_Name: Rocket-Back-Standart-Ready
m_EditorClassIdentifier:
itemId: rocket-back-standart-ready
displayName: Rocket-Back-Standart-Ready
category: 2
worldPrefab: {fileID: 5195529150077527847, guid: ea8e439364ce6aa4dab3586bae0edfed, type: 3}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 203427fd9de0c514887bec7c046a6f69
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b0c79cebdb4201743be8612545ee180e, type: 3}
m_Name: Rocket-Base-Avia-Ready
m_EditorClassIdentifier:
itemId: rocket-base-avia-ready
displayName: Rocket-Base-Avia-Ready
category: 2
worldPrefab: {fileID: 1256934312238460503, guid: 9712e2459410a6d43b55ea9d3847e29a, type: 3}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aab26561f7a9b424b9262c0d07151638
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b0c79cebdb4201743be8612545ee180e, type: 3}
m_Name: Rocket-Base-Standart-Ready
m_EditorClassIdentifier:
itemId: rocket-base-standart-ready
displayName: Rocket-Base-Standart-Ready
category: 2
worldPrefab: {fileID: 875723161486981202, guid: 6e681ca5358fff648ba85ae9e494fa77, type: 3}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 218df70f83b5574428eb2159664b9b6e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b0c79cebdb4201743be8612545ee180e, type: 3}
m_Name: Rocket-Cone-Standart-Ready
m_EditorClassIdentifier:
itemId: rocket-cone-standart-ready
displayName: Rocket-Cone-Standart-Ready
category: 2
worldPrefab: {fileID: 7151289907260619783, guid: a31204f69b185d54ab9e12b0a3a1e98b, type: 3}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a97b695af4781b34fa8cab9a97ba9d9d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -14,6 +14,10 @@ MonoBehaviour:
m_EditorClassIdentifier:
items:
- {fileID: 11400000, guid: b9e34349c67bdcf4f9ba3fc7655b9dac, type: 2}
- {fileID: 11400000, guid: 203427fd9de0c514887bec7c046a6f69, type: 2}
- {fileID: 11400000, guid: e6fdb55d6695e0f4a919bcfbc6bf5ab9, type: 2}
- {fileID: 11400000, guid: aab26561f7a9b424b9262c0d07151638, type: 2}
- {fileID: 11400000, guid: d3938024cd4dd964e804af02917917b2, type: 2}
- {fileID: 11400000, guid: 218df70f83b5574428eb2159664b9b6e, type: 2}
- {fileID: 11400000, guid: 57d611457f6826f46972c33527ddda60, type: 2}
- {fileID: 11400000, guid: a97b695af4781b34fa8cab9a97ba9d9d, type: 2}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a6169d69297262f42bb2f29773d8e443
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: dbdeccc1573d9204f858f7c114972d91, type: 3}
m_Name: Recipe-RocketParts-Back-Standart
m_EditorClassIdentifier:
recipeId: back-standart
recipeId: furnance-back-standart
displayName: Back-Standart
outputItem: {fileID: 11400000, guid: b9e34349c67bdcf4f9ba3fc7655b9dac, type: 2}
outputAmount: 1
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: dbdeccc1573d9204f858f7c114972d91, type: 3}
m_Name: Recipe-RocketParts-Base-Avia
m_EditorClassIdentifier:
recipeId: base-avia
recipeId: furnance-base-avia
displayName: Base-Avia
outputItem: {fileID: 11400000, guid: e6fdb55d6695e0f4a919bcfbc6bf5ab9, type: 2}
outputAmount: 1
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: dbdeccc1573d9204f858f7c114972d91, type: 3}
m_Name: Recipe-RocketParts-Base-Standart
m_EditorClassIdentifier:
recipeId: base-standart
recipeId: furnance-base-standart
displayName: Base-Standart
outputItem: {fileID: 11400000, guid: d3938024cd4dd964e804af02917917b2, type: 2}
outputAmount: 1
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: dbdeccc1573d9204f858f7c114972d91, type: 3}
m_Name: Recipe-RocketParts-Cone-Standart
m_EditorClassIdentifier:
recipeId: cone-standart
recipeId: furnance-cone-standart
displayName: Cone-Standart
outputItem: {fileID: 11400000, guid: 57d611457f6826f46972c33527ddda60, type: 2}
outputAmount: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 403147d6dd4b2e940bc8bf8db0af109b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea07d1502f6f4abc96ea949c7e688857, type: 3}
m_Name: Recipe-Back-Standart-Ready
m_EditorClassIdentifier:
recipeId: processed-base-standart
inputItem: {fileID: 11400000, guid: b9e34349c67bdcf4f9ba3fc7655b9dac, type: 2}
outputItem: {fileID: 11400000, guid: 203427fd9de0c514887bec7c046a6f69, type: 2}
processingDuration: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5400dc52dd67d4543a95f871c7360304
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea07d1502f6f4abc96ea949c7e688857, type: 3}
m_Name: Recipe-Base-Avia-Ready
m_EditorClassIdentifier:
recipeId: processed-back-avia
inputItem: {fileID: 11400000, guid: e6fdb55d6695e0f4a919bcfbc6bf5ab9, type: 2}
outputItem: {fileID: 11400000, guid: aab26561f7a9b424b9262c0d07151638, type: 2}
processingDuration: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cba7cf55d3f4ad442b1c220674e57be7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea07d1502f6f4abc96ea949c7e688857, type: 3}
m_Name: Recipe-Base-Standart-Ready
m_EditorClassIdentifier:
recipeId: processed-back-standart
inputItem: {fileID: 11400000, guid: d3938024cd4dd964e804af02917917b2, type: 2}
outputItem: {fileID: 11400000, guid: 218df70f83b5574428eb2159664b9b6e, type: 2}
processingDuration: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c61c5a6a9402ddb45ad5d0eb369d4475
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea07d1502f6f4abc96ea949c7e688857, type: 3}
m_Name: Recipe-Cone-Standart-Ready
m_EditorClassIdentifier:
recipeId: processed-cone-standart
inputItem: {fileID: 11400000, guid: 57d611457f6826f46972c33527ddda60, type: 2}
outputItem: {fileID: 11400000, guid: a97b695af4781b34fa8cab9a97ba9d9d, type: 2}
processingDuration: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 043fa7be6627da64f815afea63379f89
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1a1c52539b69a4f40b898f08c94c83c6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 13c0b41f355d72c4da1b88bec17901ac
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ea8e439364ce6aa4dab3586bae0edfed
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 033239ea2c28a8f4e8a5896663eecaca
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 101ea854d65f59f4f98b57bac6bad504
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0690a926ec2b8d5498fd25633af436e1
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1459,7 +1459,7 @@ MonoBehaviour:
m_PreserveMeshAssetOnDestroy: 0
assetGuid:
m_Mesh: {fileID: 0}
m_VersionIndex: 3660
m_VersionIndex: 3666
m_IsSelectable: 1
m_SelectedFaces:
m_SelectedEdges: []
@@ -1574,7 +1574,7 @@ Rigidbody:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3050509638399781712}
serializedVersion: 4
m_Mass: 75
m_Mass: 20
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
@@ -1697,13 +1697,16 @@ MonoBehaviour:
ShowTopMostFoldoutHeaderGroup: 1
interactionLabel: Interact
maximumInteractionDistance: 3
weight: 75
weight: 20
pullStrengthPerPlayer: 50
maximumDraggers: 2
dragOffset: {x: 0, y: 1, z: 1.8}
maximumDragSpeed: 3
minimumSpeedMultiplier: 0.35
maximumDraggerDistance: 4.5
positionSmoothTime: 0.12
rotationFollowSpeed: 8
rotationOffset: {x: 0, y: 0, z: 0}
movementMode: 0
groundLayers:
serializedVersion: 2
@@ -1406,7 +1406,7 @@ Rigidbody:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8393852851809890045}
serializedVersion: 4
m_Mass: 35
m_Mass: 20
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
@@ -1529,13 +1529,16 @@ MonoBehaviour:
ShowTopMostFoldoutHeaderGroup: 1
interactionLabel: Interact
maximumInteractionDistance: 3
weight: 35
weight: 20
pullStrengthPerPlayer: 50
maximumDraggers: 2
dragOffset: {x: 0, y: 1, z: 1.8}
maximumDragSpeed: 3
minimumSpeedMultiplier: 0.35
maximumDraggerDistance: 4.5
positionSmoothTime: 0.12
rotationFollowSpeed: 8
rotationOffset: {x: 0, y: 0, z: 0}
movementMode: 0
groundLayers:
serializedVersion: 2
@@ -854,7 +854,7 @@ Rigidbody:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074462948060523628}
serializedVersion: 4
m_Mass: 35
m_Mass: 20
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
@@ -977,13 +977,16 @@ MonoBehaviour:
ShowTopMostFoldoutHeaderGroup: 1
interactionLabel: Interact
maximumInteractionDistance: 3
weight: 35
weight: 20
pullStrengthPerPlayer: 50
maximumDraggers: 2
dragOffset: {x: 0, y: 1, z: 1.8}
maximumDragSpeed: 3
minimumSpeedMultiplier: 0.35
maximumDraggerDistance: 4.5
positionSmoothTime: 0.12
rotationFollowSpeed: 8
rotationOffset: {x: 0, y: 0, z: 0}
movementMode: 0
groundLayers:
serializedVersion: 2
@@ -853,7 +853,7 @@ Rigidbody:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5498288413617640318}
serializedVersion: 4
m_Mass: 35
m_Mass: 20
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
@@ -976,13 +976,16 @@ MonoBehaviour:
ShowTopMostFoldoutHeaderGroup: 1
interactionLabel: Interact
maximumInteractionDistance: 3
weight: 35
weight: 20
pullStrengthPerPlayer: 50
maximumDraggers: 2
dragOffset: {x: 0, y: 1, z: 1.8}
maximumDragSpeed: 3
minimumSpeedMultiplier: 0.35
maximumDraggerDistance: 4.5
positionSmoothTime: 0.12
rotationFollowSpeed: 8
rotationOffset: {x: 0, y: 0, z: 0}
movementMode: 0
groundLayers:
serializedVersion: 2
@@ -12,9 +12,10 @@ public enum DraggableMovementMode
}
[RequireComponent(typeof(Rigidbody), typeof(NetworkRigidbody))]
public sealed class NetworkDraggableInteractable : NetworkInteractable
public sealed class NetworkDraggableInteractable : NetworkInteractable, IWorkstationItemControl
{
private const ulong NoDragger = ulong.MaxValue;
private static readonly HashSet<NetworkDraggableInteractable> SpawnedDraggables = new();
[Header("Weight")]
[SerializeField, Min(0.1f)] private float weight = 35f;
@@ -59,6 +60,11 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private readonly NetworkVariable<bool> isExternallyControlled = new(
false,
NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private readonly HashSet<Collider> ignoredPlayerColliders = new();
private readonly RaycastHit[] groundHits = new RaycastHit[16];
private float nextCollisionRefreshTime;
@@ -79,6 +85,7 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
}
public int RequiredDraggerCount => Mathf.Max(1, Mathf.CeilToInt(weight / pullStrengthPerPlayer));
public bool HasEnoughPullStrength => ActiveDraggerCount >= RequiredDraggerCount;
public bool IsExternallyControlled => isExternallyControlled.Value;
private bool HasAnyDragger => ActiveDraggerCount > 0;
private bool IsDraggedByLocalPlayer =>
@@ -88,6 +95,9 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
{
get
{
if (IsExternallyControlled)
return "In machine";
if (IsDraggedByLocalPlayer)
return "Release";
@@ -105,7 +115,11 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
}
public override bool IsInteractionAvailable => base.IsInteractionAvailable &&
(IsDraggedByLocalPlayer || ActiveDraggerCount < maximumDraggers);
!IsExternallyControlled &&
(IsDraggedByLocalPlayer ||
(ActiveDraggerCount < maximumDraggers &&
(NetworkManager == null ||
!TryGetDraggedObject(NetworkManager.LocalClientId, this, out _))));
private void Awake()
{
@@ -121,15 +135,19 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
public override void OnNetworkSpawn()
{
SpawnedDraggables.Add(this);
firstDraggerClientId.OnValueChanged += HandleDraggerChanged;
secondDraggerClientId.OnValueChanged += HandleDraggerChanged;
isExternallyControlled.OnValueChanged += HandleExternalControlChanged;
ApplyDraggingState();
}
public override void OnNetworkDespawn()
{
SpawnedDraggables.Remove(this);
firstDraggerClientId.OnValueChanged -= HandleDraggerChanged;
secondDraggerClientId.OnValueChanged -= HandleDraggerChanged;
isExternallyControlled.OnValueChanged -= HandleExternalControlChanged;
RestorePlayerCollisions();
}
@@ -144,7 +162,7 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
private void FixedUpdate()
{
if (!IsServer || !IsSpawned || physicsBody == null)
if (!IsServer || !IsSpawned || physicsBody == null || IsExternallyControlled)
return;
RemoveInvalidDraggers();
@@ -177,9 +195,17 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
}
}
protected override bool CanInteractOnServer(ulong senderClientId) =>
IsDragger(senderClientId) ||
ActiveDraggerCount < maximumDraggers;
protected override bool CanInteractOnServer(ulong senderClientId)
{
if (IsExternallyControlled)
return false;
if (IsDragger(senderClientId))
return true;
return ActiveDraggerCount < maximumDraggers &&
!TryGetDraggedObject(senderClientId, this, out _);
}
protected override void InteractOnServer(ulong senderClientId, NetworkObject playerObject)
{
@@ -191,6 +217,9 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
private void AddDragger(ulong clientId)
{
if (IsExternallyControlled || TryGetDraggedObject(clientId, this, out _))
return;
if (firstDraggerClientId.Value == NoDragger)
firstDraggerClientId.Value = clientId;
else if (maximumDraggers > 1 && secondDraggerClientId.Value == NoDragger)
@@ -265,19 +294,78 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
if (clientId == NoDragger || !TryGetPlayerObject(clientId, out NetworkObject playerObject))
return;
Transform dragAnchor = ResolveDragAnchor(playerObject);
target += dragAnchor.TransformPoint(dragOffset);
forward += dragAnchor.forward;
FirstPersonCameraController cameraController =
playerObject.GetComponent<FirstPersonCameraController>();
Vector3 aimForward = cameraController != null
? cameraController.AimForward
: playerObject.transform.forward;
target += playerObject.transform.position +
playerObject.transform.right * dragOffset.x +
Vector3.up * dragOffset.y +
aimForward * dragOffset.z;
forward += aimForward;
validTargets++;
}
private static Transform ResolveDragAnchor(NetworkObject playerObject)
private static bool TryGetDraggedObject(
ulong clientId,
NetworkDraggableInteractable except,
out NetworkDraggableInteractable draggedObject)
{
FirstPersonCameraController cameraController =
playerObject.GetComponent<FirstPersonCameraController>();
return cameraController != null
? cameraController.AimTransform
: playerObject.transform;
foreach (NetworkDraggableInteractable candidate in SpawnedDraggables)
{
if (candidate != null && candidate != except && candidate.IsDragger(clientId))
{
draggedObject = candidate;
return true;
}
}
draggedObject = null;
return false;
}
public static bool TryGetDraggedObject(
ulong clientId,
out NetworkDraggableInteractable draggedObject) =>
TryGetDraggedObject(clientId, null, out draggedObject);
public void RequestRelease()
{
if (IsSpawned && IsDraggedByLocalPlayer)
RequestReleaseRpc();
}
public bool TryAcquireExternalControl()
{
if (!IsServer || !IsSpawned || IsExternallyControlled)
return false;
isExternallyControlled.Value = true;
firstDraggerClientId.Value = NoDragger;
secondDraggerClientId.Value = NoDragger;
ApplyDraggingState();
return true;
}
public bool TryReleaseExternalControl()
{
if (!IsServer || !IsSpawned || !IsExternallyControlled)
return false;
isExternallyControlled.Value = false;
ApplyDraggingState();
return true;
}
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
private void RequestReleaseRpc(RpcParams rpcParams = default)
{
ulong senderClientId = rpcParams.Receive.SenderClientId;
if (!IsExternallyControlled && IsDragger(senderClientId))
RemoveDragger(senderClientId);
}
private bool IsDragger(ulong clientId) =>
@@ -285,11 +373,13 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
private void HandleDraggerChanged(ulong _, ulong __) => ApplyDraggingState();
private void HandleExternalControlChanged(bool _, bool __) => ApplyDraggingState();
private void ApplyDraggingState()
{
if (physicsBody != null)
{
bool shouldBeKinematic = HasAnyDragger || !IsServer;
bool shouldBeKinematic = HasAnyDragger || IsExternallyControlled || !IsServer;
if (physicsBody.isKinematic && !shouldBeKinematic)
physicsBody.isKinematic = false;
@@ -303,7 +393,7 @@ public sealed class NetworkDraggableInteractable : NetworkInteractable
physicsBody.isKinematic = shouldBeKinematic;
}
if (HasAnyDragger)
if (HasAnyDragger || IsExternallyControlled)
{
dragVelocity = Vector3.zero;
CacheGroundContactPoint();
@@ -4,7 +4,7 @@ using Unity.Netcode.Components;
using UnityEngine;
[RequireComponent(typeof(Rigidbody), typeof(NetworkRigidbody))]
public abstract class NetworkHeldInteractable : NetworkInteractable
public abstract class NetworkHeldInteractable : NetworkInteractable, IWorkstationItemControl
{
protected const ulong NoHolder = ulong.MaxValue;
private static readonly HashSet<NetworkHeldInteractable> SpawnedHeldObjects = new();
@@ -0,0 +1,5 @@
public interface IWorkstationItemControl
{
bool TryAcquireExternalControl();
bool TryReleaseExternalControl();
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b32c69f6645bac8499f4e8e068e84034
@@ -16,12 +16,22 @@ public sealed class PlayerCarryController : NetworkBehaviour, IPlayerSystem
if (!isInitialized || !IsOwner || Keyboard.current == null)
return;
if (Keyboard.current.gKey.wasPressedThisFrame &&
NetworkHeldInteractable.TryGetHeldObject(
if (!Keyboard.current.gKey.wasPressedThisFrame)
return;
if (NetworkHeldInteractable.TryGetHeldObject(
OwnerClientId,
out NetworkHeldInteractable heldObject))
{
heldObject.RequestThrow();
return;
}
if (NetworkDraggableInteractable.TryGetDraggedObject(
OwnerClientId,
out NetworkDraggableInteractable draggedObject))
{
draggedObject.RequestRelease();
}
}
}
@@ -1,43 +1,116 @@
using Unity.Netcode;
using UnityEngine;
using UnityEngine.SceneManagement;
public sealed class PlayerSpawnController : NetworkBehaviour, IPlayerSystem
{
[Header("Random spawn area")]
[SerializeField] private Vector3 spawnCenter = new(0f, 1f, 0f);
[SerializeField, Min(0f)] private float spawnRadius = 8f;
[Header("Start Room Spawn")]
[SerializeField, Min(0f)] private float edgePadding = 0.75f;
[SerializeField, Min(0f)] private float heightAboveFloor = 0.15f;
private readonly NetworkVariable<Vector3> assignedSpawnPosition = new(
Vector3.zero,
NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private readonly NetworkVariable<bool> hasAssignedSpawnPosition = new(
false,
NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private int assignedSceneHandle = -1;
public void Initialize(PlayerFacade facade) { }
public override void OnNetworkSpawn()
{
assignedSpawnPosition.OnValueChanged += HandleSpawnPositionChanged;
hasAssignedSpawnPosition.OnValueChanged += HandleSpawnAssignmentChanged;
SceneManager.sceneLoaded += HandleSceneLoaded;
if (IsServer)
{
Vector2 randomOffset = Random.insideUnitCircle * spawnRadius;
assignedSpawnPosition.Value = spawnCenter + new Vector3(randomOffset.x, 0f, randomOffset.y);
}
TryAssignStartRoomPosition(SceneManager.GetActiveScene());
ApplySpawnPosition(assignedSpawnPosition.Value);
if (hasAssignedSpawnPosition.Value)
ApplySpawnPosition(assignedSpawnPosition.Value);
}
public override void OnNetworkDespawn()
{
assignedSpawnPosition.OnValueChanged -= HandleSpawnPositionChanged;
hasAssignedSpawnPosition.OnValueChanged -= HandleSpawnAssignmentChanged;
SceneManager.sceneLoaded -= HandleSceneLoaded;
}
private void HandleSpawnPositionChanged(Vector3 _, Vector3 position) =>
ApplySpawnPosition(position);
private void HandleSceneLoaded(Scene scene, LoadSceneMode _)
{
if (IsServer)
TryAssignStartRoomPosition(scene);
if (IsOwner && hasAssignedSpawnPosition.Value)
ApplySpawnPosition(assignedSpawnPosition.Value);
}
private void TryAssignStartRoomPosition(Scene scene)
{
if (!scene.IsValid() || !scene.isLoaded || scene.handle == assignedSceneHandle)
return;
StartRoomZone startRoom = FindStartRoomInScene(scene);
if (startRoom == null ||
!startRoom.TryGetRandomSpawnPosition(
edgePadding,
heightAboveFloor,
out Vector3 position))
{
return;
}
hasAssignedSpawnPosition.Value = false;
assignedSpawnPosition.Value = position;
hasAssignedSpawnPosition.Value = true;
assignedSceneHandle = scene.handle;
}
private static StartRoomZone FindStartRoomInScene(Scene scene)
{
foreach (GameObject rootObject in scene.GetRootGameObjects())
{
StartRoomZone startRoom = rootObject.GetComponentInChildren<StartRoomZone>(true);
if (startRoom != null)
return startRoom;
}
return null;
}
private void HandleSpawnPositionChanged(Vector3 _, Vector3 position)
{
if (hasAssignedSpawnPosition.Value)
ApplySpawnPosition(position);
}
private void HandleSpawnAssignmentChanged(bool _, bool isAssigned)
{
if (isAssigned)
ApplySpawnPosition(assignedSpawnPosition.Value);
}
private void ApplySpawnPosition(Vector3 position)
{
if (IsOwner)
transform.position = position;
if (!IsOwner)
return;
CharacterController characterController = GetComponent<CharacterController>();
bool restoreCharacterController = characterController != null && characterController.enabled;
if (restoreCharacterController)
characterController.enabled = false;
transform.position = position;
Physics.SyncTransforms();
if (restoreCharacterController)
characterController.enabled = true;
}
}
@@ -5,6 +5,8 @@ public sealed class StartRoomZone : MonoBehaviour
{
[SerializeField] private Collider roomCollider;
public Collider RoomCollider => roomCollider;
private void Awake()
{
if (roomCollider == null)
@@ -14,6 +16,56 @@ public sealed class StartRoomZone : MonoBehaviour
public bool Contains(Vector3 worldPosition) =>
roomCollider != null && roomCollider.bounds.Contains(worldPosition);
public bool TryGetRandomSpawnPosition(
float edgePadding,
float heightAboveFloor,
out Vector3 position)
{
if (roomCollider == null)
{
position = default;
return false;
}
edgePadding = Mathf.Max(0f, edgePadding);
heightAboveFloor = Mathf.Max(0f, heightAboveFloor);
if (roomCollider is BoxCollider boxCollider)
{
Vector3 lossyScale = boxCollider.transform.lossyScale;
float localPaddingX = edgePadding / Mathf.Max(Mathf.Abs(lossyScale.x), 0.0001f);
float localPaddingZ = edgePadding / Mathf.Max(Mathf.Abs(lossyScale.z), 0.0001f);
Vector3 halfSize = boxCollider.size * 0.5f;
float availableX = Mathf.Max(0f, halfSize.x - localPaddingX);
float availableZ = Mathf.Max(0f, halfSize.z - localPaddingZ);
Vector3 localPosition = boxCollider.center + new Vector3(
Random.Range(-availableX, availableX),
-halfSize.y,
Random.Range(-availableZ, availableZ));
position = boxCollider.transform.TransformPoint(localPosition) +
Vector3.up * heightAboveFloor;
return true;
}
Bounds bounds = roomCollider.bounds;
float minX = bounds.min.x + edgePadding;
float maxX = bounds.max.x - edgePadding;
float minZ = bounds.min.z + edgePadding;
float maxZ = bounds.max.z - edgePadding;
if (minX > maxX)
minX = maxX = bounds.center.x;
if (minZ > maxZ)
minZ = maxZ = bounds.center.z;
position = new Vector3(
Random.Range(minX, maxX),
bounds.min.y + heightAboveFloor,
Random.Range(minZ, maxZ));
return true;
}
private void OnDrawGizmosSelected()
{
Collider targetCollider = roomCollider != null ? roomCollider : GetComponent<Collider>();

Some files were not shown because too many files have changed in this diff Show More