From c8d16360702e9e9e189e6ee97b4d20db4f10cd8e Mon Sep 17 00:00:00 2001 From: "Ram.Type-0" Date: Mon, 4 Jan 2021 20:02:53 +0900 Subject: [PATCH] Ported AutoFarmers - Using Hybrid Renderer V2 for rendering - Using Unity.Animation for sold plant animation --- Ported/DOTS-AutoFarmers/.vsconfig | 6 + Ported/DOTS-AutoFarmers/Assets/Materials.meta | 10 + .../Assets/Materials/Drone.mat | 126 ++ .../Assets/Materials/Drone.mat.meta | 10 + .../Assets/Materials/Farmer.mat | 126 ++ .../Assets/Materials/Farmer.mat.meta | 10 + .../Assets/Materials/Ground.mat | 104 ++ .../Assets/Materials/Ground.mat.meta | 10 + .../Assets/Materials/Plant.mat | 91 ++ .../Assets/Materials/Plant.mat.meta | 10 + .../Assets/Materials/Rock.mat | 126 ++ .../Assets/Materials/Rock.mat.meta | 10 + .../Assets/Materials/Store.mat | 129 ++ .../Assets/Materials/Store.mat.meta | 10 + Ported/DOTS-AutoFarmers/Assets/Prefabs.meta | 8 + .../Assets/Prefabs/Drone.prefab | 83 + .../Assets/Prefabs/Drone.prefab.meta | 7 + .../Assets/Prefabs/Farmer.prefab | 83 + .../Assets/Prefabs/Farmer.prefab.meta | 7 + .../Assets/Prefabs/GroundTile.prefab | 83 + .../Assets/Prefabs/GroundTile.prefab.meta | 7 + .../Assets/Prefabs/Plant.prefab | 83 + .../Assets/Prefabs/Plant.prefab.meta | 7 + .../Assets/Prefabs/Rock.prefab | 83 + .../Assets/Prefabs/Rock.prefab.meta | 7 + .../Assets/Prefabs/Store.prefab | 83 + .../Assets/Prefabs/Store.prefab.meta | 7 + Ported/DOTS-AutoFarmers/Assets/Scripts.meta | 10 + .../AutoFarmersInitializationSystemGroup.cs | 312 ++++ ...toFarmersInitializationSystemGroup.cs.meta | 11 + .../Assets/Scripts/CamFollow.cs | 50 + .../Assets/Scripts/CamFollow.cs.meta | 13 + .../Assets/Scripts/Components.cs | 236 +++ .../Assets/Scripts/Components.cs.meta | 11 + .../Scripts/DroneGlobalParamsAuthoring.cs | 35 + .../DroneGlobalParamsAuthoring.cs.meta | 11 + .../Scripts/DroneSimulationSystemGroup.cs | 244 +++ .../DroneSimulationSystemGroup.cs.meta | 11 + .../Assets/Scripts/Enums.meta | 10 + .../Assets/Scripts/Enums/GroundState.cs | 9 + .../Assets/Scripts/Enums/GroundState.cs.meta | 13 + .../Assets/Scripts/FarmAuthoring.cs | 70 + .../Assets/Scripts/FarmAuthoring.cs.meta | 11 + .../Scripts/FarmerGlobalParamsAuthoring.cs | 36 + .../FarmerGlobalParamsAuthoring.cs.meta | 11 + .../Scripts/FarmerSimulationSystemGroup.cs | 518 ++++++ .../FarmerSimulationSystemGroup.cs.meta | 11 + .../DOTS-AutoFarmers/Assets/Scripts/Helper.cs | 108 ++ .../Assets/Scripts/Helper.cs.meta | 11 + .../Assets/Scripts/Pathing.cs | 536 +++++++ .../Assets/Scripts/Pathing.cs.meta | 11 + .../Scripts/PlantSimulationSystemGroup.cs | 90 ++ .../PlantSimulationSystemGroup.cs.meta | 11 + Ported/DOTS-AutoFarmers/Assets/Shaders.meta | 10 + .../Assets/Shaders/Ground.shadergraph | 1414 +++++++++++++++++ .../Assets/Shaders/Ground.shadergraph.meta | 10 + .../Assets/Shaders/Plant.shadergraph | 685 ++++++++ .../Assets/Shaders/Plant.shadergraph.meta | 10 + Ported/DOTS-AutoFarmers/Assets/Textures.meta | 10 + .../Assets/Textures/ground default.png | Bin 0 -> 15450 bytes .../Assets/Textures/ground default.png.meta | 107 ++ .../Assets/Textures/ground tilled.png | Bin 0 -> 15419 bytes .../Assets/Textures/ground tilled.png.meta | 107 ++ .../Assets/UniversalRenderPipelineAsset.asset | 57 + .../UniversalRenderPipelineAsset.asset.meta | 8 + ...niversalRenderPipelineAsset_Renderer.asset | 45 + ...salRenderPipelineAsset_Renderer.asset.meta | 8 + Ported/DOTS-AutoFarmers/Assets/_Scenes.meta | 10 + .../Assets/_Scenes/farm.unity | 557 +++++++ .../Assets/_Scenes/farm.unity.meta | 9 + .../Assets/_Scenes/farmSettings.lighting | 63 + .../Assets/_Scenes/farmSettings.lighting.meta | 8 + .../DOTS-AutoFarmers/Packages/manifest.json | 53 + .../Packages/packages-lock.json | 594 +++++++ .../ProjectSettings/AudioManager.asset | 17 + .../ProjectSettings/ClusterInputManager.asset | 6 + .../ProjectSettings/DynamicsManager.asset | 29 + .../ProjectSettings/EditorBuildSettings.asset | 10 + .../ProjectSettings/EditorSettings.asset | 40 + .../ProjectSettings/GraphicsSettings.asset | 67 + .../ProjectSettings/InputManager.asset | 487 ++++++ .../ProjectSettings/NavMeshAreas.asset | 91 ++ .../ProjectSettings/NetworkManager.asset | 8 + .../PackageManagerSettings.asset | 43 + .../ProjectSettings/Physics2DSettings.asset | 37 + .../ProjectSettings/PresetManager.asset | 6 + .../ProjectSettings/ProjectSettings.asset | 644 ++++++++ .../ProjectSettings/ProjectVersion.txt | 2 + .../ProjectSettings/QualitySettings.asset | 239 +++ .../ProjectSettings/TagManager.asset | 43 + .../ProjectSettings/TimeManager.asset | 9 + .../ProjectSettings/URPProjectSettings.asset | 15 + .../UnityConnectSettings.asset | 34 + .../ProjectSettings/VFXManager.asset | 14 + .../VersionControlSettings.asset | 8 + .../ProjectSettings/XRSettings.asset | 10 + .../UserSettings/EditorUserSettings.asset | 30 + 97 files changed, 9380 insertions(+) create mode 100644 Ported/DOTS-AutoFarmers/.vsconfig create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Drone.mat create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Drone.mat.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Farmer.mat create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Farmer.mat.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Ground.mat create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Ground.mat.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Plant.mat create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Plant.mat.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Rock.mat create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Rock.mat.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Store.mat create mode 100644 Ported/DOTS-AutoFarmers/Assets/Materials/Store.mat.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Drone.prefab create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Drone.prefab.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Farmer.prefab create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Farmer.prefab.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/GroundTile.prefab create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/GroundTile.prefab.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Plant.prefab create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Plant.prefab.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Rock.prefab create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Rock.prefab.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Store.prefab create mode 100644 Ported/DOTS-AutoFarmers/Assets/Prefabs/Store.prefab.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/AutoFarmersInitializationSystemGroup.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/AutoFarmersInitializationSystemGroup.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/CamFollow.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/CamFollow.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/Components.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/Components.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/DroneGlobalParamsAuthoring.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/DroneGlobalParamsAuthoring.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/DroneSimulationSystemGroup.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/DroneSimulationSystemGroup.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/Enums.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/Enums/GroundState.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/Enums/GroundState.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/FarmAuthoring.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/FarmAuthoring.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerGlobalParamsAuthoring.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerGlobalParamsAuthoring.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerSimulationSystemGroup.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerSimulationSystemGroup.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/Helper.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/Helper.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/Pathing.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/Pathing.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/PlantSimulationSystemGroup.cs create mode 100644 Ported/DOTS-AutoFarmers/Assets/Scripts/PlantSimulationSystemGroup.cs.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Shaders.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Shaders/Ground.shadergraph create mode 100644 Ported/DOTS-AutoFarmers/Assets/Shaders/Ground.shadergraph.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Shaders/Plant.shadergraph create mode 100644 Ported/DOTS-AutoFarmers/Assets/Shaders/Plant.shadergraph.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Textures.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Textures/ground default.png create mode 100644 Ported/DOTS-AutoFarmers/Assets/Textures/ground default.png.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/Textures/ground tilled.png create mode 100644 Ported/DOTS-AutoFarmers/Assets/Textures/ground tilled.png.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/UniversalRenderPipelineAsset.asset create mode 100644 Ported/DOTS-AutoFarmers/Assets/UniversalRenderPipelineAsset.asset.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/UniversalRenderPipelineAsset_Renderer.asset create mode 100644 Ported/DOTS-AutoFarmers/Assets/UniversalRenderPipelineAsset_Renderer.asset.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/_Scenes.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/_Scenes/farm.unity create mode 100644 Ported/DOTS-AutoFarmers/Assets/_Scenes/farm.unity.meta create mode 100644 Ported/DOTS-AutoFarmers/Assets/_Scenes/farmSettings.lighting create mode 100644 Ported/DOTS-AutoFarmers/Assets/_Scenes/farmSettings.lighting.meta create mode 100644 Ported/DOTS-AutoFarmers/Packages/manifest.json create mode 100644 Ported/DOTS-AutoFarmers/Packages/packages-lock.json create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/AudioManager.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/ClusterInputManager.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/DynamicsManager.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/EditorBuildSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/EditorSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/GraphicsSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/InputManager.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/NavMeshAreas.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/NetworkManager.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/PackageManagerSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/Physics2DSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/PresetManager.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/ProjectSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/ProjectVersion.txt create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/QualitySettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/TagManager.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/TimeManager.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/URPProjectSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/UnityConnectSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/VFXManager.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/VersionControlSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/ProjectSettings/XRSettings.asset create mode 100644 Ported/DOTS-AutoFarmers/UserSettings/EditorUserSettings.asset diff --git a/Ported/DOTS-AutoFarmers/.vsconfig b/Ported/DOTS-AutoFarmers/.vsconfig new file mode 100644 index 0000000000..aade28f674 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/.vsconfig @@ -0,0 +1,6 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Workload.ManagedGame" + ] +} diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials.meta b/Ported/DOTS-AutoFarmers/Assets/Materials.meta new file mode 100644 index 0000000000..372301c4ec --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: dd14a1df31353734a832a05c7d3b01ce +folderAsset: yes +timeCreated: 1530820197 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Drone.mat b/Ported/DOTS-AutoFarmers/Assets/Materials/Drone.mat new file mode 100644 index 0000000000..da860fe407 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Drone.mat @@ -0,0 +1,126 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-713566622045534784 +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: 4 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Drone + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + 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_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.152 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.152 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.47794116, g: 0.10894246, b: 0.10894246, a: 1} + - _Color: {r: 0.47794116, g: 0.10894246, b: 0.10894246, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Drone.mat.meta b/Ported/DOTS-AutoFarmers/Assets/Materials/Drone.mat.meta new file mode 100644 index 0000000000..7612b91a18 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Drone.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 2ed50a8b29fa6db4585cadc189152d6f +timeCreated: 1530820203 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Farmer.mat b/Ported/DOTS-AutoFarmers/Assets/Materials/Farmer.mat new file mode 100644 index 0000000000..a309891f2d --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Farmer.mat @@ -0,0 +1,126 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-5911110796993704088 +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: 4 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Farmer + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + 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_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.152 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.152 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.36450604, g: 0.6544118, b: 0.25021628, a: 1} + - _Color: {r: 0.36450604, g: 0.6544118, b: 0.25021628, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Farmer.mat.meta b/Ported/DOTS-AutoFarmers/Assets/Materials/Farmer.mat.meta new file mode 100644 index 0000000000..7b580c1d75 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Farmer.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d5df058b269f73f419ae386aa3adbc0f +timeCreated: 1530820203 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Ground.mat b/Ported/DOTS-AutoFarmers/Assets/Materials/Ground.mat new file mode 100644 index 0000000000..27ae357daa --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Ground.mat @@ -0,0 +1,104 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Ground + m_Shader: {fileID: -6465566751694194690, guid: 29f65aa3b3be73c429f85720e7d4fd91, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _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: 0.5, y: 0.5} + m_Offset: {x: 0, y: 0.5} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 01b54c5b50ac59d4c9c4a3624b3fb606, type: 3} + m_Scale: {x: 0.5, y: 0.5} + m_Offset: {x: 0, y: 0.5} + - _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} + - _SampleTexture2D_897e050e87a441139b1706a2679257c8_Texture_1: + m_Texture: {fileID: 2800000, guid: 6a82ae0a176942b488a0e384e89941c8, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SampleTexture2D_dc13c8f7eff64f83900272671e5be94b_Texture_1: + m_Texture: {fileID: 2800000, guid: 01b54c5b50ac59d4c9c4a3624b3fb606, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TilledTex: + m_Texture: {fileID: 2800000, guid: 6a82ae0a176942b488a0e384e89941c8, type: 3} + 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_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Tilled: 0 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Ground.mat.meta b/Ported/DOTS-AutoFarmers/Assets/Materials/Ground.mat.meta new file mode 100644 index 0000000000..79986b5b1d --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Ground.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1a7e14a4d6de2cb4db04611495ac866e +timeCreated: 1530820316 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Plant.mat b/Ported/DOTS-AutoFarmers/Assets/Materials/Plant.mat new file mode 100644 index 0000000000..96dc22a913 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Plant.mat @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Plant + m_Shader: {fileID: -6465566751694194690, guid: aee6b4172c462fa46b91f32e7fde0d2c, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _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} + - 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_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.152 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Plant.mat.meta b/Ported/DOTS-AutoFarmers/Assets/Materials/Plant.mat.meta new file mode 100644 index 0000000000..f435fcee9e --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Plant.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8907cc0a8ccd517458a182638104c97e +timeCreated: 1530820203 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Rock.mat b/Ported/DOTS-AutoFarmers/Assets/Materials/Rock.mat new file mode 100644 index 0000000000..f52abd745e --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Rock.mat @@ -0,0 +1,126 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-3894703738312752982 +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: 4 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Rock + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + 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_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.152 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.152 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.6102941, g: 0.6102941, b: 0.6102941, a: 1} + - _Color: {r: 0.6102941, g: 0.6102941, b: 0.6102941, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Rock.mat.meta b/Ported/DOTS-AutoFarmers/Assets/Materials/Rock.mat.meta new file mode 100644 index 0000000000..e7dabd238f --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Rock.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 32151c15b456399478eea1583b8fece6 +timeCreated: 1530820203 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Store.mat b/Ported/DOTS-AutoFarmers/Assets/Materials/Store.mat new file mode 100644 index 0000000000..403c1b8d0e --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Store.mat @@ -0,0 +1,129 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2374072771712637620 +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: 4 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Store + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION + m_LightmapFlags: 2 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + disabledShaderPasses: + - SHADOWCASTER + 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_Floats: + - _AlphaClip: 0 + - _Blend: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 10 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.241 + - _GlossyReflections: 1 + - _InvFade: 1 + - _Metallic: 0 + - _Mode: 3 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.241 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 1 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 0 + m_Colors: + - _BaseColor: {r: 0.53676474, g: 0.59746444, b: 1, a: 0.391} + - _Color: {r: 0.53676474, g: 0.59746444, b: 1, a: 0.391} + - _EmissionColor: {r: 0.030276824, g: 0.05041166, b: 0.14705884, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + - _TintColor: {r: 0.16949612, g: 0.29516768, b: 0.41911763, a: 0.106} + m_BuildTextureStacks: [] diff --git a/Ported/DOTS-AutoFarmers/Assets/Materials/Store.mat.meta b/Ported/DOTS-AutoFarmers/Assets/Materials/Store.mat.meta new file mode 100644 index 0000000000..0e171e6d79 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Materials/Store.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0c6231ce0d2f0724c95a7dc30122b4a0 +timeCreated: 1531350746 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs.meta b/Ported/DOTS-AutoFarmers/Assets/Prefabs.meta new file mode 100644 index 0000000000..f9c8f2db89 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e4edcafe79c1f5942b14f209f72567f6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Drone.prefab b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Drone.prefab new file mode 100644 index 0000000000..553ba63a36 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Drone.prefab @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3489117790286770722 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3489117790286770735} + - component: {fileID: 3489117790286770732} + - component: {fileID: 3489117790286770733} + m_Layer: 0 + m_Name: Drone + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3489117790286770735 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3489117790286770722} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.35, y: 0.08, z: 0.35} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3489117790286770732 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3489117790286770722} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &3489117790286770733 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3489117790286770722} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 2ed50a8b29fa6db4585cadc189152d6f, 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} diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Drone.prefab.meta b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Drone.prefab.meta new file mode 100644 index 0000000000..d4e2fd8d7c --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Drone.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ae5664c9dfc3bbc4b9c100688274c596 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Farmer.prefab b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Farmer.prefab new file mode 100644 index 0000000000..de035e6879 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Farmer.prefab @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5690714913021404374 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5690714913021404373} + - component: {fileID: 5690714913021404372} + - component: {fileID: 5690714913021404375} + m_Layer: 0 + m_Name: Farmer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5690714913021404373 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5690714913021404374} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5690714913021404372 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5690714913021404374} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5690714913021404375 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5690714913021404374} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d5df058b269f73f419ae386aa3adbc0f, 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} diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Farmer.prefab.meta b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Farmer.prefab.meta new file mode 100644 index 0000000000..4966e71ad9 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Farmer.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cec7eb2db1ac17041ae7c4a675bedf23 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/GroundTile.prefab b/Ported/DOTS-AutoFarmers/Assets/Prefabs/GroundTile.prefab new file mode 100644 index 0000000000..20dff55bb9 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/GroundTile.prefab @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8972729994267930298 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8972729994267930302} + - component: {fileID: 8972729994267930297} + - component: {fileID: 8972729994267930296} + m_Layer: 0 + m_Name: GroundTile + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8972729994267930302 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8972729994267930298} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!33 &8972729994267930297 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8972729994267930298} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &8972729994267930296 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8972729994267930298} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1a7e14a4d6de2cb4db04611495ac866e, 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} diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/GroundTile.prefab.meta b/Ported/DOTS-AutoFarmers/Assets/Prefabs/GroundTile.prefab.meta new file mode 100644 index 0000000000..948a74b166 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/GroundTile.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 20865c24747d0b440add0c20b66a608c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Plant.prefab b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Plant.prefab new file mode 100644 index 0000000000..9af9d9f4aa --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Plant.prefab @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3788400025077362347 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3788400025077362344} + - component: {fileID: 3788400025077362345} + - component: {fileID: 3788400025077362346} + m_Layer: 0 + m_Name: Plant + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3788400025077362344 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3788400025077362347} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3788400025077362345 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3788400025077362347} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &3788400025077362346 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3788400025077362347} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8907cc0a8ccd517458a182638104c97e, 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} diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Plant.prefab.meta b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Plant.prefab.meta new file mode 100644 index 0000000000..a6c51d8fe3 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Plant.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3be4972ad0c642945929c46b56111c11 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Rock.prefab b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Rock.prefab new file mode 100644 index 0000000000..fe7e5df087 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Rock.prefab @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5594612989823463264 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5594612989823463277} + - component: {fileID: 5594612989823463278} + - component: {fileID: 5594612989823463279} + m_Layer: 0 + m_Name: Rock + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5594612989823463277 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5594612989823463264} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5594612989823463278 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5594612989823463264} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5594612989823463279 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5594612989823463264} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 32151c15b456399478eea1583b8fece6, 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} diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Rock.prefab.meta b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Rock.prefab.meta new file mode 100644 index 0000000000..20d29fe368 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Rock.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 07150fbdd6bd46e489cc2175681c4e22 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Store.prefab b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Store.prefab new file mode 100644 index 0000000000..07675eb376 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Store.prefab @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &864662933586919149 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 864662933586919137} + - component: {fileID: 864662933586919150} + - component: {fileID: 864662933586919151} + m_Layer: 0 + m_Name: Store + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &864662933586919137 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864662933586919149} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 0.6, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &864662933586919150 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864662933586919149} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &864662933586919151 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864662933586919149} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0c6231ce0d2f0724c95a7dc30122b4a0, 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} diff --git a/Ported/DOTS-AutoFarmers/Assets/Prefabs/Store.prefab.meta b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Store.prefab.meta new file mode 100644 index 0000000000..4b8401729b --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Prefabs/Store.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 96a27d83f7bbc604ba8791d6ad5dab69 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts.meta new file mode 100644 index 0000000000..a8d0d71911 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b78708121d977d0409ca3470918598e1 +folderAsset: yes +timeCreated: 1530817441 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/AutoFarmersInitializationSystemGroup.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/AutoFarmersInitializationSystemGroup.cs new file mode 100644 index 0000000000..6165f50393 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/AutoFarmersInitializationSystemGroup.cs @@ -0,0 +1,312 @@ +using System.Collections.Generic; +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 AutoFarmers +{ + [UpdateInGroup(typeof(InitializationSystemGroup))] + [UpdateAfter(typeof(ConvertToEntitySystem))] + public class AutoFarmersInitializationSystemGroup : ComponentSystemGroup + { + + } + [UpdateInGroup(typeof(AutoFarmersInitializationSystemGroup))] + public class PlantPrefabInitializationSystem : SystemBase + { + EntityQuery uninitializedFarmQuery; + protected override void OnCreate() + { + uninitializedFarmQuery = GetEntityQuery(ComponentType.ReadOnly(), ComponentType.Exclude()); + } + protected override void OnUpdate() + { + using var farmEntities = uninitializedFarmQuery.ToEntityArray(Allocator.Temp); + using var farms = uninitializedFarmQuery.ToComponentDataArray(Allocator.Temp); + for (int i = 0; i < farmEntities.Length; i++) + { + var farmEntity = farmEntities[i]; + var farm = farms[i]; + var basePrefab = farm.PlantPrefab; + var renderMesh = EntityManager.GetSharedComponentData(basePrefab); + var plantPrefabs = EntityManager.AddBuffer(farmEntity).Reinterpret(); + for (int ii = 0; ii < Plant.Variants; ii++) + { + var prefab = EntityManager.Instantiate(basePrefab); + EntityManager.AddComponent(prefab); + var seed = farm.SeedOffset + ii; + renderMesh.mesh = GenerateMesh(seed); EntityManager.SetSharedComponentData(prefab, renderMesh); + GetBuffer(farmEntity).Add(new PlantPrefabs() { Value = prefab }); + } + } + } + readonly List vertices = new List(); + readonly List triangles = new List(); + readonly List colors = new List(); + readonly List uv = new List(); + Mesh GenerateMesh(int seed) + { + UnityEngine.Random.State oldRandState = UnityEngine.Random.state; + UnityEngine.Random.InitState(seed); + + vertices.Clear(); + triangles.Clear(); + colors.Clear(); + uv.Clear(); + + Color color1 = UnityEngine.Random.ColorHSV(0f, 1f, .5f, .8f, .25f, .9f); + Color color2 = UnityEngine.Random.ColorHSV(0f, 1f, .5f, .8f, .25f, .9f); + + float height = UnityEngine.Random.Range(.4f, 1.4f); + + float angle = UnityEngine.Random.value * Mathf.PI * 2f; + float armLength1 = UnityEngine.Random.value * .4f + .1f; + float armLength2 = UnityEngine.Random.value * .4f + .1f; + float armRaise1 = UnityEngine.Random.value * .3f; + float armRaise2 = UnityEngine.Random.value * .6f - .3f; + float armWidth1 = UnityEngine.Random.value * .5f + .2f; + float armWidth2 = UnityEngine.Random.value * .5f + .2f; + float armJitter1 = UnityEngine.Random.value * .3f; + float armJitter2 = UnityEngine.Random.value * .3f; + float stalkWaveStr = UnityEngine.Random.value * .5f; + float stalkWaveFreq = UnityEngine.Random.Range(.25f, 1f); + float stalkWaveOffset = UnityEngine.Random.value * Mathf.PI * 2f; + + int triCount = UnityEngine.Random.Range(15, 35); + + for (int i = 0; i < triCount; i++) + { + // front face + triangles.Add(vertices.Count); + triangles.Add(vertices.Count + 1); + triangles.Add(vertices.Count + 2); + + // back face + triangles.Add(vertices.Count + 1); + triangles.Add(vertices.Count); + triangles.Add(vertices.Count + 2); + + float t = i / (triCount - 1f); + float armLength = Mathf.Lerp(armLength1, armLength2, t); + float armRaise = Mathf.Lerp(armRaise1, armRaise2, t); + float armWidth = Mathf.Lerp(armWidth1, armWidth2, t); + float armJitter = Mathf.Lerp(armJitter1, armJitter2, t); + float stalkWave = Mathf.Sin(t * stalkWaveFreq * 2f * Mathf.PI + stalkWaveOffset) * stalkWaveStr; + + float y = t * height; + vertices.Add(new Vector3(stalkWave, y, 0f)); + Vector3 armPos = new Vector3(stalkWave + Mathf.Cos(angle) * armLength, y + armRaise, Mathf.Sin(angle) * armLength); + vertices.Add(armPos + UnityEngine.Random.insideUnitSphere * armJitter); + armPos = new Vector3(stalkWave + Mathf.Cos(angle + armWidth) * armLength, y + armRaise, Mathf.Sin(angle + armWidth) * armLength); + vertices.Add(armPos + UnityEngine.Random.insideUnitSphere * armJitter); + + colors.Add(color1); + colors.Add(color2); + colors.Add(color2); + uv.Add(Vector2.zero); + uv.Add(Vector2.right); + uv.Add(Vector2.right); + + // golden angle in radians + angle += 2.4f; + } + + Mesh outputMesh = new Mesh(); + outputMesh.name = "Generated Plant (" + seed + ")"; + + outputMesh.SetVertices(vertices); + outputMesh.SetColors(colors); + outputMesh.SetTriangles(triangles, 0); + outputMesh.RecalculateNormals(); + + UnityEngine.Random.state = oldRandState; + return outputMesh; + } + } + [UpdateInGroup(typeof(AutoFarmersInitializationSystemGroup))] + public class CreateFarmGroundTilesSystem : SystemBase + { + EntityQuery farmQuery; + protected override void OnCreate() + { + farmQuery = GetEntityQuery(ComponentType.ReadOnly(), ComponentType.Exclude()); + } + + protected override void OnUpdate() + { + if (farmQuery.CalculateChunkCount() > 0) + { + var farmEntity = farmQuery.GetSingletonEntity(); + var farm = farmQuery.GetSingleton(); + var groundTilePrefab = farm.GroundTilePrefab; + var mapSize = farm.MapSize; + EntityManager.Instantiate(groundTilePrefab, mapSize.x * mapSize.y, Allocator.Temp).Dispose(); + var tiles = EntityManager.AddBuffer(farmEntity); + tiles.Length = mapSize.x * mapSize.y; + + Entities + .WithNativeDisableParallelForRestriction(tiles) + .ForEach((Entity entity, int entityInQueryIndex, ref GroundTile tile, ref GroundTile.Tilled tilled, ref Translation translation) => + { + var random = Random.CreateFromIndex((uint)entityInQueryIndex); + Helper.HashToPosition(farm, entityInQueryIndex, out var x, out var y); + tile.Position = new int2(x, y); + translation.Value = new float3(x + 0.5f, 0, y + 0.5f); + tilled.Value = random.NextFloat(0.2f); + tiles[entityInQueryIndex] = entity; + }).ScheduleParallel(); + } + } + } + [UpdateInGroup(typeof(AutoFarmersInitializationSystemGroup))] + [UpdateAfter(typeof(CreateFarmGroundTilesSystem))] + public class SpawnStoreSystem : SystemBase + { + EntityQuery query; + protected override void OnUpdate() + { + var entityManager = EntityManager; + + Entities.WithStoreEntityQueryInField(ref query) + .WithStructuralChanges() + .ForEach((Entity entity, int entityInQueryIndex, in Farm farm, in Farm.StoreCount storeCount) => + { + var tiles = GetBuffer(entity).AsNativeArray().Reinterpret(); + var random = Random.CreateFromIndex((uint)entityInQueryIndex); + var spawnedStores = 0; + while (spawnedStores < storeCount.Value) + { + var pos = random.NextInt2(farm.MapSize); + var tileEntity = tiles[Helper.PositionToHash(farm, pos)]; + var tile = entityManager.GetComponentData(tileEntity); + if (!tile.StoreTile) + { + tile.StoreTile = true; + entityManager.SetComponentData(tileEntity, tile); + var store = entityManager.Instantiate(farm.StorePrefab); + entityManager.SetComponentData(store, new Translation() { Value = new float3(pos.x + 0.5f, 0.6f, pos.y + 0.5f) }); + tiles = entityManager.GetBuffer(entity).AsNativeArray().Reinterpret(); + spawnedStores++; + } + } + }).Run(); + entityManager.RemoveComponent(query); + } + } + [UpdateInGroup(typeof(AutoFarmersInitializationSystemGroup))] + [UpdateAfter(typeof(SpawnStoreSystem))] + public class SpawnRocksSystem : SystemBase + { + EntityQuery query; + protected override void OnUpdate() + { + var entityManager = EntityManager; + + Entities.WithStoreEntityQueryInField(ref query) + .WithStructuralChanges() + .ForEach((Entity entity, int entityInQueryIndex, in Farm farm, in Farm.RockSpawnAttempts rockSpawnAttempts) => + { + var tiles = GetBuffer(entity).AsNativeArray().Reinterpret(); + var random = Random.CreateFromIndex((uint)entityInQueryIndex); + for (int spawnIndex = 0; spawnIndex < rockSpawnAttempts.Value; spawnIndex++) + { + var size = random.NextInt2(4); + var pos = random.NextInt2(farm.MapSize - size); + var rect = new RectInt(pos.x, pos.y, size.x, size.y); + for (int y = rect.yMin; y <= rect.yMax; y++) + { + for (int x = rect.xMin; x <= rect.xMax; x++) + { + var tileEntity = tiles[Helper.PositionToHash(farm, new int2(x, y))]; + var tile = entityManager.GetComponentData(tileEntity); + if (tile.TileRock != Entity.Null | tile.StoreTile) + { + goto NextRock; + } + } + } + var rockEntity = entityManager.Instantiate(farm.RockPrefab); + int health = (rect.width + 1) * (rect.height + 1) * 15; + var rock = new Rock() + { + Rect = rect, + Depth = random.NextFloat(0.4f, 0.8f), + Health = health, + StartHealth = health, + }; + var center2D = rect.center; + entityManager.SetComponentData(rockEntity, rock); + entityManager.SetComponentData(rockEntity, new Translation() { Value = new float3(center2D.x + 0.5f, rock.Depth * 0.5f, center2D.y + 0.5f) }); + entityManager.SetComponentData(rockEntity, new NonUniformScale() { Value = new float3(rect.width + .5f, rock.Depth, rect.height + 0.5f) }); + tiles = entityManager.GetBuffer(entity).AsNativeArray().Reinterpret(); + for (int y = rect.yMin; y <= rect.yMax; y++) + { + for (int x = rect.xMin; x <= rect.xMax; x++) + { + int2 tilePosition = new int2(x, y); + var tileEntity = tiles[Helper.PositionToHash(farm, tilePosition)]; + var tile = entityManager.GetComponentData(tileEntity); + + tile.TileRock = rockEntity; + entityManager.SetComponentData(tileEntity, tile); + } + } + NextRock:; + } + + + }).Run(); + entityManager.RemoveComponent(query); + } + } + + [UpdateInGroup(typeof(AutoFarmersInitializationSystemGroup), OrderLast = true)] + public class SpawnFarmerSystem : SystemBase + { + EntityQuery query; + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var entityManager = EntityManager; + var farm = GetSingleton(); + var farmerGlobalParams = GetSingleton(); + var farmerPrefab = farmerGlobalParams.FarmerPrefab; + var tiles = GetBuffer(GetSingletonEntity()).AsNativeArray().Reinterpret(); + + var parallelCommandBuffer = commandBufferSystem.CreateCommandBuffer().AsParallelWriter(); + Entities.WithStoreEntityQueryInField(ref query).WithReadOnly(tiles) + .ForEach((Entity entity, int entityInQueryIndex, in SpawnFarmer spawnFarmer) => + { + var random = Random.CreateFromIndex((uint)entityInQueryIndex); + for (int spawnIndex = 0; spawnIndex < spawnFarmer.Count; spawnIndex++) + { + for (int i = 0; i < 100; i++) + { + var spawnPos = random.NextInt2(farm.MapSize); + if (GetComponent(tiles[Helper.PositionToHash(farm, spawnPos)]).TileRock == Entity.Null) + { + var farmerEntity = parallelCommandBuffer.Instantiate(entityInQueryIndex, farmerPrefab); + var pos3D = new float3(spawnPos.x + 0.5f, 0.5f, spawnPos.y + 0.5f); + parallelCommandBuffer.SetComponent(entityInQueryIndex, farmerEntity, new Farmer() { Position = pos3D.xz }); + parallelCommandBuffer.SetComponent(entityInQueryIndex, farmerEntity, new Translation() { Value = pos3D}); + break; + } + } + } + + + }).ScheduleParallel(); + commandBufferSystem.CreateCommandBuffer().RemoveComponent(query); + commandBufferSystem.AddJobHandleForProducer(Dependency); + } + } + +} \ No newline at end of file diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/AutoFarmersInitializationSystemGroup.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/AutoFarmersInitializationSystemGroup.cs.meta new file mode 100644 index 0000000000..168556b8c1 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/AutoFarmersInitializationSystemGroup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2bb28ebf5bcaca541b65134b6e3db498 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/CamFollow.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/CamFollow.cs new file mode 100644 index 0000000000..2bf51b16a9 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/CamFollow.cs @@ -0,0 +1,50 @@ +using System.Collections; +using System.Collections.Generic; +using Unity.Entities; +using Unity.Transforms; +using UnityEngine; + +namespace AutoFarmers +{ + + public class CamFollow : MonoBehaviour + { + + public Vector2 viewAngles; + public float viewDist; + public float mouseSensitivity; + EntityQuery query; + Entity farmerEntity; + void Start() + { + query = World.DefaultGameObjectInjectionWorld.EntityManager.CreateEntityQuery(ComponentType.ReadOnly(), ComponentType.ReadOnly()); + transform.rotation = Quaternion.Euler(viewAngles.y, viewAngles.x, 0f); + } + + void LateUpdate() + { + if(farmerEntity == Entity.Null) + { + using var farmers = query.ToEntityArray(Unity.Collections.Allocator.Temp); + if (farmers.Length > 0) + { + farmerEntity = farmers[0]; + } + else + { + return; + } + } + + Vector3 pos = World.DefaultGameObjectInjectionWorld.EntityManager.GetComponentData(farmerEntity).Value; + viewAngles.x += Input.GetAxis("Mouse X") * mouseSensitivity / Screen.height; + viewAngles.y -= Input.GetAxis("Mouse Y") * mouseSensitivity / Screen.height; + viewAngles.y = Mathf.Clamp(viewAngles.y, 7f, 80f); + viewAngles.x -= Mathf.Floor(viewAngles.x / 360f) * 360f; + transform.rotation = Quaternion.Euler(viewAngles.y, viewAngles.x, 0f); + transform.position = pos - transform.forward * viewDist; + } + } + +} + diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/CamFollow.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/CamFollow.cs.meta new file mode 100644 index 0000000000..cd60212021 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/CamFollow.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: d5fb916872b5aed4ebe993607380e1e3 +timeCreated: 1531266911 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/Components.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/Components.cs new file mode 100644 index 0000000000..ffdc97898f --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/Components.cs @@ -0,0 +1,236 @@ +using Unity.Animation; +using Unity.Collections; +using Unity.Entities; +using Unity.Mathematics; +using Unity.Rendering; +using UnityEngine; +using AnimationCurve = Unity.Animation.AnimationCurve; +namespace AutoFarmers +{ + + public struct Farm : IComponentData + { + public const int DefaultMapSize = 60; + + public int2 MapSize; + public int SeedOffset; + public Entity PlantPrefab; + public Entity GroundTilePrefab; + public Entity RockPrefab; + public Entity StorePrefab; + public AnimationCurve SoldPlantYCurve; + public AnimationCurve SoldPlantXZScaleCurve; + public AnimationCurve SoldPlantYScaleCurve; + [InternalBufferCapacity(0)] + public struct GroundTiles :IBufferElementData + { + public Entity Value; + public static implicit operator GroundTiles(Entity tileEntity) => new GroundTiles() { Value = tileEntity}; + } + + public struct RockSpawnAttempts : IComponentData + { + public int Value; + } + + public struct StoreCount : IComponentData + { + public int Value; + } + + public struct IsHarvestable : ITilePredicate + { + [ReadOnly] ComponentDataFromEntity plantGrowthFromEntity; + public IsHarvestable(ComponentDataFromEntity plantGrowthFromEntity = default) + { + this.plantGrowthFromEntity = plantGrowthFromEntity; + } + + public bool Predicate(GroundTile tile) + { + if (tile.TilePlant == Entity.Null) + { + return false; + } + var growth = plantGrowthFromEntity[tile.TilePlant].Value; + return growth >= 1f; + } + } + + public struct IsHarvestableAndUnreserved : ITilePredicate + { + [ReadOnly] ComponentDataFromEntity plantFromEntity; + [ReadOnly] ComponentDataFromEntity plantGrowthFromEntity; + public IsHarvestableAndUnreserved(ComponentDataFromEntity plantFromEntity, ComponentDataFromEntity plantGrowthFromEntity) + { + this.plantFromEntity = plantFromEntity; + this.plantGrowthFromEntity = plantGrowthFromEntity; + } + + public bool Predicate(GroundTile tile) + { + if (tile.TilePlant == Entity.Null) + { + return false; + } + var plant = plantFromEntity[tile.TilePlant]; + var growth = plantGrowthFromEntity[tile.TilePlant].Value; + return growth >= 1f & !plant.reserved; + } + } + } + [InternalBufferCapacity(Plant.Variants)] + public struct PlantPrefabs : IBufferElementData + { + public Entity Value; + } + public struct Money : IComponentData + { + public int MoneyForFarmers; + public int MoneyForDrones; + } + public struct Rock : IComponentData + { + public RectInt Rect; + public int StartHealth; + public int Health; + public float Depth; + } + + public struct GroundTile : IComponentData + { + public int2 Position; + public Entity TileRock; + public Entity TilePlant; + public GroundState State; + public bool StoreTile; + [MaterialProperty("_Tilled",MaterialPropertyFormat.Float)] + public struct Tilled : IComponentData + { + public float Value; + } + + } + + public interface ITilePredicate + { + public bool Predicate(GroundTile tile); + } + + public struct Plant : IComponentData + { + public const int Variants = 10; + public int2 Position; + public bool reserved; + public bool harvested; + [MaterialProperty("_Growth", MaterialPropertyFormat.Float)] + public struct Growth : IComponentData + { + public float Value; + } + public struct Sold : IComponentData + { + public float ElapsedTime; + } + } + + public struct Store : IComponentData + { + + } + + public struct Farmer : IComponentData + { + public float2 Position; + } + + public struct Drone : IComponentData + { + internal const float ySpeed = 2f; + internal const float xzSpeed = 6f; + public float3 Position; + public float HoverHeight; + public float SearchTimer; + public struct TargetPlant :IComponentData + { + public Entity Value; + } + + public struct SellPlant : IComponentData + { + public struct StorePosition : IComponentData + { + public int2 Value; + } + public Entity HeldPlant; + } + } + + public struct DroneGlobalParams : IComponentData + { + public Entity DronePrefab; + public int MaxDroneCount; + public float MoveSmooth; + public float CarrySmooth; + public int DroneCount; + } + + public static class Intension + { + [WriteGroup(typeof(Path))] + public struct SmashRocks : IComponentData + { + public Entity TargetRock; + public bool AttackingARock; + } + [WriteGroup(typeof(Path))] + public struct TillGround : IComponentData + { + [WriteGroup(typeof(Path))] + public struct FoundTillingZone : IComponentData + { + public RectInt TillingZone; + } + } + [WriteGroup(typeof(Path))] + public struct PlantSeeds : IComponentData + { + [WriteGroup(typeof(Path))] + public struct HasBoughtSeeds : IComponentData + { + public struct SpawnPlant : IComponentData + { + public int Seed; + } + } + } + [WriteGroup(typeof(Path))] + public struct SellPlants : IComponentData + { + [WriteGroup(typeof(Path))] + public struct HeldPlant : IComponentData + { + public Entity Plant; + } + } + } + public struct FarmerGlobalParams : IComponentData + { + public Entity FarmerPrefab; + public float MovementSmooth; + public int MaxFarmerCount; + public int FarmerCount; + } + + public struct SpawnFarmer : IComponentData + { + public int Count; + } + [InternalBufferCapacity(32)] + public struct Path : IBufferElementData + { + public int2 Position; + public static implicit operator Path(int2 position)=>new Path() { Position = position }; + } + +} \ No newline at end of file diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/Components.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/Components.cs.meta new file mode 100644 index 0000000000..2490cd363e --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/Components.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ccdefc108a0b33440ac47651f1028a6b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneGlobalParamsAuthoring.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneGlobalParamsAuthoring.cs new file mode 100644 index 0000000000..fa6aa39b1e --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneGlobalParamsAuthoring.cs @@ -0,0 +1,35 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Unity.Entities; +namespace AutoFarmers +{ + [DisallowMultipleComponent] + internal class DroneGlobalParamsAuthoring : MonoBehaviour, IConvertGameObjectToEntity, IDeclareReferencedPrefabs + { + public GameObject DronePrefab; + public int MaxDroneCount; + [Range(0f, 1f)] + public float MoveSmooth; + [Range(0f, 1f)] + public float CarrySmooth; + public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) + { + var dronePrefab = conversionSystem.GetPrimaryEntity(DronePrefab); + dstManager.AddComponent(dronePrefab); + dstManager.AddComponentData(entity, new DroneGlobalParams() + { + DronePrefab = conversionSystem.GetPrimaryEntity(DronePrefab), + MaxDroneCount = MaxDroneCount, + MoveSmooth = MoveSmooth, + CarrySmooth = CarrySmooth, + }); + } + + public void DeclareReferencedPrefabs(List referencedPrefabs) + { + referencedPrefabs.Add(DronePrefab); + } + } +} + diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneGlobalParamsAuthoring.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneGlobalParamsAuthoring.cs.meta new file mode 100644 index 0000000000..9478bb2c2e --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneGlobalParamsAuthoring.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 49c8f3eceb6398e469f0c9e989c0ca5b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneSimulationSystemGroup.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneSimulationSystemGroup.cs new file mode 100644 index 0000000000..1c40ade320 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneSimulationSystemGroup.cs @@ -0,0 +1,244 @@ +using Unity.Burst; +using Unity.Collections; +using Unity.Entities; +using Unity.Jobs; +using Unity.Mathematics; +using Unity.Transforms; +using UnityEngine; + +namespace AutoFarmers +{ + [UpdateInGroup(typeof(SimulationSystemGroup))] + public class DroneSimulationSystemGroup : ComponentSystemGroup + { + + } + [UpdateInGroup(typeof(DroneSimulationSystemGroup))] + public class SearchPlantSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var farm = GetSingleton(); + var tiles = GetBuffer(GetSingletonEntity()).AsNativeArray().Reinterpret(); + var deltaTime = Time.DeltaTime; + var parallelCommandBuffer = commandBufferSystem.CreateCommandBuffer().AsParallelWriter(); + Entities + .WithReadOnly(tiles) + .WithNone() + .ForEach((Entity entity,int entityInQueryIndex,ref Drone drone, in Translation translation) => + { + ref readonly var smoothPosition = ref translation.Value; + var targetPos = new float3(drone.Position.x, drone.HoverHeight, drone.Position.z); + ref var position = ref drone.Position; + ref var searchTimer = ref drone.SearchTimer; + { + if (searchTimer < 0f) + { + var pathing = new Pathing(farm, tiles, GetComponentDataFromEntity(true)); + + int plantTileHash = pathing.SearchForOne((int2)smoothPosition.xz, 30, new Pathing.IsNavigableAll(), new Farm.IsHarvestableAndUnreserved(GetComponentDataFromEntity(true), GetComponentDataFromEntity(true)), pathing.FullMapZone); + if (plantTileHash != -1) + { + var tile = GetComponent(tiles[plantTileHash]); + var targetPlantEntity = tile.TilePlant; + var targetPlant = GetComponent(targetPlantEntity); + targetPlant.reserved = true; + SetComponent(targetPlantEntity, targetPlant); + parallelCommandBuffer.AddComponent(entityInQueryIndex, entity, new Drone.TargetPlant() { Value = targetPlantEntity }); + } + searchTimer = 1f; + pathing.Dispose(); + } + else + { + searchTimer -= deltaTime; + } + } + position.x = Mathf.MoveTowards(position.x, targetPos.x, Drone.xzSpeed * deltaTime); + position.y = Mathf.MoveTowards(position.y, targetPos.y, deltaTime * Drone.ySpeed); + position.z = Mathf.MoveTowards(position.z, targetPos.z, Drone.xzSpeed * deltaTime); + + }).Schedule(); + commandBufferSystem.AddJobHandleForProducer(Dependency); + } + } + [UpdateInGroup(typeof(DroneSimulationSystemGroup))] + public class HarvestPlantSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var farm = GetSingleton(); + var tiles = GetBuffer(GetSingletonEntity()).AsNativeArray().Reinterpret(); + var deltaTime = Time.DeltaTime; + var parallelCommandBuffer = commandBufferSystem.CreateCommandBuffer().AsParallelWriter(); + Entities + .WithReadOnly(tiles) + .WithNone() + .ForEach((Entity entity,int entityInQueryIndex,ref Drone drone,in Drone.TargetPlant _targetPlant ,in Translation translation) => + { + ref readonly var smoothPosition = ref translation.Value; + ref var position = ref drone.Position; + var targetPos = new float3(position.x, drone.HoverHeight, position.z); + var targetPlantEntity = _targetPlant.Value; + var targetPlant = GetComponent(targetPlantEntity); + if (targetPlant.harvested) + { + parallelCommandBuffer.RemoveComponent(entityInQueryIndex, entity); + } + else + { + targetPos.xz = (float2)targetPlant.Position + 0.5f; + if (math.distancesq(targetPos.xz,position.xz)<3f*3f) + { + targetPos.y = 0f; + } + if(math.all((int2)smoothPosition.xz == targetPlant.Position) & position.y < 0.5f) + { + parallelCommandBuffer.AddComponent(entityInQueryIndex, entity, new Drone.SellPlant() { HeldPlant = targetPlantEntity }); + targetPlant.harvested = true; + parallelCommandBuffer.RemoveComponent(entityInQueryIndex, entity); + Helper.HarvestPlant(farm, tiles, GetComponentDataFromEntity(), GetComponentDataFromEntity(), (int2)smoothPosition.xz); + } + } + position.x = Mathf.MoveTowards(position.x, targetPos.x, Drone.xzSpeed * deltaTime); + position.y = Mathf.MoveTowards(position.y, targetPos.y, deltaTime * Drone.ySpeed); + position.z = Mathf.MoveTowards(position.z, targetPos.z, Drone.xzSpeed * deltaTime); + }).Schedule(); + commandBufferSystem.AddJobHandleForProducer(Dependency); + } + } + [UpdateInGroup(typeof(DroneSimulationSystemGroup))] + public class SearchStoreSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + + var farm = GetSingleton(); + var tiles = GetBuffer(GetSingletonEntity()).AsNativeArray().Reinterpret(); + var deltaTime = Time.DeltaTime; + var droneGlobalParams = GetSingleton(); + var carrySmooth = 1f - math.pow(droneGlobalParams.CarrySmooth, deltaTime); + var commandBuffer = commandBufferSystem.CreateCommandBuffer(); + var pathing = new Pathing(farm, tiles, GetComponentDataFromEntity(true),Allocator.TempJob); + + Entities + .WithAll() + .WithNone() + .ForEach((Entity entity, int entityInQueryIndex, in Drone drone, in Drone.SellPlant sellPlant) => + { + var smoothPosition = GetComponent(entity).Value; + ref readonly var position = ref drone.Position; + var targetPos = new float3(position.x, drone.HoverHeight, position.z); + var plantPos = smoothPosition; + plantPos.y += 0.08f; + Helper.EaseToWorldPosition(GetComponentDataFromEntity(), sellPlant.HeldPlant, plantPos, carrySmooth); + + + int storeTileHash = pathing.SearchForOne((int2)smoothPosition.xz, 30,new Pathing.IsNavigableAll(),new Pathing.IsStore(), pathing.FullMapZone); + if (storeTileHash != -1) + { + var storePos = pathing.Unhash(storeTileHash); + commandBuffer.AddComponent(entity, new Drone.SellPlant.StorePosition() { Value = storePos }); + } + + + }).Schedule(); + pathing.Dispose(Dependency); + commandBufferSystem.AddJobHandleForProducer(Dependency); + } + } + [UpdateInGroup(typeof(DroneSimulationSystemGroup))] + public class SellPlantSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var farmEntity = GetSingletonEntity(); + var deltaTime = Time.DeltaTime; + var droneGlobalParams = GetSingleton(); + var carrySmooth = 1f - math.pow(droneGlobalParams.CarrySmooth, deltaTime); + var commandBuffer = commandBufferSystem.CreateCommandBuffer(); + Entities + .WithAll() + .ForEach((Entity entity, ref Drone drone, in Drone.SellPlant sellPlant,in Drone.SellPlant.StorePosition _storePosition) => + { + var smoothPosition = GetComponent(entity).Value; + ref var position = ref drone.Position; + ref readonly var storePosition = ref _storePosition.Value; + var targetPos = new float3(position.x, drone.HoverHeight, position.z); + var plantPos = smoothPosition; + plantPos.y += 0.08f; + Helper.EaseToWorldPosition(GetComponentDataFromEntity(), sellPlant.HeldPlant, plantPos, carrySmooth); + if(math.all((int2)smoothPosition.xz == storePosition)) + { + Helper.SellPlant(farmEntity, GetComponentDataFromEntity(), GetComponentDataFromEntity(), GetComponentDataFromEntity(), sellPlant.HeldPlant, GetComponentDataFromEntity(), storePosition, commandBuffer); + commandBuffer.RemoveComponent(entity); + commandBuffer.RemoveComponent(entity); + + } + else + { + + position.y = Mathf.MoveTowards(position.y, drone.HoverHeight, Drone.ySpeed * deltaTime); + position.x = Mathf.MoveTowards(position.x, storePosition.x + .5f, Drone.xzSpeed * deltaTime); + position.z = Mathf.MoveTowards(position.z, storePosition.y + .5f, Drone.xzSpeed * deltaTime); + } + + }).Schedule(); + commandBufferSystem.AddJobHandleForProducer(Dependency); + } + } + [UpdateInGroup(typeof(DroneSimulationSystemGroup), OrderLast = true)] + public class DroneTransformSystemGroup : ComponentSystemGroup + { + + } + + [UpdateInGroup(typeof(DroneTransformSystemGroup))] + public class DroneSmoothPositionSystem : SystemBase + { + protected override void OnUpdate() + { + var deltaTime = Time.DeltaTime; + var droneGlobalParams = GetSingleton(); + var moveSmooth = 1f - math.pow(droneGlobalParams.MoveSmooth, deltaTime); + Entities.ForEach((ref Translation translation, in Drone drone) => + { + translation.Value = math.lerp(translation.Value, drone.Position, moveSmooth); + }).ScheduleParallel(); + } + } + + [UpdateInGroup(typeof(DroneTransformSystemGroup))] + [UpdateAfter(typeof(DroneSmoothPositionSystem))] + public class DroneRotationSystem : SystemBase + { + protected override void OnUpdate() + { + Entities.ForEach((ref Rotation rotation ,in Translation translation, in Drone drone) => + { + var tilt = new float3(drone.Position.x - translation.Value.x, 2f, drone.Position.z - translation.Value.z); + rotation.Value = Quaternion.FromToRotation(Vector3.up, tilt); + }).ScheduleParallel(); + } + } +} diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneSimulationSystemGroup.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneSimulationSystemGroup.cs.meta new file mode 100644 index 0000000000..f7b21df2a9 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/DroneSimulationSystemGroup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: be3df4ed3639a2a41874698aa7a93780 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/Enums.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/Enums.meta new file mode 100644 index 0000000000..bf4314e272 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/Enums.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4b0188d4e23519140a7cd812b8fb5af4 +folderAsset: yes +timeCreated: 1530817670 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/Enums/GroundState.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/Enums/GroundState.cs new file mode 100644 index 0000000000..f4fd0e4670 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/Enums/GroundState.cs @@ -0,0 +1,9 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public enum GroundState { + Default, + Tilled, + Plant +} diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/Enums/GroundState.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/Enums/GroundState.cs.meta new file mode 100644 index 0000000000..63657a3810 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/Enums/GroundState.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: eaaa1b363c61b8540b1961cbdeecccd0 +timeCreated: 1530817732 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmAuthoring.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmAuthoring.cs new file mode 100644 index 0000000000..ca4d1b9f3d --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmAuthoring.cs @@ -0,0 +1,70 @@ +using System.Collections.Generic; +using Unity.Entities; +using Unity.Mathematics; +using Unity.Transforms; +using UnityEngine; +using Unity.Animation.Hybrid; +namespace AutoFarmers +{ + [DisallowMultipleComponent] + internal class FarmAuthoring : MonoBehaviour, IConvertGameObjectToEntity, IDeclareReferencedPrefabs + { + public int2 MapSize; + + public int StoreCount; + + public int RockSpawnAttempts; + + public int SeedOffset; + + public GameObject PlantPrefab; + + public GameObject GroundTilePrefab; + + public GameObject RockPrefab; + + public GameObject StorePrefab; + + public AnimationCurve SoldPlantYCurve; + public AnimationCurve SoldPlantXZScaleCurve; + public AnimationCurve SoldPlantYScaleCurve; + + public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) + { + var plantPrefab = conversionSystem.GetPrimaryEntity(PlantPrefab); + dstManager.AddComponent(plantPrefab); + dstManager.AddComponent(plantPrefab); + dstManager.AddComponent(plantPrefab); + var groundTilePrefab = conversionSystem.GetPrimaryEntity(GroundTilePrefab); + dstManager.AddComponent(groundTilePrefab); + dstManager.AddComponent(groundTilePrefab); + var rockPrefab = conversionSystem.GetPrimaryEntity(RockPrefab); + dstManager.AddComponent(rockPrefab); + dstManager.AddComponentData(rockPrefab, new NonUniformScale() { Value = 1 }); + var storePrefab = conversionSystem.GetPrimaryEntity(StorePrefab); + dstManager.AddComponentData(entity, new Farm() + { + MapSize = MapSize, + SeedOffset = SeedOffset, + PlantPrefab = plantPrefab, + GroundTilePrefab = groundTilePrefab, + RockPrefab = rockPrefab, + StorePrefab = storePrefab, + SoldPlantYCurve = SoldPlantYCurve.ToDotsAnimationCurve(), + SoldPlantXZScaleCurve = SoldPlantXZScaleCurve.ToDotsAnimationCurve(), + SoldPlantYScaleCurve = SoldPlantYScaleCurve.ToDotsAnimationCurve(), + }); + dstManager.AddComponentData(entity, new Farm.StoreCount() { Value = StoreCount }); + dstManager.AddComponentData(entity, new Farm.RockSpawnAttempts() { Value = RockSpawnAttempts }); + dstManager.AddComponentData(entity, new Money() {MoneyForFarmers = 5, MoneyForDrones = 0,}); + } + + public void DeclareReferencedPrefabs(List referencedPrefabs) + { + referencedPrefabs.Add(PlantPrefab); + referencedPrefabs.Add(GroundTilePrefab); + referencedPrefabs.Add(RockPrefab); + referencedPrefabs.Add(StorePrefab); + } + } +} diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmAuthoring.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmAuthoring.cs.meta new file mode 100644 index 0000000000..6ad92a137d --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmAuthoring.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 920f1f085bf0358428118bac56f13e06 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerGlobalParamsAuthoring.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerGlobalParamsAuthoring.cs new file mode 100644 index 0000000000..f777bc2886 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerGlobalParamsAuthoring.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using Unity.Entities; +using UnityEngine; + +namespace AutoFarmers +{ + [DisallowMultipleComponent] + internal class FarmerGlobalParamsAuthoring : MonoBehaviour, IConvertGameObjectToEntity,IDeclareReferencedPrefabs + { + public GameObject FarmerPrefab; + + + public int InitialFarmerCount; + public int MaxFarmerCount; + [Range(0f, 1f)] + public float MovementSmooth; + public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) + { + var farmerPrefab = conversionSystem.GetPrimaryEntity(FarmerPrefab); + dstManager.AddComponent(farmerPrefab); + dstManager.AddBuffer(farmerPrefab); + dstManager.AddComponentData(entity, new FarmerGlobalParams() + { + FarmerPrefab = farmerPrefab, + MaxFarmerCount = MaxFarmerCount, + MovementSmooth = MovementSmooth, + }); + dstManager.AddComponentData(entity, new SpawnFarmer() { Count = InitialFarmerCount }); + } + + public void DeclareReferencedPrefabs(List referencedPrefabs) + { + referencedPrefabs.Add(FarmerPrefab); + } + } +} diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerGlobalParamsAuthoring.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerGlobalParamsAuthoring.cs.meta new file mode 100644 index 0000000000..9ab8cb9844 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerGlobalParamsAuthoring.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 520b13af4afea6a4d913adc7dcc7e9a2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerSimulationSystemGroup.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerSimulationSystemGroup.cs new file mode 100644 index 0000000000..e346485332 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerSimulationSystemGroup.cs @@ -0,0 +1,518 @@ +using System; +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 AutoFarmers +{ + + [UpdateInGroup(typeof(SimulationSystemGroup))] + public class FarmerSimulationSystemGroup : ComponentSystemGroup + { + + } + + + [UpdateInGroup(typeof(FarmerSimulationSystemGroup))] + public class IntensionSystemGroup : ComponentSystemGroup + { + + } + + [UpdateInGroup(typeof(IntensionSystemGroup))] + public class PickNewIntensionSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var globalSeed = Time.ElapsedTime.GetHashCode(); + var parallelCommandBuffer = commandBufferSystem.CreateCommandBuffer().AsParallelWriter(); + Entities + .WithNone() + .WithNone() + .WithNone() + .WithNone() + .WithAll() + .ForEach((Entity entity, int entityInQueryIndex) => + { + var componentType = ((globalSeed^entityInQueryIndex) & 3) switch + { + 0 => ComponentType.ReadWrite(), + 1 => ComponentType.ReadWrite(), + 2 => ComponentType.ReadWrite(), + 3 => ComponentType.ReadWrite(), + _ => throw new System.Exception(), + }; + parallelCommandBuffer.AddComponent(entityInQueryIndex, entity, componentType); + }).ScheduleParallel(); + commandBufferSystem.AddJobHandleForProducer(Dependency); + } + + + } + [UpdateInGroup(typeof(IntensionSystemGroup))] + public class SmashRocksSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var globalSeed = Time.ElapsedTime.GetHashCode(); + var farm = GetSingleton(); + var tiles = GetBuffer(GetSingletonEntity()).AsNativeArray().Reinterpret(); + + var parallelCommandBuffer = commandBufferSystem.CreateCommandBuffer().AsParallelWriter(); + Entities + .WithReadOnly(tiles) + .ForEach((Entity entity, int entityInQueryIndex, ref Intension.SmashRocks smashRocks, ref DynamicBuffer path, in Farmer farmer) => + { + var random = Random.CreateFromIndex((uint)(entityInQueryIndex ^ globalSeed)); + ref var targetRock = ref smashRocks.TargetRock; + ref var attackingARock = ref smashRocks.AttackingARock; + attackingARock = false; + Rock rock; + if (HasComponent(targetRock) && (rock = GetComponent(targetRock)).Health > 0) + { + if (path.Length == 1) + { + attackingARock = true; + rock.Health -= 1; + SetComponent(targetRock, rock); + var scale = GetComponent(targetRock).Value; + scale.y = rock.Depth * ((float)rock.Health / rock.StartHealth) + random.NextFloat(0.1f); + var pos = GetComponent(targetRock).Value; + pos.y = scale.y * 0.5f; + SetComponent(targetRock, new NonUniformScale() { Value = scale }); + SetComponent(targetRock, new Translation() { Value = pos }); + } + if (rock.Health <= 0) + { + var rect = rock.Rect; + for (int y = rect.yMin; y <= rect.yMax; y++) + { + for (int x = rect.xMin; x <= rect.xMax; x++) + { + var tilePosition = new int2(x, y); + var tileEntity = tiles[Helper.PositionToHash(farm, tilePosition)]; + var tile = GetComponent(tileEntity); + + tile.TileRock = Entity.Null; + SetComponent(tileEntity, tile); + } + } + parallelCommandBuffer.DestroyEntity(entityInQueryIndex, targetRock); + parallelCommandBuffer.RemoveComponent(entityInQueryIndex, entity); + } + + } + else + { + var pathing = new Pathing(farm, tiles, GetComponentDataFromEntity(true)); + targetRock = pathing.FindNearbyRock((int2)farmer.Position, 20, path); + pathing.Dispose(); + if (targetRock == Entity.Null) + { + parallelCommandBuffer.RemoveComponent(entityInQueryIndex, entity); + } + } + + + + }).Schedule(); + commandBufferSystem.AddJobHandleForProducer(Dependency); + } + } + [UpdateInGroup(typeof(IntensionSystemGroup))] + public class TillGroundSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var globalSeed = Time.ElapsedTime.GetHashCode(); + var farm = GetSingleton(); + var tiles = GetBuffer(GetSingletonEntity()).AsNativeArray().Reinterpret(); + + var parallelCommandBuffer = commandBufferSystem.CreateCommandBuffer().AsParallelWriter(); + Entities + .WithReadOnly(tiles) + .WithAll() + .WithNone() + .ForEach((Entity entity, int entityInQueryIndex, in Farmer farmer) => + { + ref readonly var position = ref farmer.Position; + var random = Random.CreateFromIndex((uint)(entityInQueryIndex^globalSeed)); + { + + var size = random.NextInt2(1, 8); + var min = (int2)position + random.NextInt2(-10, 10 - size); + min = math.max(0, min); + min = math.min(farm.MapSize - size - 1, min); + + + for (int _x = 0; _x <= size.x; _x++) + { + var x = _x + min.x; + for (int _y = 0; _y <= size.y; _y++) + { + var y = _y + min.y; + var index = x + farm.MapSize.x * y; + var tile = GetComponent(tiles[index]); + var groundState = tile.State; + if ((groundState != GroundState.Default & groundState != GroundState.Tilled) + | (tile.TileRock != Entity.Null | tile.StoreTile)) + { + if (random.NextFloat() < 0.2f) + { + parallelCommandBuffer.RemoveComponent(entityInQueryIndex, entity); + } + return; + + } + } + + } + parallelCommandBuffer.AddComponent(entityInQueryIndex, entity, new Intension.TillGround.FoundTillingZone() { TillingZone = new RectInt(min.x, min.y, size.x, size.y) }); + + } + + + + + }).ScheduleParallel(); + parallelCommandBuffer = commandBufferSystem.CreateCommandBuffer().AsParallelWriter(); + + Entities + .WithReadOnly(tiles) + .WithAll() + .ForEach((Entity entity, int entityInQueryIndex, ref Intension.TillGround.FoundTillingZone foundTillingZone, ref DynamicBuffer path, in Farmer farmer) => + { + ref readonly var position = ref farmer.Position; + ref var tillingZone = ref foundTillingZone.TillingZone; + var random = Random.CreateFromIndex((uint)(entityInQueryIndex ^ globalSeed)); + { + + var x = (int)position.x; + var y = (int)position.y; + { + var index = x + farm.MapSize.x * y; + var tileEntity = tiles[index]; + var tile = GetComponent(tileEntity); + if (tile.State == GroundState.Default) + { + if (x >= tillingZone.xMin && x <= tillingZone.xMax) + { + if (y >= tillingZone.yMin && y <= tillingZone.yMax) + { + path.Clear(); + tile.State = GroundState.Tilled; + SetComponent(tileEntity, tile); + SetComponent(tileEntity, new GroundTile.Tilled() { Value = random.NextFloat(0.8f, 1f) }); + } + } + } + if (path.Length == 0) + { + var pathing = new Pathing(farm, tiles, GetComponentDataFromEntity(true)); + int tileHash = pathing.SearchForOne((int2)position, 25,new Pathing.IsNavigableDefault(),new Pathing.IsTillable(), tillingZone); + if (tileHash != -1) + { + pathing.AssignLatestPath(path,pathing.Unhash(tileHash)); + } + else + { + parallelCommandBuffer.RemoveComponent(entityInQueryIndex, entity); + parallelCommandBuffer.RemoveComponent(entityInQueryIndex, entity); + } + pathing.Dispose(); + } + } + } + + + + }).Schedule(); + commandBufferSystem.AddJobHandleForProducer(Dependency); + } + } + [UpdateInGroup(typeof(IntensionSystemGroup))] + public class PlantSeedsSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var plantPrefabsEntity = GetSingletonEntity(); + var plantPrefabs = GetBuffer(plantPrefabsEntity).AsNativeArray().Reinterpret(); + var farm = GetSingleton(); + var farmEntity = GetSingletonEntity(); + var tiles = GetBuffer(farmEntity).AsNativeArray().Reinterpret(); + + var parallelCommandBuffer = commandBufferSystem.CreateCommandBuffer().AsParallelWriter(); + Entities + .WithReadOnly(tiles) + .WithAll() + .WithNone() + .ForEach((Entity entity, int entityInQueryIndex, ref DynamicBuffer path, in Farmer farmer) => + { + ref readonly var position = ref farmer.Position; + var index = (int)position.x + farm.MapSize.x * (int)position.y; + var tile = GetComponent(tiles[index]); + if (tile.StoreTile) + { + parallelCommandBuffer.AddComponent(entityInQueryIndex, entity); + } + else if (path.Length == 0) + { + var pathing = new Pathing(farm, tiles, GetComponentDataFromEntity(true)); + pathing.WalkTo((int2)position, 40,new Pathing.IsStore(), path); + if (path.Length == 0) + { + parallelCommandBuffer.RemoveComponent(entityInQueryIndex, entity); + } + pathing.Dispose(); + } + }).ScheduleParallel(); + CompleteDependency(); + var entityManager = EntityManager; + var pathing = new Pathing.StructualChange(farmEntity, entityManager,Allocator.TempJob); + Entities + .WithStructuralChanges() + .WithAll() + .ForEach((Entity entity, int entityInQueryIndex, in Farmer farmer) => + { + var tiles = entityManager.GetBuffer(farmEntity).AsNativeArray().Reinterpret(); + var path = entityManager.GetBuffer(entity); + ref readonly var position = ref farmer.Position; + int tileX = (int)position.x; + int tileY = (int)position.y; + var index = tileX + farm.MapSize.x * tileY; + var tile = entityManager.GetComponentData(tiles[index]); + var random = Random.CreateFromIndex((uint)entityInQueryIndex); + if (tile.State == GroundState.Tilled) + { + path.Clear(); + int seed = math.clamp((int)(Mathf.PerlinNoise(tileX / 10f, tileY / 10f) * Plant.Variants),0,Plant.Variants-1); + + Helper.SpawnPlant(entityManager,farmEntity,(int2)position ,seed ); + } + else + { + if (path.Length == 0) + { + if (random.NextFloat() < .1f) + { + entityManager.RemoveComponent(entity,new ComponentTypes(ComponentType.ReadWrite(),ComponentType.ReadWrite())); + } + else + { + + int tileHash = pathing.SearchForOne((int2)position, 25,new Pathing.IsNavigableDefault(),new Pathing.IsReadyForPlant(), pathing.FullMapZone); + if (tileHash != -1) + { + pathing.AssignLatestPath(path, pathing.Unhash(tileHash)); + } + else + { + entityManager.RemoveComponent(entity, new ComponentTypes(ComponentType.ReadWrite(), ComponentType.ReadWrite())); + } + } + } + } + }).Run(); + pathing.Dispose(Dependency); + commandBufferSystem.AddJobHandleForProducer(Dependency); + + } + } + [UpdateInGroup(typeof(IntensionSystemGroup))] + public class SellPlantsSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var moneyEntity = GetSingletonEntity(); + var farm = GetSingleton(); + var smooth = 1f - math.pow(GetSingleton().MovementSmooth, Time.DeltaTime); + var tiles = GetBuffer(GetSingletonEntity()).AsNativeArray().Reinterpret(); + + var commandBuffer = commandBufferSystem.CreateCommandBuffer(); + Entities + .WithReadOnly(tiles) + .WithAll() + .WithNone() + .ForEach((Entity entity, int entityInQueryIndex, ref DynamicBuffer path, in Farmer farmer) => + { + ref readonly var position = ref farmer.Position; + var index = (int)position.x + farm.MapSize.x * (int)position.y; + var tile = GetComponent(tiles[index]); + if (tile.TilePlant != Entity.Null && GetComponent(tile.TilePlant).Value >= 1f) + { + commandBuffer.AddComponent( entity, new Intension.SellPlants.HeldPlant() { Plant = tile.TilePlant }); + Helper.HarvestPlant(farm,tiles,GetComponentDataFromEntity(),GetComponentDataFromEntity(),(int2)position); + path.Clear(); + } + else if (path.Length == 0) + { + var pathing = new Pathing(farm, tiles, GetComponentDataFromEntity(true)); + pathing.WalkTo((int2)position, 25, new Farm.IsHarvestableAndUnreserved(GetComponentDataFromEntity(true),GetComponentDataFromEntity(true)), path); + pathing.Dispose(); + if (path.Length == 0) + { + commandBuffer.RemoveComponent(entity); + } + else + { + var pos = path[0].Position; + var i = pos.x + farm.MapSize.x * pos.y; + Entity plantEntity = GetComponent(tiles[i]).TilePlant; + var plant = GetComponent(plantEntity); + plant.reserved = true; + SetComponent(plantEntity, plant); + } + + } + }).Schedule(); + + commandBuffer = commandBufferSystem.CreateCommandBuffer(); + Entities + .WithReadOnly(tiles) + .WithAll() + .ForEach((Entity entity, int entityInQueryIndex, ref Intension.SellPlants.HeldPlant heldPlant, ref DynamicBuffer path, in Farmer farmer) => + { + + ref readonly var position = ref farmer.Position; + var smoothPosition = GetComponent(entity).Value; + int tileX = (int)position.x; + int tileY = (int)position.y; + var index = tileX + farm.MapSize.x * tileY; + var tile = GetComponent(tiles[index]); + var random = Random.CreateFromIndex((uint)entityInQueryIndex); + Helper.EaseToWorldPosition(GetComponentDataFromEntity(), heldPlant.Plant, new float3(smoothPosition.x, 1f, smoothPosition.z), smooth); + if (tile.StoreTile) + { + Helper.SellPlant(moneyEntity, GetComponentDataFromEntity(),GetComponentDataFromEntity(),GetComponentDataFromEntity(), heldPlant.Plant, GetComponentDataFromEntity(), (int2)position, commandBuffer); + commandBuffer.RemoveComponent(entity); + path.Clear(); + + } + else if (path.Length == 0) + { + var pathing = new Pathing(farm, tiles, GetComponentDataFromEntity(true)); + pathing.WalkTo((int2)position, 40,new Pathing.IsStore(), path); + pathing.Dispose(); + } + }).Schedule(); + commandBufferSystem.AddJobHandleForProducer(Dependency); + + } + } + [UpdateInGroup(typeof(FarmerSimulationSystemGroup))] + [UpdateAfter(typeof(IntensionSystemGroup))] + public class FollowPathSystem : SystemBase + { + + protected override void OnUpdate() + { + var farm = GetSingleton(); + var tiles = GetBuffer(GetSingletonEntity()).AsNativeArray().Reinterpret(); + + var deltaTime = Time.DeltaTime; + Entities + .WithReadOnly(tiles) + .ForEach((ref DynamicBuffer path, ref Farmer farmer) => + { + ref var position = ref farmer.Position; + + if (path.Length > 0) + { + var tile = (int2)position; + var nextTile = path[path.Length - 1].Position; + if (math.all(tile == nextTile)) + { + path.Length--; + } + else + { + if (IsBlocked(nextTile) == false) + { + float offset = .5f; + if (GetComponent(tiles[PositionToIndex(tile)]).State == GroundState.Plant) + { + offset = .01f; + } + Vector2 targetPos = (float2)nextTile + offset; + const float WalkSpeed = 4f; + position = Vector2.MoveTowards(position, targetPos, WalkSpeed * deltaTime); + } + } + } + int PositionToIndex(int2 position) => position.x + farm.MapSize.x * position.y; + bool IsBlocked(int2 position) + { + return math.any(position < 0) | math.any(position >= farm.MapSize) || GetComponent(tiles[PositionToIndex(position)]).TileRock != Entity.Null; + } + + }).ScheduleParallel(); + } + } + [UpdateInGroup(typeof(FarmerSimulationSystemGroup))] + [UpdateAfter(typeof(FollowPathSystem))] + public class ApplySmoothPositionSystem : SystemBase + { + protected override void OnUpdate() + { + var smooth = 1f - math.pow(GetSingleton().MovementSmooth, Time.DeltaTime); + Entities.ForEach((ref Translation translation, in Farmer farmer) => + { + ref readonly var position = ref farmer.Position; + ref var smoothPosition = ref translation.Value; + smoothPosition.xz = math.lerp(smoothPosition.xz, position, smooth); + }).ScheduleParallel(); + } + } + + [UpdateInGroup(typeof(FarmerSimulationSystemGroup))] + [UpdateAfter(typeof(ApplySmoothPositionSystem))] + public class AttackingARockPositionOffsetSystem : SystemBase + { + protected override void OnUpdate() + { + var globalSeed = (uint)Time.ElapsedTime.GetHashCode(); + Entities.ForEach((int entityInQueryIndex, ref Translation translation, in Intension.SmashRocks smashRocks, in DynamicBuffer path, in Farmer farmer) => + { + if (smashRocks.AttackingARock) + { + var random = Random.CreateFromIndex((uint)entityInQueryIndex ^ globalSeed); + ref readonly var position = ref farmer.Position; + ref var smoothPosition = ref translation.Value; + smoothPosition.xz += ((float2)path[0].Position + 0.5f - smoothPosition.xz) * random.NextFloat(0.5f); + } + + }).ScheduleParallel(); + } + } + +} \ No newline at end of file diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerSimulationSystemGroup.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerSimulationSystemGroup.cs.meta new file mode 100644 index 0000000000..68d052b2e9 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/FarmerSimulationSystemGroup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1db1317ecb145fa43ab450c9ec9c3760 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/Helper.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/Helper.cs new file mode 100644 index 0000000000..f937a8b136 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/Helper.cs @@ -0,0 +1,108 @@ +using Unity.Collections; +using Unity.Entities; +using Unity.Mathematics; +using Unity.Transforms; +using UnityEngine; +using Random = Unity.Mathematics.Random; + +namespace AutoFarmers +{ + public static class Helper + { + public static void HarvestPlant(Farm farm,NativeArray tiles,ComponentDataFromEntity tileFromEntity ,ComponentDataFromEntity plantFromEntity ,int2 position) + { + var tileEntity = tiles[PositionToHash(farm, position)]; + var tile = tileFromEntity[tileEntity]; + var plantEntity = tile.TilePlant; + var plant = plantFromEntity[plantEntity]; + plant.harvested = true; + tile.TilePlant = Entity.Null; + tile.State = GroundState.Tilled; + tileFromEntity[tileEntity] = tile; + plantFromEntity[plantEntity] = plant; + } + + public static void EaseToWorldPosition(ComponentDataFromEntity translationFromEntity,Entity plantEntity, float3 position,float smooth) + { + var translation = translationFromEntity[plantEntity]; + translation.Value += (position - translation.Value) * smooth * 3f; + translationFromEntity[plantEntity] = translation; + } + public static void SellPlant(Entity farmEntity,ComponentDataFromEntity moneyFromEntity,ComponentDataFromEntity farmerGlobalParamsFromEntity,ComponentDataFromEntity droneGlobalParamsFromEntity, Entity plantEntity,ComponentDataFromEntity plantFromEntity,int2 storePos,EntityCommandBuffer commandBuffer) + { + var plant = plantFromEntity[plantEntity]; + plant.Position = storePos; + plantFromEntity[plantEntity] = plant; + commandBuffer.AddComponent(plantEntity); + var money = moneyFromEntity[farmEntity]; + var farmerGlobalParams = farmerGlobalParamsFromEntity[farmEntity]; + var droneGlobalParams = droneGlobalParamsFromEntity[farmEntity]; + money.MoneyForFarmers++; + money.MoneyForDrones++; + if (money.MoneyForFarmers >= 10 & farmerGlobalParams.FarmerCount < farmerGlobalParams.MaxFarmerCount) + { + var farmer = commandBuffer.Instantiate(farmerGlobalParams.FarmerPrefab); + var pos3D = new float3(storePos.x + 0.5f, 0.5f, storePos.y + 0.5f); + commandBuffer.SetComponent(farmer, new Farmer() { Position = pos3D.xz }); + commandBuffer.SetComponent(farmer, new Translation() { Value = pos3D }); + money.MoneyForFarmers -= 10; + farmerGlobalParams.FarmerCount++; + } + if(money.MoneyForDrones >= 50 & droneGlobalParams.DroneCount < droneGlobalParams.MaxDroneCount) + { + var random = Random.CreateFromIndex((uint)droneGlobalParams.DroneCount); + var droneCount = math.min(5, droneGlobalParams.MaxDroneCount - droneGlobalParams.DroneCount); + var pos = new float3(storePos.x + 0.5f, 0f, storePos.y + 0.5f); + for (int i = 0; i < droneCount; i++) + { + var drone = commandBuffer.Instantiate(droneGlobalParams.DronePrefab); + commandBuffer.SetComponent(drone, new Drone() { Position = pos, HoverHeight = random.NextFloat(2f, 3f), SearchTimer = random.NextFloat() }); + commandBuffer.SetComponent(drone, new Translation() { Value = pos }); + } + droneGlobalParams.DroneCount += droneCount; + money.MoneyForDrones -= 50; + } + + moneyFromEntity[farmEntity] = money; + farmerGlobalParamsFromEntity[farmEntity] = farmerGlobalParams; + droneGlobalParamsFromEntity[farmEntity] = droneGlobalParams; + + } + public static void SpawnPlant(EntityManager entityManager,Entity farmEntity ,int2 pos,int seed) + { + var farm = entityManager.GetComponentData(farmEntity); + var tiles = entityManager.GetBuffer(farmEntity).Reinterpret(); + var plantPrefabs = entityManager.GetBuffer(farmEntity).Reinterpret(); + var index = PositionToHash(farm, pos); + var random = Random.CreateFromIndex((uint)index); + var tileEntity = tiles[index]; + var plantEntity = entityManager.Instantiate(plantPrefabs[seed]); + entityManager.SetComponentData(plantEntity, + new Plant() + { + Position = pos, + harvested = false, + reserved = false, + }); + entityManager.SetComponentData(plantEntity, new Translation() { Value = new float3(pos.x + 0.5f, 0, pos.y + 0.5f) }); + entityManager.SetComponentData(plantEntity, new Rotation() { Value = Quaternion.Euler(random.NextFloat(-5f, 5f), random.NextFloat(360f), random.NextFloat(-5f, 5f))}); + var tile = entityManager.GetComponentData(tileEntity); + tile.TilePlant = plantEntity; + tile.State = GroundState.Plant; + entityManager.SetComponentData(tileEntity, tile); + } + public static int PositionToHash(Farm farm, int2 pos) => pos.x + farm.MapSize.x * pos.y; + public static void HashToPosition(Farm farm,int hash, out int x,out int y) + { + y = hash / farm.MapSize.x; + x = hash - farm.MapSize.x * y; + + } + public static void SpawnFarmer(EntityManager entityManager,Entity farmerPrefab,int2 pos) + { + var entity = entityManager.Instantiate(farmerPrefab); + entityManager.SetComponentData(entity, new Farmer() { Position = pos }); + } + } + +} \ No newline at end of file diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/Helper.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/Helper.cs.meta new file mode 100644 index 0000000000..7d6a23cf13 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/Helper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1baf71127cbbf0f49ac844bed15a15d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/Pathing.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/Pathing.cs new file mode 100644 index 0000000000..ef8a8f4d8b --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/Pathing.cs @@ -0,0 +1,536 @@ +using System; +using Unity.Collections; +using Unity.Entities; +using Unity.Jobs; +using Unity.Mathematics; +using UnityEngine; + +namespace AutoFarmers +{ + public struct Pathing : IDisposable + { + static readonly int[] dirsX = new int[] { 1, -1, 0, 0 }; + static readonly int[] dirsY = new int[] { 0, 0, 1, -1 }; + int2 mapSize; + [ReadOnly] NativeArray tiles; + [ReadOnly] ComponentDataFromEntity groundTileFromEntity; + NativeArray visitedTiles; + NativeList activeTiles; + NativeList nextTiles; + NativeList outputTiles; + public RectInt FullMapZone => new RectInt(0, 0, mapSize.x, mapSize.y); + + + public int Hash(int x, int y) => Hash(new int2(x, y)); + public int Hash(int2 position) => position.x + mapSize.x * position.y; + public void Unhash(int hash, out int x, out int y) + { + y = hash / mapSize.x; + x = hash - y * mapSize.x; + } + public int2 Unhash(int hash) + { + Unhash(hash, out var x, out var y); + return new int2(x, y); + } + public GroundTile Tile(int x, int y) => Tile(new int2(x, y)); + public GroundTile Tile(int2 position) => Tile(Hash(position)); + GroundTile Tile(int hash) => groundTileFromEntity[tiles[hash]]; + + public readonly struct IsNavigableDefault : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.TileRock == Entity.Null; + } + } + + public readonly struct IsNavigableAll : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return true; + } + } + public readonly struct IsRock : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.TileRock != Entity.Null; + } + } + + public readonly struct IsStore : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.StoreTile; + } + } + + public readonly struct IsTillable : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.State == GroundState.Default; + } + } + + public readonly struct IsReadyForPlant : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.State == GroundState.Tilled; + } + } + + public Pathing(in Farm farm,NativeArray tiles,in ComponentDataFromEntity groundTileFromEntity, Allocator allocator = Allocator.Temp) + { + mapSize = farm.MapSize; + this.tiles = tiles; + this.groundTileFromEntity = groundTileFromEntity; + visitedTiles = new NativeArray(farm.MapSize.x * farm.MapSize.y, allocator, NativeArrayOptions.UninitializedMemory); + activeTiles = new NativeList(allocator); + nextTiles = new NativeList(allocator); + outputTiles = new NativeList(allocator); + } + + public Entity FindNearbyRock(int2 pos,int range, DynamicBuffer outputPath) + { + int rockPosHash = SearchForOne(pos, range, new IsNavigableDefault(),new IsRock(), FullMapZone); + if (rockPosHash == -1) + { + return Entity.Null; + } + else + { + if (outputPath.IsCreated) + { + AssignLatestPath(outputPath, Unhash(rockPosHash)); + } + return Tile(rockPosHash).TileRock; + } + } + public void WalkTo(int2 pos, int range, TCheckMatch CheckMatch, DynamicBuffer outputPath) + where TCheckMatch : unmanaged, ITilePredicate + { + int storePosHash = SearchForOne(pos, range, new IsNavigableDefault(), CheckMatch, FullMapZone); + if (storePosHash != -1) + { + if (outputPath.IsCreated) + { + AssignLatestPath(outputPath, Unhash(storePosHash)); + } + } + } + public int SearchForOne(int2 start, int range, TNavigable IsNavigable, TCheckMatch CheckMatch, RectInt requiredZone) + where TNavigable:unmanaged,ITilePredicate + where TCheckMatch:unmanaged,ITilePredicate + { + outputTiles = Search(start, range, IsNavigable, CheckMatch, requiredZone, 1); + if (outputTiles.Length == 0) + { + return -1; + } + else + { + return outputTiles[0]; + } + } + + public NativeList Search(int2 start, int range, TNavigable IsNavigable, TCheckMatch CheckMatch, RectInt requiredZone, int maxResultCount = 0) + where TNavigable : unmanaged, ITilePredicate + where TCheckMatch : unmanaged, ITilePredicate + { + var mapWidth = mapSize.x; + var mapHeight = mapSize.y; + for (int y = 0; y < mapHeight; y++) + { + for (int x = 0; x < mapWidth; x++) + { + visitedTiles[Hash(x,y)] = -1; + } + } + outputTiles.Clear(); + visitedTiles[Hash(start)] = 0; + activeTiles.Clear(); + nextTiles.Clear(); + nextTiles.Add(Hash(start)); + + int steps = 0; + + while (nextTiles.Length > 0 && (steps < range || range == 0)) + { + var temp = activeTiles; + activeTiles = nextTiles; + nextTiles = temp; + nextTiles.Clear(); + + steps++; + + for (int i = 0; i < activeTiles.Length; i++) + { + int x, y; + Unhash(activeTiles[i], out x, out y); + + for (int j = 0; j < dirsX.Length; j++) + { + int x2 = x + dirsX[j]; + int y2 = y + dirsY[j]; + + if (x2 < 0 || y2 < 0 || x2 >= mapWidth || y2 >= mapHeight) + { + continue; + } + + if (visitedTiles[Hash(x2, y2)] == -1 || visitedTiles[Hash(x2, y2)] > steps) + { + + int hash = Hash(x2, y2); + if (IsNavigable.Predicate(Tile(x2,y2))) + { + visitedTiles[hash] = steps; + nextTiles.Add(hash); + } + if (x2 >= requiredZone.xMin && x2 <= requiredZone.xMax) + { + if (y2 >= requiredZone.yMin && y2 <= requiredZone.yMax) + { + if (CheckMatch.Predicate(Tile(x2, y2))) + { + outputTiles.Add(hash); + if (maxResultCount != 0 && outputTiles.Length >= maxResultCount) + { + return outputTiles; + } + } + } + } + } + } + } + } + + return outputTiles; + } + public void AssignLatestPath(DynamicBuffer target, int2 end) + { + target.Clear(); + var mapWidth = mapSize.x; + var mapHeight = mapSize.y; + var x = end.x; + var y = end.y; + target.Add(new int2(x,y)); + + int dist = int.MaxValue; + while (dist > 0) + { + int minNeighborDist = int.MaxValue; + int bestNewX = x; + int bestNewY = y; + for (int i = 0; i < dirsX.Length; i++) + { + int x2 = x + dirsX[i]; + int y2 = y + dirsY[i]; + if (x2 < 0 || y2 < 0 || x2 >= mapWidth || y2 >= mapHeight) + { + continue; + } + + int newDist = visitedTiles[Hash(x2, y2)]; + if (newDist != -1 && newDist < minNeighborDist) + { + minNeighborDist = newDist; + bestNewX = x2; + bestNewY = y2; + } + } + x = bestNewX; + y = bestNewY; + dist = minNeighborDist; + target.Add(new int2(x, y)); + } + } + + public void Dispose() + { + visitedTiles.Dispose(); + activeTiles.Dispose(); + nextTiles.Dispose(); + outputTiles.Dispose(); + } + + public void Dispose(JobHandle inputDeps) + { + visitedTiles.Dispose(inputDeps); + activeTiles.Dispose(inputDeps); + nextTiles.Dispose(inputDeps); + outputTiles.Dispose(inputDeps); + } + public struct StructualChange : IDisposable + { + int2 mapSize; + Entity farmEntity; + [ReadOnly] NativeArray tiles; + [ReadOnly] EntityManager entityManager; + NativeArray visitedTiles; + NativeList activeTiles; + NativeList nextTiles; + NativeList outputTiles; + public RectInt FullMapZone => new RectInt(0, 0, mapSize.x, mapSize.y); + + + public int Hash(int x, int y) => Hash(new int2(x, y)); + public int Hash(int2 position) => position.x + mapSize.x * position.y; + public void Unhash(int hash, out int x, out int y) + { + y = hash / mapSize.x; + x = hash - y * mapSize.x; + } + public int2 Unhash(int hash) + { + Unhash(hash, out var x, out var y); + return new int2(x, y); + } + public GroundTile Tile(int x, int y) => Tile(new int2(x, y)); + public GroundTile Tile(int2 position) => Tile(Hash(position)); + GroundTile Tile(int hash) => entityManager.GetComponentData(tiles[hash]); + + public readonly struct IsNavigableDefault : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.TileRock == Entity.Null; + } + } + + public readonly struct IsNavigableAll : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return true; + } + } + public readonly struct IsRock : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.TileRock != Entity.Null; + } + } + + public readonly struct IsStore : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.StoreTile; + } + } + + public readonly struct IsTillable : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.State == GroundState.Default; + } + } + + public readonly struct IsReadyForPlant : ITilePredicate + { + public bool Predicate(GroundTile tile) + { + return tile.State == GroundState.Tilled; + } + } + + public StructualChange(Entity farmEntity, in EntityManager entityManager, Allocator allocator = Allocator.Temp) + { + this.farmEntity = farmEntity; + var farm = entityManager.GetComponentData(farmEntity); + mapSize = farm.MapSize; + tiles = entityManager.GetBuffer(farmEntity).Reinterpret().AsNativeArray(); + this.entityManager = entityManager; + visitedTiles = new NativeArray(farm.MapSize.x * farm.MapSize.y, allocator, NativeArrayOptions.UninitializedMemory); + activeTiles = new NativeList(allocator); + nextTiles = new NativeList(allocator); + outputTiles = new NativeList(allocator); + } + + public Entity FindNearbyRock(int2 pos, int range, DynamicBuffer outputPath) + { + int rockPosHash = SearchForOne(pos, range, new IsNavigableDefault(), new IsRock(), FullMapZone); + if (rockPosHash == -1) + { + return Entity.Null; + } + else + { + if (outputPath.IsCreated) + { + AssignLatestPath(outputPath, Unhash(rockPosHash)); + } + return Tile(rockPosHash).TileRock; + } + } + public void WalkTo(int2 pos, int range, TCheckMatch CheckMatch, DynamicBuffer outputPath) + where TCheckMatch : unmanaged, ITilePredicate + { + int storePosHash = SearchForOne(pos, range, new IsNavigableDefault(), CheckMatch, FullMapZone); + if (storePosHash != -1) + { + if (outputPath.IsCreated) + { + AssignLatestPath(outputPath, Unhash(storePosHash)); + } + } + } + public int SearchForOne(int2 start, int range, TNavigable IsNavigable, TCheckMatch CheckMatch, RectInt requiredZone) + where TNavigable : unmanaged, ITilePredicate + where TCheckMatch : unmanaged, ITilePredicate + { + outputTiles = Search(start, range, IsNavigable, CheckMatch, requiredZone, 1); + if (outputTiles.Length == 0) + { + return -1; + } + else + { + return outputTiles[0]; + } + } + + public NativeList Search(int2 start, int range, TNavigable IsNavigable, TCheckMatch CheckMatch, RectInt requiredZone, int maxResultCount = 0) + where TNavigable : unmanaged, ITilePredicate + where TCheckMatch : unmanaged, ITilePredicate + { + var mapWidth = mapSize.x; + var mapHeight = mapSize.y; + for (int y = 0; y < mapHeight; y++) + { + for (int x = 0; x < mapWidth; x++) + { + visitedTiles[Hash(x, y)] = -1; + } + } + tiles = entityManager.GetBuffer(farmEntity).Reinterpret().AsNativeArray(); + outputTiles.Clear(); + visitedTiles[Hash(start)] = 0; + activeTiles.Clear(); + nextTiles.Clear(); + nextTiles.Add(Hash(start)); + + int steps = 0; + + while (nextTiles.Length > 0 && (steps < range || range == 0)) + { + var temp = activeTiles; + activeTiles = nextTiles; + nextTiles = temp; + nextTiles.Clear(); + + steps++; + + for (int i = 0; i < activeTiles.Length; i++) + { + int x, y; + Unhash(activeTiles[i], out x, out y); + + for (int j = 0; j < dirsX.Length; j++) + { + int x2 = x + dirsX[j]; + int y2 = y + dirsY[j]; + + if (x2 < 0 || y2 < 0 || x2 >= mapWidth || y2 >= mapHeight) + { + continue; + } + + if (visitedTiles[Hash(x2, y2)] == -1 || visitedTiles[Hash(x2, y2)] > steps) + { + + int hash = Hash(x2, y2); + if (IsNavigable.Predicate(Tile(x2, y2))) + { + visitedTiles[hash] = steps; + nextTiles.Add(hash); + } + if (x2 >= requiredZone.xMin && x2 <= requiredZone.xMax) + { + if (y2 >= requiredZone.yMin && y2 <= requiredZone.yMax) + { + if (CheckMatch.Predicate(Tile(x2, y2))) + { + outputTiles.Add(hash); + if (maxResultCount != 0 && outputTiles.Length >= maxResultCount) + { + return outputTiles; + } + } + } + } + } + } + } + } + + return outputTiles; + } + public void AssignLatestPath(DynamicBuffer target, int2 end) + { + target.Clear(); + var mapWidth = mapSize.x; + var mapHeight = mapSize.y; + var x = end.x; + var y = end.y; + target.Add(new int2(x, y)); + + int dist = int.MaxValue; + while (dist > 0) + { + int minNeighborDist = int.MaxValue; + int bestNewX = x; + int bestNewY = y; + for (int i = 0; i < dirsX.Length; i++) + { + int x2 = x + dirsX[i]; + int y2 = y + dirsY[i]; + if (x2 < 0 || y2 < 0 || x2 >= mapWidth || y2 >= mapHeight) + { + continue; + } + + int newDist = visitedTiles[Hash(x2, y2)]; + if (newDist != -1 && newDist < minNeighborDist) + { + minNeighborDist = newDist; + bestNewX = x2; + bestNewY = y2; + } + } + x = bestNewX; + y = bestNewY; + dist = minNeighborDist; + target.Add(new int2(x, y)); + } + } + + public void Dispose() + { + visitedTiles.Dispose(); + activeTiles.Dispose(); + nextTiles.Dispose(); + outputTiles.Dispose(); + } + + public void Dispose(JobHandle inputDeps) + { + visitedTiles.Dispose(inputDeps); + activeTiles.Dispose(inputDeps); + nextTiles.Dispose(inputDeps); + outputTiles.Dispose(inputDeps); + } + + } + } + +} \ No newline at end of file diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/Pathing.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/Pathing.cs.meta new file mode 100644 index 0000000000..cc6619d92a --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/Pathing.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aa6cbbe34aa254348a3e193aff193b82 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/PlantSimulationSystemGroup.cs b/Ported/DOTS-AutoFarmers/Assets/Scripts/PlantSimulationSystemGroup.cs new file mode 100644 index 0000000000..37a95a5adb --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/PlantSimulationSystemGroup.cs @@ -0,0 +1,90 @@ +using System; +using Unity.Entities; +using Unity.Mathematics; +using Unity.Animation; +using Unity.Transforms; +using Unity.Jobs; + +namespace AutoFarmers +{ + [UpdateInGroup(typeof(SimulationSystemGroup))] + public class PlantSimulationSystemGroup : ComponentSystemGroup + { + + } + [UpdateInGroup(typeof(PlantSimulationSystemGroup))] + public class SoldPlantSimulationSystem : SystemBase + { + EntityCommandBufferSystem commandBufferSystem; + protected override void OnCreate() + { + commandBufferSystem = World.GetOrCreateSystem(); + } + protected override void OnUpdate() + { + var parallelCommandBuffer = commandBufferSystem.CreateCommandBuffer().AsParallelWriter(); + var deltaTime = Time.DeltaTime; + var smooth = 1f - math.pow(0.1f, deltaTime); + var farm = GetSingleton(); + Entities.ForEach((Entity entity, int entityInQueryIndex, ref Plant.Sold sold, ref Translation translation, ref NonUniformScale nonUniformScale, in Plant plant) => + { + ref var t = ref sold.ElapsedTime; + t += deltaTime; + if (t >= 1f) + { + parallelCommandBuffer.DestroyEntity(entityInQueryIndex, entity); + } + else + { + var y = AnimationCurveEvaluator.Evaluate(t, ref farm.SoldPlantYCurve); + var x = plant.Position.x + 0.5f; + var z = plant.Position.y + 0.5f; + var scaleXZ = AnimationCurveEvaluator.Evaluate(t, ref farm.SoldPlantXZScaleCurve); + var scaleY = AnimationCurveEvaluator.Evaluate(t, ref farm.SoldPlantYScaleCurve); + var position = new float3(x, y, z); + translation.Value += (position - translation.Value) * smooth * 3f; + nonUniformScale.Value = new float3(scaleXZ, scaleY, scaleXZ); + } + }).ScheduleParallel(); + } + } + + [UpdateInGroup(typeof(PlantSimulationSystemGroup))] + [UpdateAfter(typeof(SoldPlantSimulationSystem))] + public class ApplyPlantGrowthScaleSystem : SystemBase + { + protected override void OnUpdate() + { + var deltaTimeDiv10 = Time.DeltaTime/10f; + Entities + .ForEach((Entity entity,ref NonUniformScale nonUniformScale, ref Plant.Growth growth) => + { + growth.Value = math.min(growth.Value + deltaTimeDiv10, 1f); + var t = math.sqrt(growth.Value); + var xz = math.smoothstep(0, 1, t * t * t * t * t) * 0.9f + 0.1f; + var scale = new float3(xz, t, xz); + nonUniformScale.Value = math.select(scale, nonUniformScale.Value * scale, HasComponent(entity)); + }).ScheduleParallel(); + //var soldJob = Entities + // .WithAll() + // .ForEach((ref NonUniformScale nonUniformScale, ref Plant.Growth growth) => + //{ + // growth.Value = math.min(growth.Value + deltaTimeDiv10, 1f); + // var t = math.sqrt(growth.Value); + // nonUniformScale.Value.y *= t; + // nonUniformScale.Value.xz *= math.smoothstep(0, 1, t * t * t * t * t) * 0.9f + 0.1f; + //}).ScheduleParallel(Dependency); + //var notSoldJob = Entities + // .WithNone() + // .ForEach((ref NonUniformScale nonUniformScale, ref Plant.Growth growth) => + // { + // growth.Value = math.min(growth.Value + deltaTimeDiv10, 1f); + // var t = math.sqrt(growth.Value); + // nonUniformScale.Value.y = t; + // nonUniformScale.Value.xz = math.smoothstep(0, 1, t * t * t * t * t) * 0.9f + 0.1f; + // }).ScheduleParallel(Dependency); + //Dependency = JobHandle.CombineDependencies(soldJob, notSoldJob); + } + } + +} \ No newline at end of file diff --git a/Ported/DOTS-AutoFarmers/Assets/Scripts/PlantSimulationSystemGroup.cs.meta b/Ported/DOTS-AutoFarmers/Assets/Scripts/PlantSimulationSystemGroup.cs.meta new file mode 100644 index 0000000000..21dc603600 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Scripts/PlantSimulationSystemGroup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fd0e13f6e83f31b449f360a3901c37c8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Shaders.meta b/Ported/DOTS-AutoFarmers/Assets/Shaders.meta new file mode 100644 index 0000000000..83ba7a9177 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Shaders.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c1da8cf763a4d014db909dcec52b9b20 +folderAsset: yes +timeCreated: 1530821981 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Shaders/Ground.shadergraph b/Ported/DOTS-AutoFarmers/Assets/Shaders/Ground.shadergraph new file mode 100644 index 0000000000..47d3ac7b85 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Shaders/Ground.shadergraph @@ -0,0 +1,1414 @@ +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "92a881da2c1047dfb2e0920f9b8382d4", + "m_Properties": [ + { + "m_Id": "6e2650c36edc424da28f6575141622ac" + } + ], + "m_Keywords": [], + "m_Nodes": [ + { + "m_Id": "cb221a6f1fde46b8b89c0e87ade70da5" + }, + { + "m_Id": "3450d5f967254840a8747ff68aba37e8" + }, + { + "m_Id": "2750c2dfcaaf45c9ad719bf5a5b9c06e" + }, + { + "m_Id": "adefc2faa98f4749a74f7a192cb3eb55" + }, + { + "m_Id": "cfd43f027f6a4a50b1ef1e1fb98fc83b" + }, + { + "m_Id": "f7f66089dba24e4181b44381f4c76396" + }, + { + "m_Id": "f7ff3713d3ad436997d4aa27790e51cf" + }, + { + "m_Id": "887c543834b94c7495ea1a1720f021ba" + }, + { + "m_Id": "518b0d0405da427793893931b99d63f1" + }, + { + "m_Id": "dc13c8f7eff64f83900272671e5be94b" + }, + { + "m_Id": "897e050e87a441139b1706a2679257c8" + }, + { + "m_Id": "c9c7f11f17c3419a8f38d671ab6851c4" + }, + { + "m_Id": "fbf587eb90504e71993e602fe3434e9a" + }, + { + "m_Id": "5bfbb0cafca841b6a4140378c8447df2" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5bfbb0cafca841b6a4140378c8447df2" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "dc13c8f7eff64f83900272671e5be94b" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "897e050e87a441139b1706a2679257c8" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c9c7f11f17c3419a8f38d671ab6851c4" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c9c7f11f17c3419a8f38d671ab6851c4" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "adefc2faa98f4749a74f7a192cb3eb55" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "dc13c8f7eff64f83900272671e5be94b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c9c7f11f17c3419a8f38d671ab6851c4" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "fbf587eb90504e71993e602fe3434e9a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c9c7f11f17c3419a8f38d671ab6851c4" + }, + "m_SlotId": 2 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "cb221a6f1fde46b8b89c0e87ade70da5" + }, + { + "m_Id": "3450d5f967254840a8747ff68aba37e8" + }, + { + "m_Id": "2750c2dfcaaf45c9ad719bf5a5b9c06e" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 200.0 + }, + "m_Blocks": [ + { + "m_Id": "adefc2faa98f4749a74f7a192cb3eb55" + }, + { + "m_Id": "cfd43f027f6a4a50b1ef1e1fb98fc83b" + }, + { + "m_Id": "f7f66089dba24e4181b44381f4c76396" + }, + { + "m_Id": "f7ff3713d3ad436997d4aa27790e51cf" + }, + { + "m_Id": "887c543834b94c7495ea1a1720f021ba" + }, + { + "m_Id": "518b0d0405da427793893931b99d63f1" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "f7cb9f25bf0549daa48595cc55e56085" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "040dc24945d5414c871662dbed721439", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "0af551b271d14e1b913ee41bb89b421a", + "m_Id": 0, + "m_DisplayName": "Normal (Tangent Space)", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "NormalTS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "0f3797181ff642709003adbe4e4f8783", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "15956b632faa4cecb628d99e3ce8e2f8", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"6a82ae0a176942b488a0e384e89941c8\",\"type\":3}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "220d99be53004e1d9078094df87b9b9e", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2750c2dfcaaf45c9ad719bf5a5b9c06e", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "47d16b8440f3472db00df6ceeb087fe1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "28b53379b96b4982895ec36801f64104", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "2c4e43eb06f74a999272f5a95a626a4e", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3291e870bbe24b209e089387672bf54e", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "3450d5f967254840a8747ff68aba37e8", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "220d99be53004e1d9078094df87b9b9e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "3901ff8cf7a440e8a0e899546012f0c6", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1, + "m_DefaultColor": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "47d16b8440f3472db00df6ceeb087fe1", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "518b0d0405da427793893931b99d63f1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Occlusion", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "54cc0b102ae2461e901dbc38945fad81" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Occlusion" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "54cc0b102ae2461e901dbc38945fad81", + "m_Id": 0, + "m_DisplayName": "Ambient Occlusion", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Occlusion", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TilingAndOffsetNode", + "m_ObjectId": "5bfbb0cafca841b6a4140378c8447df2", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Tiling And Offset", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -971.0, + "y": 60.0000114440918, + "width": 208.0, + "height": 326.0 + } + }, + "m_Slots": [ + { + "m_Id": "f79eb362775c4953811773f8d5855fd3" + }, + { + "m_Id": "8c4fb14bdd4048ddabc704e2765560b3" + }, + { + "m_Id": "d20ef60774a648878263a0561d35bfa3" + }, + { + "m_Id": "28b53379b96b4982895ec36801f64104" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6224e3f171454315b75634062883a0d5", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6578de7035fd4a348096a738540bde53", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "695870864c4b4f509f56bbcd7fe9b84e", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "6e2650c36edc424da28f6575141622ac", + "m_Guid": { + "m_GuidSerialized": "54975ee7-dba2-4745-a74d-918cd8d30d58" + }, + "m_Name": "Tilled", + "m_DefaultReferenceName": "Vector1_6e2650c36edc424da28f6575141622ac", + "m_OverrideReferenceName": "_Tilled", + "m_GeneratePropertyBlock": true, + "m_Precision": 0, + "overrideHLSLDeclaration": true, + "hlslDeclarationOverride": 3, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "70e171e1445e4b118ca549b2c3712b82", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "78501effafd447679426a88831060f16", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "86903a4fc0e74f4391b1343a4d04fecf", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "887c543834b94c7495ea1a1720f021ba", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "3901ff8cf7a440e8a0e899546012f0c6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "897e050e87a441139b1706a2679257c8", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -740.0, + "y": 419.0, + "width": 208.0, + "height": 436.9999694824219 + } + }, + "m_Slots": [ + { + "m_Id": "040dc24945d5414c871662dbed721439" + }, + { + "m_Id": "695870864c4b4f509f56bbcd7fe9b84e" + }, + { + "m_Id": "6224e3f171454315b75634062883a0d5" + }, + { + "m_Id": "6578de7035fd4a348096a738540bde53" + }, + { + "m_Id": "adf854692a964ac5b0228ff8a50f71db" + }, + { + "m_Id": "15956b632faa4cecb628d99e3ce8e2f8" + }, + { + "m_Id": "a47f83eeb0514eca8dac5147a19b8653" + }, + { + "m_Id": "eb5d274a126148859ad555dfc1fef836" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "8c4fb14bdd4048ddabc704e2765560b3", + "m_Id": 1, + "m_DisplayName": "Tiling", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tiling", + "m_StageCapability": 3, + "m_Value": { + "x": 0.5, + "y": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "8e1ae387dea64fc1b38189b0966fb622", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "8e2b6efe8c9f4af5a0db7fd4ca8a7233", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Metallic", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "92a2fe5592e8429596d194888dcc2816", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "995e85985cd34614acd15db492fa186a", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"01b54c5b50ac59d4c9c4a3624b3fb606\",\"type\":3}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a384ba68084343b6a477e5ca9f85c29a", + "m_Id": 0, + "m_DisplayName": "Tilled", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "a47f83eeb0514eca8dac5147a19b8653", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "adefc2faa98f4749a74f7a192cb3eb55", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "86903a4fc0e74f4391b1343a4d04fecf" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "adf854692a964ac5b0228ff8a50f71db", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "b59cd680ea52481b915fbe339b99aa96", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.LerpNode", + "m_ObjectId": "c9c7f11f17c3419a8f38d671ab6851c4", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Lerp", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -339.0000305175781, + "y": 199.99996948242188, + "width": 208.0, + "height": 326.0 + } + }, + "m_Slots": [ + { + "m_Id": "ccc8d6a2f4dc4f8f80f57be82b422e00" + }, + { + "m_Id": "d108bdc216954229bc778887dc1509bc" + }, + { + "m_Id": "ce4e2d550c2f4540abe544a5f443c7dc" + }, + { + "m_Id": "8e1ae387dea64fc1b38189b0966fb622" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "cb221a6f1fde46b8b89c0e87ade70da5", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "b59cd680ea52481b915fbe339b99aa96" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "ccc8d6a2f4dc4f8f80f57be82b422e00", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "ce4e2d550c2f4540abe544a5f443c7dc", + "m_Id": 2, + "m_DisplayName": "T", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "T", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "cfd43f027f6a4a50b1ef1e1fb98fc83b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.NormalTS", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "0af551b271d14e1b913ee41bb89b421a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.NormalTS" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "d108bdc216954229bc778887dc1509bc", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "d20ef60774a648878263a0561d35bfa3", + "m_Id": 2, + "m_DisplayName": "Offset", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Offset", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "dc13c8f7eff64f83900272671e5be94b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -740.0, + "y": -17.99998664855957, + "width": 208.0, + "height": 436.9999694824219 + } + }, + "m_Slots": [ + { + "m_Id": "f34a70f08fe0481e8820e0d12f316929" + }, + { + "m_Id": "70e171e1445e4b118ca549b2c3712b82" + }, + { + "m_Id": "3291e870bbe24b209e089387672bf54e" + }, + { + "m_Id": "92a2fe5592e8429596d194888dcc2816" + }, + { + "m_Id": "2c4e43eb06f74a999272f5a95a626a4e" + }, + { + "m_Id": "995e85985cd34614acd15db492fa186a" + }, + { + "m_Id": "78501effafd447679426a88831060f16" + }, + { + "m_Id": "0f3797181ff642709003adbe4e4f8783" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e57a21d51417426dac3cad4d94c442f6", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Smoothness", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "eb5d274a126148859ad555dfc1fef836", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "f34a70f08fe0481e8820e0d12f316929", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "f79eb362775c4953811773f8d5855fd3", + "m_Id": 0, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", + "m_ObjectId": "f7be1d8ef8d745249d4775babea01fc9", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 0, + "m_ClearCoat": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "f7cb9f25bf0549daa48595cc55e56085", + "m_ActiveSubTarget": { + "m_Id": "f7be1d8ef8d745249d4775babea01fc9" + }, + "m_SurfaceType": 0, + "m_AlphaMode": 0, + "m_TwoSided": false, + "m_AlphaClip": false, + "m_CustomEditorGUI": "" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f7f66089dba24e4181b44381f4c76396", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Metallic", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "8e2b6efe8c9f4af5a0db7fd4ca8a7233" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Metallic" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f7ff3713d3ad436997d4aa27790e51cf", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Smoothness", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "e57a21d51417426dac3cad4d94c442f6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Smoothness" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "fbf587eb90504e71993e602fe3434e9a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -496.0000305175781, + "y": 293.0000305175781, + "width": 104.99999237060547, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "a384ba68084343b6a477e5ca9f85c29a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "6e2650c36edc424da28f6575141622ac" + } +} + diff --git a/Ported/DOTS-AutoFarmers/Assets/Shaders/Ground.shadergraph.meta b/Ported/DOTS-AutoFarmers/Assets/Shaders/Ground.shadergraph.meta new file mode 100644 index 0000000000..82a596b031 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Shaders/Ground.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 29f65aa3b3be73c429f85720e7d4fd91 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/Ported/DOTS-AutoFarmers/Assets/Shaders/Plant.shadergraph b/Ported/DOTS-AutoFarmers/Assets/Shaders/Plant.shadergraph new file mode 100644 index 0000000000..916a1e8c57 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Shaders/Plant.shadergraph @@ -0,0 +1,685 @@ +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "7c20e3a18cf349a598d257e777865520", + "m_Properties": [], + "m_Keywords": [], + "m_Nodes": [ + { + "m_Id": "29ee7d206d564f11a314f274d7cc954e" + }, + { + "m_Id": "1b748506c4ba4355a780d5cbe7c87a66" + }, + { + "m_Id": "8f714fce05104d0bad5dc7df303b83c0" + }, + { + "m_Id": "17ee90fdbdd74c62870f22e9a0dde484" + }, + { + "m_Id": "f15f131b2aea4190bd0fbf07dc454c1c" + }, + { + "m_Id": "295de1f968bd4383869d4a5971283434" + }, + { + "m_Id": "9ad2bfee641a4984bba1e197413dcdd5" + }, + { + "m_Id": "4c2c3b795ddf4b84b0c541fed249e5fb" + }, + { + "m_Id": "840c0c6cdebb49e0b3c8e06040c93f31" + }, + { + "m_Id": "96cd83c681ac4744a9a46e4c46c2ffd9" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "96cd83c681ac4744a9a46e4c46c2ffd9" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "17ee90fdbdd74c62870f22e9a0dde484" + }, + "m_SlotId": 0 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "29ee7d206d564f11a314f274d7cc954e" + }, + { + "m_Id": "1b748506c4ba4355a780d5cbe7c87a66" + }, + { + "m_Id": "8f714fce05104d0bad5dc7df303b83c0" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 200.0 + }, + "m_Blocks": [ + { + "m_Id": "17ee90fdbdd74c62870f22e9a0dde484" + }, + { + "m_Id": "f15f131b2aea4190bd0fbf07dc454c1c" + }, + { + "m_Id": "295de1f968bd4383869d4a5971283434" + }, + { + "m_Id": "9ad2bfee641a4984bba1e197413dcdd5" + }, + { + "m_Id": "4c2c3b795ddf4b84b0c541fed249e5fb" + }, + { + "m_Id": "840c0c6cdebb49e0b3c8e06040c93f31" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graphs", + "m_ConcretePrecision": 0, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "edd082053a4d46e2a96058f9833bb2e0" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", + "m_ObjectId": "116332983bfe41e1b90963da6b538839", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 0, + "m_ClearCoat": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "132182c7549a4fc68d871156fe0667e6", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Smoothness", + "m_StageCapability": 2, + "m_Value": 0.15199999511241914, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "17ee90fdbdd74c62870f22e9a0dde484", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "43a2173de685446cb39271b4d8322de9" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "1b748506c4ba4355a780d5cbe7c87a66", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "dd0b73dc800e45f48d5404e323875f21" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "295de1f968bd4383869d4a5971283434", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Metallic", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "61cc2268a1c4466383c0425641b1b508" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Metallic" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "29ee7d206d564f11a314f274d7cc954e", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "40d5ac68c44a4401b090b0bc33811c89" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "40d5ac68c44a4401b090b0bc33811c89", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "43a2173de685446cb39271b4d8322de9", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "4c2c3b795ddf4b84b0c541fed249e5fb", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "d7d819b432934fbba12304f511fe9d54" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "61cc2268a1c4466383c0425641b1b508", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Metallic", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "65a46ce5477f487eaf7be472515434fe", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "80b2b0aa2bcd43489c8824a38df50ec3", + "m_Id": 0, + "m_DisplayName": "Normal (Tangent Space)", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "NormalTS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "840c0c6cdebb49e0b3c8e06040c93f31", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Occlusion", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "d04ee523c3734c069df12a1278af344b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Occlusion" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "8f714fce05104d0bad5dc7df303b83c0", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "65a46ce5477f487eaf7be472515434fe" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.VertexColorNode", + "m_ObjectId": "96cd83c681ac4744a9a46e4c46c2ffd9", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Vertex Color", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -286.0, + "y": 144.0, + "width": 208.0, + "height": 278.0 + } + }, + "m_Slots": [ + { + "m_Id": "dca266b9a69848729fe0d43eb6b02c9e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "9ad2bfee641a4984bba1e197413dcdd5", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Smoothness", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "132182c7549a4fc68d871156fe0667e6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Smoothness" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d04ee523c3734c069df12a1278af344b", + "m_Id": 0, + "m_DisplayName": "Ambient Occlusion", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Occlusion", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "d7d819b432934fbba12304f511fe9d54", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1, + "m_DefaultColor": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "dca266b9a69848729fe0d43eb6b02c9e", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "dd0b73dc800e45f48d5404e323875f21", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "edd082053a4d46e2a96058f9833bb2e0", + "m_ActiveSubTarget": { + "m_Id": "116332983bfe41e1b90963da6b538839" + }, + "m_SurfaceType": 0, + "m_AlphaMode": 0, + "m_TwoSided": false, + "m_AlphaClip": false, + "m_CustomEditorGUI": "" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f15f131b2aea4190bd0fbf07dc454c1c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.NormalTS", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "80b2b0aa2bcd43489c8824a38df50ec3" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.NormalTS" +} + diff --git a/Ported/DOTS-AutoFarmers/Assets/Shaders/Plant.shadergraph.meta b/Ported/DOTS-AutoFarmers/Assets/Shaders/Plant.shadergraph.meta new file mode 100644 index 0000000000..526876e330 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Shaders/Plant.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: aee6b4172c462fa46b91f32e7fde0d2c +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/Ported/DOTS-AutoFarmers/Assets/Textures.meta b/Ported/DOTS-AutoFarmers/Assets/Textures.meta new file mode 100644 index 0000000000..38f19f1dee --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Textures.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1c5bac52515a7c346bfe698ee122375d +folderAsset: yes +timeCreated: 1530821432 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Textures/ground default.png b/Ported/DOTS-AutoFarmers/Assets/Textures/ground default.png new file mode 100644 index 0000000000000000000000000000000000000000..0e328c22c2d161574421b30f37e14f093d3b208a GIT binary patch literal 15450 zcmeI3O^n+_7=~R6DqU0+wS`uQgJn1riNtnx<4sKBl1;MRAiOM_t(qc0xb|#fn%J&A z+hlt{zy-kp+8e4kpmO0Sk-NfI# zGw*nw&okr8yuPx0^1#dkGaSbqXe`xM$?v`4|J`?x?@O0E3i;U+te#xpu6^_1ZzS07 zEu9HC?w-Tp{~qqjJI6@jKHSjj`+nYc*O5cYr(gc?2Pry&>n*%!cM-pA^bmK-!8Yz9 zD9?$ z@~w4swYC^{N20RO!PrwpvET1!`?FcsZ;NuVSPX4)xeTe12{s*U3^Gpe(9mS$Q$vC2 z+a9)EhYx*?v+f2i3qsh@_!Ez-=Z!mZf|wnlC=Luyl(UjJb|wu=go#@9k%3)*&2_ul zaO5i;7rQ~n_4sO2;g6rT9n0+pkCa4MJ?TGjLNx;;jqoXCr1^}LUz78yTu}3~&5=J=9eSslZtvgkAcrN#L^3<9g!)YT+6Gsp1s9ysz9KFd_sUB72w&F&d(BzjJ}BqoLNNO$f2 zywRRIzRih6eJoG!(PK%ix?R`TT?=WmC2_0bBt4}>Zd9u)zPnCdwzTk7jc?Seid$-vW}C?8PWPlZgi?FHP}dNh3j#5BdR~2lgLMu z!|%9hT82%}(3_@Z*feQ*%CWJQi+cmbyA2c#>}`OC$~4fhbolr*$;&g+2v1m)8dxN) z*aOsU)oe0-f^Z9ymADNQwrqH2yM`%&3S~I)$O|-icNfPm?^8R&c;np7i)2K*=?c79 zCjbaNWVq;jfXZ+IAoP&oqVoYN!v%oQLxzja2dE4e074HLE;=8eGF$)%J!H7(e1OVu z0U-2{;iB^aD#HbU&_jlc&IhOr7XU&J87?{>pfX$l2t8!D=zM_6Z~-9nkl~{90V=}< zfY3vRi_QnA3>N@G4;d~xAD}W^00=!~xafR<%5VW7^pN4A^8qTu1%S{)hKtSzs0t)S)f*h1R7M`(f#%HuRaI$mmt2f)E&cU$GY2U`k=b9TH^2veUFK&JC6OkH? zT4n9{w`S@3)z@A*^4YD&g_mEvzWKZI@$uYI{f*1dFJE2Sd*!|F@BC=+%yasE&ArcF z+W*$oJ%7!;bmQiadk>v|+o|4f+&uhCtIqxU{=-jy_x0>iV#+n@%e89@FTDCUO3l6L literal 0 HcmV?d00001 diff --git a/Ported/DOTS-AutoFarmers/Assets/Textures/ground default.png.meta b/Ported/DOTS-AutoFarmers/Assets/Textures/ground default.png.meta new file mode 100644 index 0000000000..0adeb75670 --- /dev/null +++ b/Ported/DOTS-AutoFarmers/Assets/Textures/ground default.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 01b54c5b50ac59d4c9c4a3624b3fb606 +timeCreated: 1530821954 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Ported/DOTS-AutoFarmers/Assets/Textures/ground tilled.png b/Ported/DOTS-AutoFarmers/Assets/Textures/ground tilled.png new file mode 100644 index 0000000000000000000000000000000000000000..47aa4990fa3fb04d0a751267feefb60f75ceeb76 GIT binary patch literal 15419 zcmeI3&2QsG7{ARN zo3s}sIIVi&Z&U z7h8@kQeSOfGTH$fGDx$O-5{MJX@PeuiSSTI_Q4deU)a^l|-w zR5-e0jxD6We&`};75UD-XQ284vT=OdM8$2jw5IK2-8N9ORwm`kSeB_(3TjWh`2M&qgDbct4TjQt)NGO{(PZT@VwiPQ<(H$00hYQ3B2 zL$CUu*dJptG0c+XlUx39Sl4h31=U?c?~Jz&%igtuYP-7UBTBxM8lq3GsL+Y#1QpbD zgD%>#LDv{Ei_%zYd|5EfI;Lo+(ha>6sVDpQJIH3O(a49j~Y3venbuNOJ9VQHmR*nNIEc+~G5I zbeUtD`beI9Mvo+|>U15i<(Q~ESCo!xj>}Vw7KswxFlO=mMo z(k9Vw+LOoDZv6T)HgBp-PMNl9WFIG$(}Vq!TAo8muFNaJYiE}Vu7?`4N!Np zW|8IN(?^)1MmbP8HgW5u#Du_v5-vRQ0!`lCrP0g##FJt4;GE`{ct+E71zvm*0E8WK zTx>o-<+uP4cF1wD`2dyU0zlXy$HnFYRE`S(VTT+Sn-5SqE&zlba$IaaK;^gq5O&CM zvH1X%;{rg~A;-n$15}O+0AYt57n=`IIW7Q%9dcZ3K0xKT01$S_ak2RTmE!_H*dfQo z<^xoY3jkq<92c7pP&qCDgdK8RY(7BcxBw7#$Z@gx0F~ncK-eM2#pVN4jtc-`ha4B1 z4^TNS0E8WKTx>o-<+uP4cF1wD`2dyU0zlXy$HnFYRE`S(VTVjyv+;3QWRo+neRA0K z-R8sB$U)hw^o;FVbVf@6Cp+hV_^?g-T%vt8JPRXFSlf4zM-Kdc|J~<56X~U9t+IaY zf$`Q)Z+`pg?Do#~_8))!{_w{aKDuSf%I))w+y`&p{p7L6>c