upgrade project to Unity 2022.3.20f1; added Firefighters tutorial sample
This commit is contained in:
Родитель
524b89ba8d
Коммит
dfed85a8f4
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fcddfdf0a0c455948857edd167f05567
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0b4107891d0c3944c9f13732f8e1fbdf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,136 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Bot
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
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:
|
||||
- _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}
|
||||
- _SpecGlossMap:
|
||||
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:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 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
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.96765494, g: 0.96765494, b: 0.96765494, a: 1}
|
||||
- _Color: {r: 0.9676549, g: 0.9676549, b: 0.9676549, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4161072326146699601
|
||||
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: 9
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f47189dbdece1fb44890c26ca4f59179
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,115 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &7617736419631500257
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3968136297195343062}
|
||||
- component: {fileID: 8817418051151405481}
|
||||
- component: {fileID: 892600723304269254}
|
||||
- component: {fileID: 1508303894266272074}
|
||||
- component: {fileID: 5458224309099213252}
|
||||
m_Layer: 0
|
||||
m_Name: Bot
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3968136297195343062
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7617736419631500257}
|
||||
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: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &8817418051151405481
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7617736419631500257}
|
||||
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &892600723304269254
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7617736419631500257}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: f47189dbdece1fb44890c26ca4f59179, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!114 &1508303894266272074
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7617736419631500257}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0b3a5b904577432caee0c330e405f2ae, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &5458224309099213252
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7617736419631500257}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 54b6467bcd530cd4d809fae70ea0ca9d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 11c94bbf6254f8c49a0856eb8249f822
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,136 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Bucket
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
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:
|
||||
- _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}
|
||||
- _SpecGlossMap:
|
||||
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:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 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
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.7196765, g: 0.55190444, b: 0.15809602, a: 1}
|
||||
- _Color: {r: 0.7196765, g: 0.55190444, b: 0.15809599, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4161072326146699601
|
||||
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: 9
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 49e1bb443ba000c4987ef8545c61d154
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,101 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5696387106628140823
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7711677526983123552}
|
||||
- component: {fileID: 6958529004797437313}
|
||||
- component: {fileID: 5944643397789063073}
|
||||
- component: {fileID: 8599475204996331559}
|
||||
m_Layer: 0
|
||||
m_Name: Bucket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7711677526983123552
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5696387106628140823}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &6958529004797437313
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5696387106628140823}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &5944643397789063073
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5696387106628140823}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 49e1bb443ba000c4987ef8545c61d154, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!114 &8599475204996331559
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5696387106628140823}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 08389ca27c7d4c529e2eef6dd7fce902, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1524e7924de7efe45b503c1ee08c665d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,90 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3349105744269617154
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6783663000442884203}
|
||||
- component: {fileID: 4905523592888443407}
|
||||
- component: {fileID: 7709179001885154505}
|
||||
m_Layer: 0
|
||||
m_Name: Config
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6783663000442884203
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3349105744269617154}
|
||||
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: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &4905523592888443407
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3349105744269617154}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 45a816694ee07cb44b84ddadfcf64446, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ExecuteHeatSystem: 0
|
||||
ExecuteBotSystem: 0
|
||||
ExecuteBucketSystem: 0
|
||||
ExecuteTeamSystem: 0
|
||||
--- !u!114 &7709179001885154505
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3349105744269617154}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8068faf49fce1dc40a5824ba89e81e8c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
NumPondsPerEdge: 12
|
||||
NumTeams: 1
|
||||
NumPassersPerTeam: 6
|
||||
BotMoveSpeed: 3
|
||||
LineMaxOffset: 4
|
||||
BucketFillRate: 0.2
|
||||
NumBuckets: 15
|
||||
BucketEmptyColor: {r: 0.7142856, g: 0.49193817, b: 0.010589104, a: 0}
|
||||
BucketFullColor: {r: 0.12673904, g: 0.5658311, b: 0.6765498, a: 0}
|
||||
BucketEmptyScale: 0.5
|
||||
BucketFullScale: 1.5
|
||||
GroundNumColumns: 30
|
||||
GroundNumRows: 50
|
||||
MinHeatColor: {r: 0.06266501, g: 0.63342315, b: 0, a: 0}
|
||||
MaxHeatColor: {r: 0.76819396, g: 0, b: 0, a: 0}
|
||||
HeatSpreadSpeed: 0.03
|
||||
HeatOscillationScale: 0.2
|
||||
NumInitialCellsOnFire: 8
|
||||
HeatDouseTargetMin: 0.3
|
||||
BotPrefab: {fileID: 7617736419631500257, guid: 11c94bbf6254f8c49a0856eb8249f822,
|
||||
type: 3}
|
||||
BucketPrefab: {fileID: 5696387106628140823, guid: 1524e7924de7efe45b503c1ee08c665d,
|
||||
type: 3}
|
||||
PondPrefab: {fileID: 7617736419631500257, guid: 381ecf56cacf4b84d95df331287a9ebf,
|
||||
type: 3}
|
||||
GroundCellPrefab: {fileID: 3422103013957337004, guid: 0142cf2bddc0e2f448344a8fb2222b4c,
|
||||
type: 3}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 564374f1656a67c498c706bc5dd35446
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,56 @@
|
|||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public class ExecuteAuthoring : MonoBehaviour
|
||||
{
|
||||
public bool ExecuteHeatSystem;
|
||||
public bool ExecuteBotSystem;
|
||||
public bool ExecuteBucketSystem;
|
||||
public bool ExecuteTeamSystem;
|
||||
|
||||
class Baker : Baker<ExecuteAuthoring>
|
||||
{
|
||||
public override void Bake(ExecuteAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.None);
|
||||
if (authoring.ExecuteHeatSystem)
|
||||
{
|
||||
AddComponent<ExecuteHeat>(entity);
|
||||
}
|
||||
|
||||
if (authoring.ExecuteBotSystem)
|
||||
{
|
||||
AddComponent<ExecuteBot>(entity);
|
||||
}
|
||||
|
||||
if (authoring.ExecuteBucketSystem)
|
||||
{
|
||||
AddComponent<ExecuteBucket>(entity);
|
||||
}
|
||||
|
||||
if (authoring.ExecuteTeamSystem)
|
||||
{
|
||||
AddComponent<ExecuteTeam>(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct ExecuteHeat : IComponentData
|
||||
{
|
||||
}
|
||||
|
||||
public struct ExecuteBot : IComponentData
|
||||
{
|
||||
}
|
||||
|
||||
public struct ExecuteBucket : IComponentData
|
||||
{
|
||||
}
|
||||
|
||||
public struct ExecuteTeam : IComponentData
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 45a816694ee07cb44b84ddadfcf64446
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,136 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: GroundCell
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
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:
|
||||
- _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}
|
||||
- _SpecGlossMap:
|
||||
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:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 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
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.03096816, g: 0.7412399, b: 0.068869434, a: 1}
|
||||
- _Color: {r: 0.030968158, g: 0.74123985, b: 0.06886941, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4161072326146699601
|
||||
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: 9
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c6783ada3abd08e4da7ee544f4da3636
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,115 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3422103013957337004
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5272849772967664852}
|
||||
- component: {fileID: 5081271029593083767}
|
||||
- component: {fileID: 5225535430291467057}
|
||||
- component: {fileID: 4092817527056160960}
|
||||
- component: {fileID: -8141255891050650970}
|
||||
m_Layer: 0
|
||||
m_Name: GroundCell
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5272849772967664852
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3422103013957337004}
|
||||
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: 3, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &5081271029593083767
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3422103013957337004}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &5225535430291467057
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3422103013957337004}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: c6783ada3abd08e4da7ee544f4da3636, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!114 &4092817527056160960
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3422103013957337004}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 54b6467bcd530cd4d809fae70ea0ca9d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
--- !u!114 &-8141255891050650970
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3422103013957337004}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 460161403cae4a9293d7c93b822a226b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0142cf2bddc0e2f448344a8fb2222b4c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,136 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Pond
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
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:
|
||||
- _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}
|
||||
- _SpecGlossMap:
|
||||
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:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 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
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0.48650226, b: 0.84905654, a: 1}
|
||||
- _Color: {r: 0, g: 0.48650223, b: 0.84905654, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4161072326146699601
|
||||
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: 9
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 54847b8c13ba8fa408839543adec1af2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,101 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &7617736419631500257
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3968136297195343062}
|
||||
- component: {fileID: 8817418051151405481}
|
||||
- component: {fileID: 892600723304269254}
|
||||
- component: {fileID: 363851745999995180}
|
||||
m_Layer: 0
|
||||
m_Name: Pond
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3968136297195343062
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7617736419631500257}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!33 &8817418051151405481
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7617736419631500257}
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &892600723304269254
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7617736419631500257}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 54847b8c13ba8fa408839543adec1af2, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!114 &363851745999995180
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7617736419631500257}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bbbc29a275d344f2b514c63d05ec7b30, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 381ecf56cacf4b84d95df331287a9ebf
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a7b80ee998021394384bf1230aea24ca
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,44 @@
|
|||
using Unity.Entities;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public class BotAuthoring : MonoBehaviour
|
||||
{
|
||||
private class Baker : Baker<BotAuthoring>
|
||||
{
|
||||
public override void Bake(BotAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent<Bot>(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct Bot : IComponentData
|
||||
{
|
||||
public BotState State;
|
||||
public float2 TargetPos; // Where the bot is moving to.
|
||||
public float2 LinePos; // The bot's place in line where they stand when idle.
|
||||
public Entity NextBot; // The next bot in line (will pass the bucket to this bot).
|
||||
public bool IsDouser; // Is the bot at end of the line that douses the fire.
|
||||
public bool IsFiller; // Is the bot at the end of the line that fills the bucket. Also responsible for fetching the bucket.
|
||||
public Entity Bucket; // The bucket that the bot is carrying.
|
||||
public bool IsCarrying; // True if carrying a bucket.
|
||||
public Entity Team; // The team to which the bot belongs.
|
||||
}
|
||||
|
||||
public enum BotState
|
||||
{
|
||||
IDLE,
|
||||
CLAIM_BUCKET,
|
||||
MOVE_TO_BUCKET,
|
||||
FILL_BUCKET,
|
||||
PASS_BUCKET,
|
||||
DOUSE_FIRE,
|
||||
MOVE_TO_LINE,
|
||||
WAIT_IN_LINE,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0b3a5b904577432caee0c330e405f2ae
|
||||
timeCreated: 1706574803
|
|
@ -0,0 +1,28 @@
|
|||
using Unity.Entities;
|
||||
using Unity.Rendering;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public class BucketAuthoring : MonoBehaviour
|
||||
{
|
||||
private class Baker : Baker<BucketAuthoring>
|
||||
{
|
||||
public override void Bake(BucketAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent<Bucket>(entity);
|
||||
AddComponent<URPMaterialPropertyBaseColor>(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct Bucket : IComponentData
|
||||
{
|
||||
public float Water; // 0 = empty, 1 = full
|
||||
|
||||
public Entity CarryingBot;
|
||||
public bool IsCarried;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 08389ca27c7d4c529e2eef6dd7fce902
|
||||
timeCreated: 1706574835
|
|
@ -0,0 +1,27 @@
|
|||
using Unity.Entities;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public struct Team : IComponentData
|
||||
{
|
||||
public Entity Filler;
|
||||
public Entity Douser;
|
||||
public bool HasBucket;
|
||||
}
|
||||
|
||||
// all bots in the team (including the Filler and Douser) in order of passing, starting with the Filler
|
||||
public struct TeamMember : IBufferElementData
|
||||
{
|
||||
public Entity Bot;
|
||||
}
|
||||
|
||||
// used as a flag to signal that the team needs to be repositioned
|
||||
public struct RepositionLine : IComponentData, IEnableableComponent
|
||||
{
|
||||
}
|
||||
|
||||
public struct Heat : IBufferElementData
|
||||
{
|
||||
public float Value;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d9b33a5e45194c8d8838a491edad556c
|
||||
timeCreated: 1707112697
|
|
@ -0,0 +1,113 @@
|
|||
using Unity.Entities;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public class ConfigAuthoring : MonoBehaviour
|
||||
{
|
||||
[Header("Ponds")]
|
||||
public int NumPondsPerEdge;
|
||||
|
||||
[Header("Bots")]
|
||||
public int NumTeams;
|
||||
public int NumPassersPerTeam;
|
||||
public int BotMoveSpeed = 3; // units per second
|
||||
public float LineMaxOffset = 4;
|
||||
|
||||
[Header("Buckets")]
|
||||
public float BucketFillRate;
|
||||
public int NumBuckets;
|
||||
public Color BucketEmptyColor;
|
||||
public Color BucketFullColor;
|
||||
public float BucketEmptyScale;
|
||||
public float BucketFullScale;
|
||||
|
||||
[Header("Ground")]
|
||||
public int GroundNumColumns;
|
||||
public int GroundNumRows;
|
||||
|
||||
[Header("Heat")]
|
||||
public Color MinHeatColor;
|
||||
public Color MaxHeatColor;
|
||||
public float HeatSpreadSpeed;
|
||||
public float HeatOscillationScale;
|
||||
public int NumInitialCellsOnFire;
|
||||
public float HeatDouseTargetMin;
|
||||
|
||||
[Header("Prefabs")]
|
||||
public GameObject BotPrefab;
|
||||
public GameObject BucketPrefab;
|
||||
public GameObject PondPrefab;
|
||||
public GameObject GroundCellPrefab;
|
||||
|
||||
class Baker : Baker<ConfigAuthoring>
|
||||
{
|
||||
public override void Bake(ConfigAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.None);
|
||||
AddComponent(entity, new Config
|
||||
{
|
||||
GroundNumColumns = authoring.GroundNumColumns,
|
||||
GroundNumRows = authoring.GroundNumRows,
|
||||
NumPondsPerEdge = authoring.NumPondsPerEdge,
|
||||
NumTeams = math.max(authoring.NumTeams, 1),
|
||||
NumPassersPerTeam =
|
||||
(math.max(authoring.NumPassersPerTeam, 4) / 2) *
|
||||
2, // round down to even number and set min to 4
|
||||
BotMoveSpeed = authoring.BotMoveSpeed,
|
||||
LineMaxOffset = authoring.LineMaxOffset,
|
||||
NumBuckets = authoring.NumBuckets,
|
||||
BucketFillRate = authoring.BucketFillRate,
|
||||
MinHeatColor = (Vector4)authoring.MinHeatColor,
|
||||
MaxHeatColor = (Vector4)authoring.MaxHeatColor,
|
||||
BucketEmptyColor = (Vector4)authoring.BucketEmptyColor,
|
||||
BucketFullColor = (Vector4)authoring.BucketFullColor,
|
||||
BucketEmptyScale = authoring.BucketEmptyScale,
|
||||
BucketFullScale = authoring.BucketFullScale,
|
||||
NumInitialCellsOnFire = authoring.NumInitialCellsOnFire,
|
||||
HeatSpreadSpeed = authoring.HeatSpreadSpeed,
|
||||
HeatDouseTargetMin = authoring.HeatDouseTargetMin,
|
||||
HeatOscillationScale = authoring.HeatOscillationScale,
|
||||
GroundCellYScale = authoring.GroundCellPrefab.transform.localScale.y,
|
||||
BotPrefab = GetEntity(authoring.BotPrefab, TransformUsageFlags.Dynamic),
|
||||
BucketPrefab = GetEntity(authoring.BucketPrefab, TransformUsageFlags.Dynamic),
|
||||
PondPrefab = GetEntity(authoring.PondPrefab, TransformUsageFlags.Dynamic),
|
||||
GroundCellPrefab = GetEntity(authoring.GroundCellPrefab, TransformUsageFlags.Dynamic),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct Config : IComponentData
|
||||
{
|
||||
public int GroundNumColumns;
|
||||
public int GroundNumRows;
|
||||
public int NumPondsPerEdge;
|
||||
public int NumTeams;
|
||||
public int NumPassersPerTeam;
|
||||
public int BotMoveSpeed;
|
||||
public float LineMaxOffset;
|
||||
public int NumBuckets;
|
||||
|
||||
public float4 MinHeatColor;
|
||||
public float4 MaxHeatColor;
|
||||
public float HeatSpreadSpeed;
|
||||
public float HeatDouseTargetMin;
|
||||
public float HeatOscillationScale;
|
||||
public int NumInitialCellsOnFire;
|
||||
public float GroundCellYScale;
|
||||
|
||||
public float4 BucketEmptyColor;
|
||||
public float4 BucketFullColor;
|
||||
public float BucketEmptyScale;
|
||||
public float BucketFullScale;
|
||||
public float BucketFillRate;
|
||||
|
||||
public Entity BotPrefab;
|
||||
public Entity BucketPrefab;
|
||||
public Entity PondPrefab;
|
||||
public Entity GroundCellPrefab;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8068faf49fce1dc40a5824ba89e81e8c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,412 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &1558064315
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1558064318}
|
||||
- component: {fileID: 1558064317}
|
||||
- component: {fileID: 1558064316}
|
||||
- component: {fileID: 1558064319}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1558064316
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1558064315}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1558064317
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1558064315}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1558064318
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1558064315}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1558064319
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1558064315}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
m_TaaSettings:
|
||||
quality: 3
|
||||
frameInfluence: 0.1
|
||||
jitterScale: 1
|
||||
mipBias: 0
|
||||
varianceClampScale: 0.9
|
||||
contrastAdaptiveSharpening: 0
|
||||
--- !u!1 &2081370983
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2081370985}
|
||||
- component: {fileID: 2081370984}
|
||||
m_Layer: 0
|
||||
m_Name: Firefighters_Step1_Subscene
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2081370984
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2081370983}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 45a335734b1572644a6a5d09d87adc65, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_SceneAsset: {fileID: 102900000, guid: 7ee0aa83baf6da74cb91ae7bfcaf0b9a, type: 3}
|
||||
_HierarchyColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
AutoLoadScene: 1
|
||||
_SceneGUID:
|
||||
Value:
|
||||
x: 950669031
|
||||
y: 1202548651
|
||||
z: 3085572540
|
||||
w: 2846948047
|
||||
--- !u!4 &2081370985
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2081370983}
|
||||
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: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2143709434
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2143709436}
|
||||
- component: {fileID: 2143709435}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &2143709435
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2143709434}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 11
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ForceVisible: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &2143709436
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2143709434}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1558064318}
|
||||
- {fileID: 2143709436}
|
||||
- {fileID: 2081370985}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fe86e1dabe820ca4a869baac33ce5d7a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,23 @@
|
|||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public class GroundCellAuthoring : MonoBehaviour
|
||||
{
|
||||
private class Baker : Baker<GroundCellAuthoring>
|
||||
{
|
||||
public override void Bake(GroundCellAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent<GroundCell>(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct GroundCell : IComponentData
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 460161403cae4a9293d7c93b822a226b
|
||||
timeCreated: 1706574880
|
|
@ -0,0 +1,23 @@
|
|||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public class PondAuthoring : MonoBehaviour
|
||||
{
|
||||
private class Baker : Baker<PondAuthoring>
|
||||
{
|
||||
public override void Bake(PondAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent<Pond>(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct Pond : IComponentData
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bbbc29a275d344f2b514c63d05ec7b30
|
||||
timeCreated: 1706574190
|
|
@ -0,0 +1,214 @@
|
|||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
using Unity.Mathematics;
|
||||
using Unity.Rendering;
|
||||
using Unity.Transforms;
|
||||
using Random = Unity.Mathematics.Random;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public partial struct SpawnSystem : ISystem
|
||||
{
|
||||
[BurstCompile]
|
||||
public void OnCreate(ref SystemState state)
|
||||
{
|
||||
state.RequireForUpdate<Config>();
|
||||
}
|
||||
|
||||
[BurstCompile]
|
||||
public void OnUpdate(ref SystemState state)
|
||||
{
|
||||
state.Enabled = false;
|
||||
|
||||
var config = SystemAPI.GetSingleton<Config>();
|
||||
var rand = new Random(123);
|
||||
|
||||
// spawn teams
|
||||
{
|
||||
int numBotsPerTeam = config.NumPassersPerTeam + 1;
|
||||
int douserIdx = (config.NumPassersPerTeam / 2);
|
||||
for (int teamIdx = 0; teamIdx < config.NumTeams; teamIdx++)
|
||||
{
|
||||
var teamEntity = state.EntityManager.CreateEntity();
|
||||
var team = new Team();
|
||||
state.EntityManager.AddComponent<RepositionLine>(teamEntity);
|
||||
var memberBuffer = state.EntityManager.AddBuffer<TeamMember>(teamEntity);
|
||||
memberBuffer.Capacity = numBotsPerTeam;
|
||||
var teamColor = new float4(rand.NextFloat3(), 1);
|
||||
|
||||
// spawn bots
|
||||
for (int botIdx = 0; botIdx < numBotsPerTeam; botIdx++)
|
||||
{
|
||||
var botEntity = state.EntityManager.Instantiate(config.BotPrefab);
|
||||
|
||||
var x = rand.NextFloat(0.5f, config.GroundNumColumns - 0.5f);
|
||||
var z = rand.NextFloat(0.5f, config.GroundNumRows - 0.5f);
|
||||
|
||||
state.EntityManager.SetComponentData(botEntity, LocalTransform.FromPosition(x, 1, z));
|
||||
state.EntityManager.SetComponentData(botEntity, new URPMaterialPropertyBaseColor
|
||||
{
|
||||
Value = teamColor
|
||||
});
|
||||
|
||||
// designate the filler and the douser
|
||||
if (botIdx == 0)
|
||||
{
|
||||
team.Filler = botEntity;
|
||||
}
|
||||
else if (botIdx == douserIdx)
|
||||
{
|
||||
team.Douser = botEntity;
|
||||
}
|
||||
|
||||
memberBuffer.Add(new TeamMember { Bot = botEntity });
|
||||
}
|
||||
|
||||
// connect each bot to the next in line, forming a passing ring
|
||||
for (int botIdx = 0; botIdx < memberBuffer.Length; botIdx++)
|
||||
{
|
||||
Entity nextBot;
|
||||
if (botIdx == memberBuffer.Length - 1)
|
||||
{
|
||||
nextBot = memberBuffer[0].Bot; // next is filler
|
||||
}
|
||||
else
|
||||
{
|
||||
nextBot = memberBuffer[botIdx + 1].Bot;
|
||||
}
|
||||
|
||||
state.EntityManager.SetComponentData(memberBuffer[botIdx].Bot, new Bot
|
||||
{
|
||||
NextBot = nextBot,
|
||||
Team = teamEntity,
|
||||
IsFiller = (botIdx == 0),
|
||||
IsDouser = (botIdx == douserIdx),
|
||||
});
|
||||
}
|
||||
|
||||
state.EntityManager.AddComponentData(teamEntity, team);
|
||||
}
|
||||
}
|
||||
|
||||
// spawn buckets
|
||||
{
|
||||
// struct components are returned and passed by value (as copies)!
|
||||
var bucketTransform = state.EntityManager.GetComponentData<LocalTransform>(config.BucketPrefab);
|
||||
bucketTransform.Position.y = (bucketTransform.Scale / 2); // will be same for every bucket
|
||||
|
||||
for (int i = 0; i < config.NumBuckets; i++)
|
||||
{
|
||||
var bucketEntity = state.EntityManager.Instantiate(config.BucketPrefab);
|
||||
|
||||
bucketTransform.Position.x = rand.NextFloat(0.5f, config.GroundNumColumns - 0.5f);
|
||||
bucketTransform.Position.z = rand.NextFloat(0.5f, config.GroundNumRows - 0.5f);
|
||||
bucketTransform.Scale = config.BucketEmptyScale;
|
||||
|
||||
state.EntityManager.SetComponentData(bucketEntity, bucketTransform);
|
||||
}
|
||||
}
|
||||
|
||||
// spawn ponds
|
||||
{
|
||||
var bounds = new NativeArray<float4>(4, Allocator.Temp);
|
||||
|
||||
const float innerMargin = 2; // margin between ground edge and pond area
|
||||
const float outerMargin = innerMargin + 3;
|
||||
float width = config.GroundNumColumns;
|
||||
float height = config.GroundNumRows;
|
||||
|
||||
// 4 sides around the field of ground cells
|
||||
// x, y is bottom-left corner; z, w is top-right corner
|
||||
bounds[0] = new float4(0.5f, -outerMargin, width - 0.5f, -innerMargin); // bottom
|
||||
bounds[1] = new float4(0.5f, height + innerMargin, width - 0.5f, height + outerMargin); // top
|
||||
bounds[2] = new float4(-outerMargin, 0.5f, -innerMargin, height - 0.5f); // left
|
||||
bounds[3] = new float4(width + innerMargin, 0.5f, width + outerMargin, height - 0.5f); // right
|
||||
|
||||
var pondTransform = state.EntityManager.GetComponentData<LocalTransform>(config.PondPrefab);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
var bottomLeft = bounds[i].xy;
|
||||
var topRight = bounds[i].zw;
|
||||
|
||||
for (int j = 0; j < config.NumPondsPerEdge; j++)
|
||||
{
|
||||
var pondEntity = state.EntityManager.Instantiate(config.PondPrefab);
|
||||
|
||||
var pos = rand.NextFloat2(bottomLeft, topRight);
|
||||
pondTransform.Position = new float3(pos.x, 0, pos.y);
|
||||
state.EntityManager.SetComponentData(pondEntity, pondTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// spawn field
|
||||
{
|
||||
var groundCellTransform = state.EntityManager.GetComponentData<LocalTransform>(config.GroundCellPrefab);
|
||||
groundCellTransform.Position.y = -(config.GroundCellYScale / 2);
|
||||
|
||||
for (int column = 0; column < config.GroundNumColumns; column++)
|
||||
{
|
||||
for (int row = 0; row < config.GroundNumRows; row++)
|
||||
{
|
||||
var groundCellEntity = state.EntityManager.Instantiate(config.GroundCellPrefab);
|
||||
groundCellTransform.Position.x = column + 0.5f;
|
||||
groundCellTransform.Position.z = row + 0.5f;
|
||||
state.EntityManager.SetComponentData(groundCellEntity, groundCellTransform);
|
||||
state.EntityManager.SetComponentData(groundCellEntity, new URPMaterialPropertyBaseColor
|
||||
{
|
||||
Value = config.MinHeatColor
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// spawn heat map
|
||||
{
|
||||
var entity = state.EntityManager.CreateEntity();
|
||||
var heatBuffer = state.EntityManager.AddBuffer<Heat>(entity);
|
||||
|
||||
// init the heat buffer
|
||||
{
|
||||
heatBuffer.Length = config.GroundNumColumns * config.GroundNumRows;
|
||||
// set every cell to zero
|
||||
for (int i = 0; i < heatBuffer.Length; i++)
|
||||
{
|
||||
heatBuffer[i] = new Heat { Value = 0f };
|
||||
}
|
||||
}
|
||||
|
||||
// set some random cells on fire
|
||||
{
|
||||
for (int i = 0; i < config.NumInitialCellsOnFire; i++)
|
||||
{
|
||||
var randomIdx = rand.NextInt(0, heatBuffer.Length);
|
||||
heatBuffer[randomIdx] = new Heat { Value = 1f };
|
||||
}
|
||||
}
|
||||
|
||||
// Move the ground cells so that their query iteration order corresponds to indexes of the heat buffer.
|
||||
// (As long as the set of entities matched by the query stays the same, the query iteration order will remain the same.
|
||||
// So, this will make it easy/fast to update the color and height of the ground cells from the heat data.)
|
||||
{
|
||||
var x = 0;
|
||||
var z = 0;
|
||||
|
||||
foreach (var trans in
|
||||
SystemAPI.Query<RefRW<LocalTransform>>()
|
||||
.WithAll<GroundCell>())
|
||||
{
|
||||
trans.ValueRW.Position.x = x + 0.5f;
|
||||
trans.ValueRW.Position.z = z + 0.5f;
|
||||
|
||||
x++;
|
||||
if (x >= config.GroundNumColumns)
|
||||
{
|
||||
x = 0;
|
||||
z++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1206e9786f324876a77f171dd26a1391
|
||||
timeCreated: 1706524177
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4b09c47cd353a3b4ba042af47c576423
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,194 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &5211116711164273307
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3349105744269617154, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Config
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 564374f1656a67c498c706bc5dd35446, type: 3}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 5211116711164273307}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7ee0aa83baf6da74cb91ae7bfcaf0b9a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b677296236c15644691ec856c75361cb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,412 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &910989860
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 910989863}
|
||||
- component: {fileID: 910989862}
|
||||
- component: {fileID: 910989861}
|
||||
- component: {fileID: 910989864}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &910989861
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 910989860}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &910989862
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 910989860}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &910989863
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 910989860}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.14734356, y: 0.16819644, z: -0.025435105, w: 0.9743474}
|
||||
m_LocalPosition: {x: 0.19, y: 12.36, z: -9.75}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 17.199, y: 19.588, z: 0}
|
||||
--- !u!114 &910989864
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 910989860}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
m_TaaSettings:
|
||||
quality: 3
|
||||
frameInfluence: 0.1
|
||||
jitterScale: 1
|
||||
mipBias: 0
|
||||
varianceClampScale: 0.9
|
||||
contrastAdaptiveSharpening: 0
|
||||
--- !u!1 &1959455687
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1959455689}
|
||||
- component: {fileID: 1959455688}
|
||||
m_Layer: 0
|
||||
m_Name: Firefighters_Step2Subscene
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1959455688
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1959455687}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 45a335734b1572644a6a5d09d87adc65, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_SceneAsset: {fileID: 102900000, guid: 220488dec14c50944a8d0957baaf6745, type: 3}
|
||||
_HierarchyColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
AutoLoadScene: 1
|
||||
_SceneGUID:
|
||||
Value:
|
||||
x: 3985129506
|
||||
y: 1225114652
|
||||
z: 1972426916
|
||||
w: 1417083563
|
||||
--- !u!4 &1959455689
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1959455687}
|
||||
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: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1967677263
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1967677265}
|
||||
- component: {fileID: 1967677264}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1967677264
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1967677263}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 11
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ForceVisible: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1967677265
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1967677263}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 910989863}
|
||||
- {fileID: 1967677265}
|
||||
- {fileID: 1959455689}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 07e3ef7682c5ad147abe47a119d75da0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,377 @@
|
|||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
using Unity.Jobs;
|
||||
using Unity.Mathematics;
|
||||
using Unity.Rendering;
|
||||
using Unity.Transforms;
|
||||
using UnityEngine;
|
||||
using Random = Unity.Mathematics.Random;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public partial struct HeatSystem : ISystem
|
||||
{
|
||||
[BurstCompile]
|
||||
public void OnCreate(ref SystemState state)
|
||||
{
|
||||
state.RequireForUpdate<Config>();
|
||||
state.RequireForUpdate<GroundCell>();
|
||||
state.RequireForUpdate<Heat>();
|
||||
state.RequireForUpdate<ExecuteHeat>();
|
||||
}
|
||||
|
||||
[BurstCompile]
|
||||
public void OnUpdate(ref SystemState state)
|
||||
{
|
||||
var config = SystemAPI.GetSingleton<Config>();
|
||||
DynamicBuffer<Heat> heatBuffer = SystemAPI.GetSingletonBuffer<Heat>(false);
|
||||
|
||||
// simulate the heat spreading
|
||||
{
|
||||
//HeatSpread_MainThread(ref state, heatBuffer, config);
|
||||
//state.Dependency = HeatSpread_SingleThreadedJob(state.Dependency, ref state, heatBuffer, config);
|
||||
state.Dependency = HeatSpread_ParallelJob(state.Dependency, ref state, heatBuffer, config);
|
||||
}
|
||||
|
||||
// update the colors and heights of the ground cells from the heat data
|
||||
{
|
||||
//GroundCellUpdate_MainThread(ref state, heatBuffer, config);
|
||||
//state.Dependency = GroundCellUpdate_SingleThreadedJob(state.Dependency, ref state, heatBuffer, config);
|
||||
state.Dependency = GroundCellUpdate_ParallelJob(state.Dependency, ref state, heatBuffer, config);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void HeatSpread_MainThread(ref SystemState state, DynamicBuffer<Heat> heatBuffer, Config config)
|
||||
{
|
||||
var heatRW = heatBuffer;
|
||||
NativeArray<Heat> heatRO = heatBuffer.ToNativeArray(Allocator.Temp);
|
||||
var speed = SystemAPI.Time.DeltaTime * config.HeatSpreadSpeed;
|
||||
int numColumns = config.GroundNumColumns;
|
||||
int numRows = config.GroundNumRows;
|
||||
|
||||
for (int index = 0; index < heatRO.Length; index++)
|
||||
{
|
||||
int row = index / numColumns;
|
||||
int col = index % numRows;
|
||||
|
||||
var prevCol = col - 1;
|
||||
var nextCol = col + 1;
|
||||
var prevRow = row - 1;
|
||||
var nextRow = row + 1;
|
||||
|
||||
float increase = 0;
|
||||
|
||||
increase += Index(row, nextCol, heatRO, numColumns, numRows);
|
||||
increase += Index(row, prevCol, heatRO, numColumns, numRows);
|
||||
|
||||
increase += Index(prevRow, prevCol, heatRO, numColumns, numRows);
|
||||
increase += Index(prevRow, col, heatRO, numColumns, numRows);
|
||||
increase += Index(prevRow, nextCol, heatRO, numColumns, numRows);
|
||||
|
||||
increase += Index(nextRow, prevCol, heatRO, numColumns, numRows);
|
||||
increase += Index(nextRow, col, heatRO, numColumns, numRows);
|
||||
increase += Index(nextRow, nextCol, heatRO, numColumns, numRows);
|
||||
|
||||
increase *= speed;
|
||||
|
||||
heatRW[index] = new Heat
|
||||
{
|
||||
Value = math.min(1, heatRO[index].Value + increase)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private static float Index(int row, int col, NativeArray<Heat> heatRO, int numColumns, int numRows)
|
||||
{
|
||||
if (col < 0 || col >= numColumns ||
|
||||
row < 0 || row >= numRows)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return heatRO[row * numColumns + col].Value;
|
||||
}
|
||||
|
||||
private JobHandle HeatSpread_SingleThreadedJob(JobHandle dependency, ref SystemState state,
|
||||
DynamicBuffer<Heat> heatBuffer, Config config)
|
||||
{
|
||||
var heatSpreadJob = new HeatSpreadJob_SingleThreaded()
|
||||
{
|
||||
heatRW = heatBuffer.AsNativeArray(),
|
||||
heatRO = heatBuffer.ToNativeArray(state.WorldUpdateAllocator),
|
||||
HeatSpreadSpeed = SystemAPI.Time.DeltaTime * config.HeatSpreadSpeed,
|
||||
NumColumns = config.GroundNumColumns,
|
||||
NumRows = config.GroundNumRows
|
||||
};
|
||||
return heatSpreadJob.Schedule(dependency);
|
||||
}
|
||||
|
||||
[BurstCompile]
|
||||
public struct HeatSpreadJob_SingleThreaded : IJob
|
||||
{
|
||||
public NativeArray<Heat> heatRW;
|
||||
[ReadOnly] public NativeArray<Heat> heatRO;
|
||||
public float HeatSpreadSpeed;
|
||||
public int NumColumns;
|
||||
public int NumRows;
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
for (int index = 0; index < heatRO.Length; index++)
|
||||
{
|
||||
int row = index / NumColumns;
|
||||
int col = index % NumColumns;
|
||||
|
||||
var prevCol = col - 1;
|
||||
var nextCol = col + 1;
|
||||
var prevRow = row - 1;
|
||||
var nextRow = row + 1;
|
||||
|
||||
float increase = 0;
|
||||
|
||||
increase += Index(row, nextCol);
|
||||
increase += Index(row, prevCol);
|
||||
|
||||
increase += Index(prevRow, prevCol);
|
||||
increase += Index(prevRow, col);
|
||||
increase += Index(prevRow, nextCol);
|
||||
|
||||
increase += Index(nextRow, prevCol);
|
||||
increase += Index(nextRow, col);
|
||||
increase += Index(nextRow, nextCol);
|
||||
|
||||
increase *= HeatSpreadSpeed;
|
||||
|
||||
heatRW[index] = new Heat
|
||||
{
|
||||
Value = math.min(1, heatRO[index].Value + increase)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private float Index(int row, int col)
|
||||
{
|
||||
if (col < 0 || col >= NumColumns ||
|
||||
row < 0 || row >= NumRows)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return heatRO[row * NumColumns + col].Value;
|
||||
}
|
||||
}
|
||||
|
||||
private JobHandle HeatSpread_ParallelJob(JobHandle dependency, ref SystemState state,
|
||||
DynamicBuffer<Heat> heatBuffer, Config config)
|
||||
{
|
||||
var heatSpreadJob = new HeatSpreadJob_Parallel
|
||||
{
|
||||
heatRW = heatBuffer.AsNativeArray(),
|
||||
heatRO = heatBuffer.ToNativeArray(state.WorldUpdateAllocator),
|
||||
HeatSpreadSpeed = SystemAPI.Time.DeltaTime * config.HeatSpreadSpeed,
|
||||
NumColumns = config.GroundNumColumns,
|
||||
NumRows = config.GroundNumRows
|
||||
};
|
||||
return heatSpreadJob.Schedule(heatBuffer.Length, 100, dependency);
|
||||
}
|
||||
|
||||
[BurstCompile]
|
||||
public struct HeatSpreadJob_Parallel : IJobParallelFor
|
||||
{
|
||||
public NativeArray<Heat> heatRW;
|
||||
[ReadOnly] public NativeArray<Heat> heatRO;
|
||||
public float HeatSpreadSpeed;
|
||||
public int NumColumns;
|
||||
public int NumRows;
|
||||
|
||||
public void Execute(int index)
|
||||
{
|
||||
int row = index / NumColumns;
|
||||
int col = index % NumColumns;
|
||||
|
||||
var prevCol = col - 1;
|
||||
var nextCol = col + 1;
|
||||
var prevRow = row - 1;
|
||||
var nextRow = row + 1;
|
||||
|
||||
float increase = 0;
|
||||
|
||||
increase += Index(row, nextCol);
|
||||
increase += Index(row, prevCol);
|
||||
|
||||
increase += Index(prevRow, prevCol);
|
||||
increase += Index(prevRow, col);
|
||||
increase += Index(prevRow, nextCol);
|
||||
|
||||
increase += Index(nextRow, prevCol);
|
||||
increase += Index(nextRow, col);
|
||||
increase += Index(nextRow, nextCol);
|
||||
|
||||
increase *= HeatSpreadSpeed;
|
||||
|
||||
heatRW[index] = new Heat
|
||||
{
|
||||
Value = math.min(1, heatRO[index].Value + increase)
|
||||
};
|
||||
}
|
||||
|
||||
private float Index(int row, int col)
|
||||
{
|
||||
if (col < 0 || col >= NumColumns ||
|
||||
row < 0 || row >= NumRows)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return heatRO[row * NumColumns + col].Value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void GroundCellUpdate_MainThread(ref SystemState state, DynamicBuffer<Heat> heatBuffer, Config config)
|
||||
{
|
||||
int idx = 0;
|
||||
var minY = -(config.GroundCellYScale / 2);
|
||||
var maxY = minY + config.GroundCellYScale;
|
||||
var elapsedTime = (float)SystemAPI.Time.ElapsedTime;
|
||||
|
||||
foreach (var (trans, color) in
|
||||
SystemAPI.Query<RefRW<LocalTransform>, RefRW<URPMaterialPropertyBaseColor>>()
|
||||
.WithAll<GroundCell>())
|
||||
{
|
||||
var heat = heatBuffer[idx].Value;
|
||||
|
||||
// oscillate the displayed heat so that the fire looks a little more organic
|
||||
{
|
||||
var radians = Random.CreateFromIndex((uint)idx).NextFloat(math.PI * 2) + elapsedTime;
|
||||
var oscillationOffset =
|
||||
math.sin(radians) * heat * config.HeatOscillationScale; // the more heat, the more oscillation
|
||||
heat += oscillationOffset;
|
||||
}
|
||||
|
||||
trans.ValueRW.Position.y = math.lerp(minY, maxY, heat);
|
||||
color.ValueRW.Value = math.lerp(config.MinHeatColor, config.MaxHeatColor, heat);
|
||||
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
|
||||
private JobHandle GroundCellUpdate_SingleThreadedJob(JobHandle dependency, ref SystemState state,
|
||||
DynamicBuffer<Heat> heatBuffer, Config config)
|
||||
{
|
||||
var minY = -(config.GroundCellYScale / 2);
|
||||
var groundCellUpdateJob = new GroundCellUpdate
|
||||
{
|
||||
Config = config,
|
||||
HeatBuffer = heatBuffer,
|
||||
ElapsedTime = (float)SystemAPI.Time.ElapsedTime,
|
||||
MinY = minY,
|
||||
MaxY = minY + config.GroundCellYScale,
|
||||
};
|
||||
|
||||
return groundCellUpdateJob.Schedule(dependency);
|
||||
}
|
||||
|
||||
private JobHandle GroundCellUpdate_ParallelJob(JobHandle dependency, ref SystemState state,
|
||||
DynamicBuffer<Heat> heatBuffer, Config config)
|
||||
{
|
||||
var minY = -(config.GroundCellYScale / 2);
|
||||
var groundCellUpdateJob = new GroundCellUpdate
|
||||
{
|
||||
Config = config,
|
||||
HeatBuffer = heatBuffer,
|
||||
ElapsedTime = (float)SystemAPI.Time.ElapsedTime,
|
||||
MinY = minY,
|
||||
MaxY = minY + config.GroundCellYScale,
|
||||
};
|
||||
|
||||
return groundCellUpdateJob.ScheduleParallel(dependency);
|
||||
}
|
||||
|
||||
[WithAll(typeof(GroundCell))]
|
||||
[BurstCompile]
|
||||
public partial struct GroundCellUpdate : IJobEntity
|
||||
{
|
||||
public float ElapsedTime;
|
||||
public Config Config;
|
||||
[ReadOnly] public DynamicBuffer<Heat> HeatBuffer;
|
||||
public float MinY;
|
||||
public float MaxY;
|
||||
|
||||
public void Execute(ref LocalTransform trans, ref URPMaterialPropertyBaseColor color, [EntityIndexInQuery] int entityIdx)
|
||||
{
|
||||
var heat = HeatBuffer[entityIdx].Value;
|
||||
|
||||
// oscillate the displayed heat so that the fire looks a little more organic
|
||||
{
|
||||
var radians = Random.CreateFromIndex((uint)entityIdx).NextFloat(math.PI * 2) + ElapsedTime;
|
||||
var oscillationOffset =
|
||||
math.sin(radians) * heat * Config.HeatOscillationScale; // the more heat, the more oscillation
|
||||
heat += oscillationOffset;
|
||||
}
|
||||
|
||||
trans.Position.y = math.lerp(MinY, MaxY, heat);
|
||||
color.Value = math.lerp(Config.MinHeatColor, Config.MaxHeatColor, heat);
|
||||
|
||||
entityIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
// douse a cell and all surrounding cells
|
||||
public static void DouseFire(float2 location, DynamicBuffer<Heat> heatBuffer, int numRows, int numCols)
|
||||
{
|
||||
int col = (int)location.x;
|
||||
int row = (int)location.y;
|
||||
|
||||
DouseCell(row, col, heatBuffer, numRows, numCols);
|
||||
DouseCell(row, col + 1, heatBuffer, numRows, numCols);
|
||||
DouseCell(row, col - 1, heatBuffer, numRows, numCols);
|
||||
DouseCell(row - 1, col, heatBuffer, numRows, numCols);
|
||||
DouseCell(row - 1, col + 1, heatBuffer, numRows, numCols);
|
||||
DouseCell(row - 1, col - 1, heatBuffer, numRows, numCols);
|
||||
DouseCell(row + 1, col, heatBuffer, numRows, numCols);
|
||||
DouseCell(row + 1, col + 1, heatBuffer, numRows, numCols);
|
||||
DouseCell(row + 1, col - 1, heatBuffer, numRows, numCols);
|
||||
}
|
||||
|
||||
private static void DouseCell(int row, int col, DynamicBuffer<Heat> heatBuffer, int numRows, int numCols)
|
||||
{
|
||||
if (col < 0 || col >= numCols ||
|
||||
row < 0 || row >= numRows)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
heatBuffer[row * numCols + col] = new Heat { Value = 0 };
|
||||
}
|
||||
|
||||
public static float2 NearestFire(float2 location, DynamicBuffer<Heat> heatBuffer, int numRows, int numCols, float minHeat)
|
||||
{
|
||||
var closestFirePos = new float2(0.5f, 0.5f);
|
||||
var closestDistSq = float.MaxValue;
|
||||
|
||||
// check every cell
|
||||
for (int col = 0; col < numCols; col++)
|
||||
{
|
||||
for (int row = 0; row < numRows; row++)
|
||||
{
|
||||
if (heatBuffer[row * numCols + col].Value > minHeat) // is cell on fire
|
||||
{
|
||||
var firePos = new float2(col + 0.5f, row + 0.5f);
|
||||
var distSq = math.distancesq(location, firePos);
|
||||
|
||||
if (distSq < closestDistSq)
|
||||
{
|
||||
closestFirePos = firePos;
|
||||
closestDistSq = distSq;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return closestFirePos;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7fe8ea2061b543a6ae5404781e8db838
|
||||
timeCreated: 1706591347
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 29bf9480029a73347b60d24f2fc35d7c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,215 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &198298636
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3349105744269617154, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Config
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4905523592888443407, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: ExecuteHeatSystem
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: GroundNumRows
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: GroundNumColumns
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: NumInitialCellsOnFire
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 7014638666242036355, guid: 564374f1656a67c498c706bc5dd35446, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 564374f1656a67c498c706bc5dd35446, type: 3}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 198298636}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 220488dec14c50944a8d0957baaf6745
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: acecc92d9b57eda4ab06c28b1f0b32ab
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,205 @@
|
|||
using Unity.Burst;
|
||||
using Unity.Entities;
|
||||
using Unity.Mathematics;
|
||||
using Unity.Transforms;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public partial struct BotSystem : ISystem
|
||||
{
|
||||
private uint seed;
|
||||
|
||||
[BurstCompile]
|
||||
public void OnCreate(ref SystemState state)
|
||||
{
|
||||
state.RequireForUpdate<Config>();
|
||||
state.RequireForUpdate<Heat>();
|
||||
state.RequireForUpdate<ExecuteBot>();
|
||||
}
|
||||
|
||||
[BurstCompile]
|
||||
public void OnUpdate(ref SystemState state)
|
||||
{
|
||||
var config = SystemAPI.GetSingleton<Config>();
|
||||
var dt = SystemAPI.Time.DeltaTime;
|
||||
var moveSpeed = dt * config.BotMoveSpeed;
|
||||
var fillRate = dt * config.BucketFillRate;
|
||||
|
||||
var heatBuffer = SystemAPI.GetSingletonBuffer<Heat>();
|
||||
|
||||
BotUpdate_MainThread(ref state, heatBuffer, moveSpeed, fillRate, config.GroundNumRows, config.GroundNumColumns);
|
||||
}
|
||||
|
||||
private void BotUpdate_MainThread(ref SystemState state, DynamicBuffer<Heat> heatBuffer, float moveSpeed,
|
||||
float fillRate, int numRows,
|
||||
int numCols)
|
||||
{
|
||||
foreach (var (bot, botTrans, botEntity) in
|
||||
SystemAPI.Query<RefRW<Bot>, RefRW<LocalTransform>>()
|
||||
.WithEntityAccess())
|
||||
{
|
||||
switch (bot.ValueRO.State)
|
||||
{
|
||||
case BotState.CLAIM_BUCKET:
|
||||
{
|
||||
// (only put the filler into this state if the team doesn't yet have a bucket)
|
||||
foreach (var (bucket, bucketTrans, bucketEntity) in
|
||||
SystemAPI.Query<RefRW<Bucket>, RefRO<LocalTransform>>()
|
||||
.WithEntityAccess())
|
||||
{
|
||||
// claim first unclaimed bucket
|
||||
if (bucket.ValueRO.CarryingBot == Entity.Null)
|
||||
{
|
||||
bucket.ValueRW.CarryingBot = botEntity;
|
||||
bot.ValueRW.Bucket = bucketEntity;
|
||||
bot.ValueRW.TargetPos = bucketTrans.ValueRO.Position.xz;
|
||||
bot.ValueRW.State = BotState.MOVE_TO_BUCKET;
|
||||
|
||||
var team = SystemAPI.GetComponentRW<Team>(bot.ValueRO.Team);
|
||||
team.ValueRW.HasBucket = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case BotState.MOVE_TO_BUCKET:
|
||||
{
|
||||
if (MoveToTarget(ref botTrans.ValueRW, bot.ValueRO.TargetPos, moveSpeed))
|
||||
{
|
||||
var bucket = SystemAPI.GetComponentRW<Bucket>(bot.ValueRO.Bucket);
|
||||
bucket.ValueRW.IsCarried = true;
|
||||
bot.ValueRW.IsCarrying = true;
|
||||
|
||||
bot.ValueRW.TargetPos = bot.ValueRO.LinePos; // was set in TeamSystem
|
||||
bot.ValueRW.State = BotState.MOVE_TO_LINE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case BotState.FILL_BUCKET:
|
||||
{
|
||||
var bucket = SystemAPI.GetComponentRW<Bucket>(bot.ValueRO.Bucket);
|
||||
var val = fillRate + bucket.ValueRO.Water;
|
||||
if (val < 1.0f) // keep filling
|
||||
{
|
||||
bucket.ValueRW.Water = fillRate + bucket.ValueRO.Water;
|
||||
}
|
||||
else // done filling
|
||||
{
|
||||
bucket.ValueRW.Water = 1;
|
||||
bot.ValueRW.State = BotState.PASS_BUCKET;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case BotState.DOUSE_FIRE:
|
||||
{
|
||||
// (only a douser should be put in this state)
|
||||
if (MoveToTarget(ref botTrans.ValueRW, bot.ValueRO.TargetPos, moveSpeed))
|
||||
{
|
||||
var bucket = SystemAPI.GetComponentRW<Bucket>(bot.ValueRO.Bucket);
|
||||
bucket.ValueRW.Water = 0;
|
||||
|
||||
HeatSystem.DouseFire(bot.ValueRO.TargetPos, heatBuffer, numRows, numCols);
|
||||
|
||||
SystemAPI.SetComponentEnabled<RepositionLine>(bot.ValueRO.Team, true);
|
||||
|
||||
bot.ValueRW.State = BotState.MOVE_TO_LINE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case BotState.PASS_BUCKET:
|
||||
{
|
||||
// the next bot should generally not be moving while we're passing to it, but just in case, we get its current pos
|
||||
var targetPos = SystemAPI.GetComponent<LocalTransform>(bot.ValueRO.NextBot).Position.xz;
|
||||
if (MoveToTarget(ref botTrans.ValueRW, targetPos, moveSpeed))
|
||||
{
|
||||
var bucket = SystemAPI.GetComponentRW<Bucket>(bot.ValueRO.Bucket);
|
||||
bucket.ValueRW.CarryingBot = bot.ValueRO.NextBot;
|
||||
|
||||
var otherBot = SystemAPI.GetComponentRW<Bot>(bot.ValueRO.NextBot);
|
||||
otherBot.ValueRW.IsCarrying = true;
|
||||
otherBot.ValueRW.Bucket = bot.ValueRO.Bucket;
|
||||
|
||||
bot.ValueRW.IsCarrying = false;
|
||||
bot.ValueRW.Bucket = Entity.Null;
|
||||
bot.ValueRW.State = BotState.MOVE_TO_LINE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case BotState.MOVE_TO_LINE:
|
||||
{
|
||||
if (MoveToTarget(ref botTrans.ValueRW, bot.ValueRO.LinePos, moveSpeed))
|
||||
{
|
||||
bot.ValueRW.State = BotState.WAIT_IN_LINE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case BotState.WAIT_IN_LINE:
|
||||
{
|
||||
if (!bot.ValueRO.IsCarrying)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (bot.ValueRO.IsFiller)
|
||||
{
|
||||
var bucket = SystemAPI.GetComponentRW<Bucket>(bot.ValueRO.Bucket);
|
||||
if (bucket.ValueRO.Water < 1)
|
||||
{
|
||||
bot.ValueRW.State = BotState.FILL_BUCKET;
|
||||
}
|
||||
else // full bucket
|
||||
{
|
||||
bot.ValueRW.State = BotState.PASS_BUCKET;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (bot.ValueRO.IsDouser)
|
||||
{
|
||||
var bucket = SystemAPI.GetComponentRW<Bucket>(bot.ValueRO.Bucket);
|
||||
if (bucket.ValueRO.Water > 0)
|
||||
{
|
||||
bot.ValueRW.State = BotState.DOUSE_FIRE;
|
||||
}
|
||||
else // empty bucket
|
||||
{
|
||||
bot.ValueRW.State = BotState.PASS_BUCKET;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
bot.ValueRW.State = BotState.PASS_BUCKET;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return true if advanced up to or past the target pos
|
||||
private static bool MoveToTarget(ref LocalTransform botTrans, float2 targetPos, float moveSpeed)
|
||||
{
|
||||
var pos = botTrans.Position;
|
||||
var dir = targetPos - pos.xz;
|
||||
var moveVector = math.normalizesafe(dir) * moveSpeed;
|
||||
|
||||
if (math.lengthsq(moveVector) >= math.lengthsq(dir))
|
||||
{
|
||||
botTrans.Position.x = targetPos.x;
|
||||
botTrans.Position.z = targetPos.y;
|
||||
return true;
|
||||
}
|
||||
|
||||
botTrans.Position += new float3(moveVector.x, 0, moveVector.y);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a644020fb5a945108872c9e4022ba7c4
|
||||
timeCreated: 1706692420
|
|
@ -0,0 +1,39 @@
|
|||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
using Unity.Mathematics;
|
||||
using Unity.Rendering;
|
||||
using Unity.Transforms;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public partial struct BucketSystem : ISystem
|
||||
{
|
||||
[BurstCompile]
|
||||
public void OnCreate(ref SystemState state)
|
||||
{
|
||||
state.RequireForUpdate<Config>();
|
||||
state.RequireForUpdate<ExecuteBucket>();
|
||||
}
|
||||
|
||||
[BurstCompile]
|
||||
public void OnUpdate(ref SystemState state)
|
||||
{
|
||||
var config = SystemAPI.GetSingleton<Config>();
|
||||
|
||||
foreach (var (bucket, trans, color) in
|
||||
SystemAPI.Query<RefRW<Bucket>, RefRW<LocalTransform>, RefRW<URPMaterialPropertyBaseColor>>())
|
||||
{
|
||||
// todo we only really need to update the color when the water value changes
|
||||
color.ValueRW.Value = math.lerp(config.BucketEmptyColor, config.BucketFullColor, bucket.ValueRO.Water);
|
||||
trans.ValueRW.Scale = math.lerp(config.BucketEmptyScale, config.BucketFullScale, bucket.ValueRO.Water);
|
||||
|
||||
if (bucket.ValueRO.IsCarried)
|
||||
{
|
||||
var botTrans = SystemAPI.GetComponent<LocalTransform>(bucket.ValueRO.CarryingBot);
|
||||
trans.ValueRW.Position = botTrans.Position + new float3(0, 1, 0); // place above the bot's head
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 49e4482452c543da99d910257703ba7c
|
||||
timeCreated: 1707096022
|
|
@ -0,0 +1,367 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &776551997
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 776551999}
|
||||
- component: {fileID: 776551998}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &776551998
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 776551997}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 11
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ForceVisible: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &776551999
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 776551997}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1568938494
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1568938497}
|
||||
- component: {fileID: 1568938496}
|
||||
- component: {fileID: 1568938495}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1568938495
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1568938494}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1568938496
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1568938494}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1568938497
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1568938494}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1945632554
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1945632556}
|
||||
- component: {fileID: 1945632555}
|
||||
m_Layer: 0
|
||||
m_Name: Firefighters_Step3Subscene
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1945632555
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1945632554}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 45a335734b1572644a6a5d09d87adc65, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_SceneAsset: {fileID: 102900000, guid: f96d7e4d93e8a334b83ebc55f51c5b58, type: 3}
|
||||
_HierarchyColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
AutoLoadScene: 1
|
||||
_SceneGUID:
|
||||
Value:
|
||||
x: 3571963551
|
||||
y: 1127910969
|
||||
z: 1439425419
|
||||
w: 2243281247
|
||||
--- !u!4 &1945632556
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1945632554}
|
||||
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: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1568938497}
|
||||
- {fileID: 776551999}
|
||||
- {fileID: 1945632556}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9c8bae10102bd5648852d0a68780f7d0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,89 @@
|
|||
using Unity.Burst;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
using Unity.Mathematics;
|
||||
using Unity.Transforms;
|
||||
using UnityEngine;
|
||||
using Random = Unity.Mathematics.Random;
|
||||
|
||||
namespace Tutorials.Firefighters
|
||||
{
|
||||
public partial struct LineSystem : ISystem
|
||||
{
|
||||
private uint seed;
|
||||
|
||||
[BurstCompile]
|
||||
public void OnCreate(ref SystemState state)
|
||||
{
|
||||
state.RequireForUpdate<Config>();
|
||||
state.RequireForUpdate<RepositionLine>();
|
||||
state.RequireForUpdate<Heat>();
|
||||
state.RequireForUpdate<Team>();
|
||||
state.RequireForUpdate<ExecuteTeam>();
|
||||
}
|
||||
|
||||
[BurstCompile]
|
||||
public void OnUpdate(ref SystemState state)
|
||||
{
|
||||
var config = SystemAPI.GetSingleton<Config>();
|
||||
var rand = new Random(123 + seed++); // seed is incremented to get different random values in different frames
|
||||
|
||||
var pondQuery = SystemAPI.QueryBuilder().WithAll<Pond, LocalTransform>().Build();
|
||||
var pondPositions = pondQuery.ToComponentDataArray<LocalTransform>(Allocator.Temp);
|
||||
|
||||
var heatBuffer = SystemAPI.GetSingletonBuffer<Heat>();
|
||||
|
||||
// EnabledRefRW gives us access to the enabled state of RepositionLine.
|
||||
// The query will only match entities whose RepositionLine is enabled.
|
||||
foreach (var (team, members, respositionLineState) in
|
||||
SystemAPI.Query<RefRO<Team>, DynamicBuffer<TeamMember>, EnabledRefRW<RepositionLine>>())
|
||||
{
|
||||
respositionLineState.ValueRW = false; // disable RepositionLine
|
||||
|
||||
// set LinePos of the team's bots and set their bot state
|
||||
{
|
||||
var randomPondPos = pondPositions[rand.NextInt(pondPositions.Length)].Position.xz;
|
||||
var nearestFirePos = HeatSystem.NearestFire(randomPondPos, heatBuffer,
|
||||
config.GroundNumRows, config.GroundNumColumns, config.HeatDouseTargetMin);
|
||||
|
||||
var douserIdx = members.Length / 2;
|
||||
|
||||
var vec = nearestFirePos - randomPondPos;
|
||||
var vecNorm = math.normalize(vec);
|
||||
var offsetVec = new float2(-vecNorm.y, vecNorm.x);
|
||||
|
||||
for (int i = 1; i <= douserIdx; i++)
|
||||
{
|
||||
var ratio = (float)i / (douserIdx + 1);
|
||||
var offsetScale = math.sin(math.lerp(0, math.PI, ratio));
|
||||
var pos = math.lerp(randomPondPos, nearestFirePos, ratio);
|
||||
|
||||
var bot = SystemAPI.GetComponentRW<Bot>(members[i].Bot);
|
||||
bot.ValueRW.State = BotState.MOVE_TO_LINE;
|
||||
bot.ValueRW.LinePos = pos + offsetScale * offsetVec;
|
||||
|
||||
if (bot.ValueRO.IsDouser)
|
||||
{
|
||||
bot.ValueRW.TargetPos = nearestFirePos;
|
||||
}
|
||||
|
||||
var otherBot = SystemAPI.GetComponentRW<Bot>(members[^i].Bot);
|
||||
otherBot.ValueRW.State = BotState.MOVE_TO_LINE;
|
||||
otherBot.ValueRW.LinePos = pos - offsetScale * offsetVec;
|
||||
}
|
||||
|
||||
var filler = SystemAPI.GetComponentRW<Bot>(team.ValueRO.Filler);
|
||||
filler.ValueRW.LinePos = randomPondPos;
|
||||
if (team.ValueRO.HasBucket)
|
||||
{
|
||||
filler.ValueRW.State = BotState.MOVE_TO_LINE;
|
||||
}
|
||||
else
|
||||
{
|
||||
filler.ValueRW.State = BotState.CLAIM_BUCKET;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2bd2640e09d542a58e326a2f9cc3e65f
|
||||
timeCreated: 1707110877
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 425fa6a0f056f584cafd0ad3128ab598
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,260 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &1127853403
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3349105744269617154, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Config
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4905523592888443407, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: ExecuteBotSystem
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4905523592888443407, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: ExecuteHeatSystem
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4905523592888443407, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: ExecuteTeamSystem
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4905523592888443407, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: ExecuteBucketSystem
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6783663000442884203, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: NumTeams
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: NumBuckets
|
||||
value: 140
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: BotMoveSpeed
|
||||
value: 20
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: GroundNumRows
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: HeatSpreadSpeed
|
||||
value: 0.01
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: NumPondsPerEdge
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: GroundNumColumns
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: NumPassersPerTeam
|
||||
value: 20
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7709179001885154505, guid: 564374f1656a67c498c706bc5dd35446,
|
||||
type: 3}
|
||||
propertyPath: NumInitialCellsOnFire
|
||||
value: 130
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 7014638666242036355, guid: 564374f1656a67c498c706bc5dd35446, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 564374f1656a67c498c706bc5dd35446, type: 3}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1127853403}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f96d7e4d93e8a334b83ebc55f51c5b58
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.collab-proxy": "2.0.4",
|
||||
"com.unity.collab-proxy": "2.2.0",
|
||||
"com.unity.entities.graphics": "1.0.10",
|
||||
"com.unity.feature.development": "1.0.1",
|
||||
"com.unity.ide.rider": "3.0.21",
|
||||
"com.unity.ide.visualstudio": "2.0.18",
|
||||
"com.unity.ide.rider": "3.0.27",
|
||||
"com.unity.ide.visualstudio": "2.0.22",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.render-pipelines.universal": "14.0.7",
|
||||
"com.unity.render-pipelines.universal": "14.0.10",
|
||||
"com.unity.textmeshpro": "3.0.6",
|
||||
"com.unity.ugui": "1.0.0",
|
||||
"com.unity.visualscripting": "1.8.0",
|
||||
"com.unity.visualscripting": "1.9.1",
|
||||
"com.unity.modules.ai": "1.0.0",
|
||||
"com.unity.modules.androidjni": "1.0.0",
|
||||
"com.unity.modules.animation": "1.0.0",
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.burst": {
|
||||
"version": "1.8.4",
|
||||
"version": "1.8.12",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.mathematics": "1.2.1"
|
||||
"com.unity.mathematics": "1.2.1",
|
||||
"com.unity.modules.jsonserialize": "1.0.0"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.collab-proxy": {
|
||||
"version": "2.0.4",
|
||||
"version": "2.2.0",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
|
@ -75,17 +76,17 @@
|
|||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.ide.visualstudio": "2.0.18",
|
||||
"com.unity.ide.rider": "3.0.21",
|
||||
"com.unity.ide.visualstudio": "2.0.22",
|
||||
"com.unity.ide.rider": "3.0.27",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.editorcoroutines": "1.0.0",
|
||||
"com.unity.performance.profile-analyzer": "1.2.2",
|
||||
"com.unity.test-framework": "1.1.33",
|
||||
"com.unity.testtools.codecoverage": "1.2.3"
|
||||
"com.unity.testtools.codecoverage": "1.2.5"
|
||||
}
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.21",
|
||||
"version": "3.0.27",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
@ -94,7 +95,7 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.visualstudio": {
|
||||
"version": "2.0.18",
|
||||
"version": "2.0.22",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
@ -138,7 +139,7 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.render-pipelines.core": {
|
||||
"version": "14.0.7",
|
||||
"version": "14.0.10",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
|
@ -149,18 +150,27 @@
|
|||
}
|
||||
},
|
||||
"com.unity.render-pipelines.universal": {
|
||||
"version": "14.0.7",
|
||||
"version": "14.0.10",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.mathematics": "1.2.1",
|
||||
"com.unity.burst": "1.8.4",
|
||||
"com.unity.render-pipelines.core": "14.0.7",
|
||||
"com.unity.shadergraph": "14.0.7"
|
||||
"com.unity.burst": "1.8.9",
|
||||
"com.unity.render-pipelines.core": "14.0.10",
|
||||
"com.unity.shadergraph": "14.0.10",
|
||||
"com.unity.render-pipelines.universal-config": "14.0.9"
|
||||
}
|
||||
},
|
||||
"com.unity.render-pipelines.universal-config": {
|
||||
"version": "14.0.9",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.render-pipelines.core": "14.0.9"
|
||||
}
|
||||
},
|
||||
"com.unity.scriptablebuildpipeline": {
|
||||
"version": "1.21.5",
|
||||
"version": "1.21.21",
|
||||
"depth": 2,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
|
@ -191,11 +201,11 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.shadergraph": {
|
||||
"version": "14.0.7",
|
||||
"version": "14.0.10",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.render-pipelines.core": "14.0.7",
|
||||
"com.unity.render-pipelines.core": "14.0.10",
|
||||
"com.unity.searcher": "4.9.2"
|
||||
}
|
||||
},
|
||||
|
@ -211,7 +221,7 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.testtools.codecoverage": {
|
||||
"version": "1.2.3",
|
||||
"version": "1.2.5",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
@ -239,7 +249,7 @@
|
|||
}
|
||||
},
|
||||
"com.unity.visualscripting": {
|
||||
"version": "1.8.0",
|
||||
"version": "1.9.1",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
m_EditorVersion: 2022.3.0f1
|
||||
m_EditorVersionWithRevision: 2022.3.0f1 (fb119bb0b476)
|
||||
m_EditorVersion: 2022.3.20f1
|
||||
m_EditorVersionWithRevision: 2022.3.20f1 (61c2feb0970d)
|
||||
|
|
Загрузка…
Ссылка в новой задаче