diff --git a/.gitignore b/.gitignore index bfc815ba0ba378f8266958d2f764c0584d3d7893..397bceb62f412d0881ae6ce6615abcece8684cfc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyc .idea ./logs +*.blob *~ .vscode __pycache__ @@ -45,6 +46,8 @@ ExportedObj/ *.pidb.meta *.pdb.meta +*.blob + # Unity3D Generated File On Crash Reports sysinfo.txt diff --git a/Assets/Materials/RaceSurfaceMaterial.mat b/Assets/Materials/RaceSurfaceMaterial.mat new file mode 100644 index 0000000000000000000000000000000000000000..eac2d4fa7de7ed950bd40a5cafa84ee692f9d311 --- /dev/null +++ b/Assets/Materials/RaceSurfaceMaterial.mat @@ -0,0 +1,84 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: RaceSurfaceMaterial + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + 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} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 0 + - _Glossiness: 0.21 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 1 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.07097722, g: 0.2735849, b: 0.17501524, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/RaceSurfaceMaterial.mat.meta b/Assets/Materials/RaceSurfaceMaterial.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..d1a6acb7b143a5411233c55d69b3904e41b1a79c --- /dev/null +++ b/Assets/Materials/RaceSurfaceMaterial.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 99ae50724ae3b1c46909bb82d9a82440 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Meyoux/test.json b/Assets/Meyoux/test.json index 0c4d4a175c2a4a532d2dc558feb16709269d6da1..bed8efb61a2df00ba1af16526da289e3b5a56d5d 100644 --- a/Assets/Meyoux/test.json +++ b/Assets/Meyoux/test.json @@ -1 +1,67 @@ -{"Generation":0,"NbPositions":2,"MovementSpeed":0.6,"Head":{"Connections":{"PosY":{"Positions":[{"x":0.0,"y":0.0},{"x":45.0,"y":45.0}],"Part":{"Connections":{"PosX":{"Positions":[{"x":0.0,"y":0.0},{"x":45.0,"y":45.0}],"Part":{"Connections":{},"ScaleX":0.1,"ScaleY":3.0,"ScaleZ":0.1}},"NegX":{"Positions":[{"x":0.0,"y":0.0},{"x":45.0,"y":-45.0}],"Part":{"Connections":{},"ScaleX":0.1,"ScaleY":3.0,"ScaleZ":0.1}}},"ScaleX":2.0,"ScaleY":2.0,"ScaleZ":2.0}}},"ScaleX":1.0,"ScaleY":1.0,"ScaleZ":1.0}} \ No newline at end of file +{ + "Generation":0, + "NbPositions":2, + "MovementSpeed":0.6, + "Head":{ + "Connections":{ + "PosY":{ + "Positions":[ + { + "x":0.0, + "y":0.0 + }, + { + "x":45.0, + "y":45.0 + } + ], + "Part":{ + "Connections":{ + "PosX":{ + "Positions":[ + { + "x":0.0, + "y":0.0 + }, + { + "x":45.0, + "y":45.0 + } + ], + "Part":{ + "Connections":{}, + "ScaleX":0.1, + "ScaleY":3.0, + "ScaleZ":0.1 + } + }, + "NegX": { + "Positions":[ + { + "x":0.0, + "y":0.0 + }, + { + "x":45.0, + "y":-45.0 + } + ], + "Part":{ + "Connections":{}, + "ScaleX":0.1, + "ScaleY":3.0, + "ScaleZ":0.1 + } + } + }, + "ScaleX":2.0, + "ScaleY":2.0, + "ScaleZ":2.0 + } + } + }, + "ScaleX":1.0, + "ScaleY":1.0, + "ScaleZ":1.0 + } +} \ No newline at end of file diff --git a/Assets/Prefabs/BodyPart.prefab b/Assets/Prefabs/BodyPart.prefab index 9fc8c39f9dc9f4915236f6f39062411c9d61a127..c333ce2cf7c736d03b3a0701d4c5453d1cfd95e9 100644 --- a/Assets/Prefabs/BodyPart.prefab +++ b/Assets/Prefabs/BodyPart.prefab @@ -19,7 +19,7 @@ GameObject: - component: {fileID: 8770743401227022544} - component: {fileID: 8816051955608547315} - component: {fileID: 8127365661032092307} - m_Layer: 0 + m_Layer: 6 m_Name: BodyPart m_TagString: Untagged m_Icon: {fileID: 0} @@ -661,13 +661,3 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 36d34e9275b40784eb36066f28d8863a, type: 3} m_Name: m_EditorClassIdentifier: - connectedBodyPosX: {fileID: 0} - connectedBodyNegX: {fileID: 0} - connectedBodyPosY: {fileID: 0} - connectedBodyPosZ: {fileID: 0} - connectedBodyNegZ: {fileID: 0} - targetPosX: {x: 0, y: 0} - targetNegX: {x: 0, y: 0} - targetPosY: {x: 0, y: 0} - targetPosZ: {x: 0, y: 0} - targetNegZ: {x: 0, y: 0} diff --git a/Assets/Prefabs/Head.prefab b/Assets/Prefabs/Head.prefab index 9c0ae29576e35041be00982949d9810a400de6e8..50d48edc941e8ca395fbab30d0230114efefe918 100644 --- a/Assets/Prefabs/Head.prefab +++ b/Assets/Prefabs/Head.prefab @@ -20,7 +20,7 @@ GameObject: - component: {fileID: 1370799979363973390} - component: {fileID: 466911647834662531} - component: {fileID: 2730908014173304539} - m_Layer: 0 + m_Layer: 6 m_Name: Head m_TagString: Untagged m_Icon: {fileID: 0} @@ -764,15 +764,3 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1b20a572c1824ff8bc4e8603e8773024, type: 3} m_Name: m_EditorClassIdentifier: - connectedBodyPosX: {fileID: 0} - connectedBodyNegX: {fileID: 0} - connectedBodyPosY: {fileID: 0} - connectedBodyPosZ: {fileID: 0} - connectedBodyNegZ: {fileID: 0} - targetPosX: {x: 0, y: 0} - targetNegX: {x: 0, y: 0} - targetPosY: {x: 0, y: 0} - targetPosZ: {x: 0, y: 0} - targetNegZ: {x: 0, y: 0} - connectedBodyNegY: {fileID: 0} - targetNegY: {x: 0, y: 0} diff --git a/Assets/Prefabs/Meyou.prefab b/Assets/Prefabs/Meyou.prefab index a2a1b7a01e0884d115ed5d0aa1a9ee8a01e8ee32..dcfbcb4096571021cc6c729953cdcbf23f44bb1c 100644 --- a/Assets/Prefabs/Meyou.prefab +++ b/Assets/Prefabs/Meyou.prefab @@ -45,8 +45,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61b361fb7aa08184ab9e809e40a6e089, type: 3} m_Name: m_EditorClassIdentifier: - debugGene: - headPrefab: {fileID: 7369481859393781481, guid: 803d25085ef48494083a8ceafeda3aa2, type: 3} + headPrefab: {fileID: 2730908014173304539, guid: 803d25085ef48494083a8ceafeda3aa2, type: 3} bodyPartPrefab: {fileID: 8127365661032092307, guid: e104a0ded10ea854b832e76c38878a6e, type: 3} --- !u!1 &5674907606952855594 GameObject: diff --git a/Assets/Prefabs/Trials.meta b/Assets/Prefabs/Trials.meta new file mode 100644 index 0000000000000000000000000000000000000000..841117fd35ebf0164135c391a86d6cd9b202698e --- /dev/null +++ b/Assets/Prefabs/Trials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d21d045b73b6d494b914773eb3bd58ce +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Trials/MeyouSpawner.prefab b/Assets/Prefabs/Trials/MeyouSpawner.prefab new file mode 100644 index 0000000000000000000000000000000000000000..53ab7666f8fcfe3a0e1d0ab43e4432e12ceab208 --- /dev/null +++ b/Assets/Prefabs/Trials/MeyouSpawner.prefab @@ -0,0 +1,46 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1759210425026442780 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1119984720830485686} + - component: {fileID: 1201210948483722431} + m_Layer: 0 + m_Name: MeyouSpawner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1119984720830485686 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1759210425026442780} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1201210948483722431 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1759210425026442780} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 27e39136fd18b1c4980695845752ba21, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Prefabs/Trials/MeyouSpawner.prefab.meta b/Assets/Prefabs/Trials/MeyouSpawner.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..3e9f6f77dfd460f7555a8e75d0662342add235f3 --- /dev/null +++ b/Assets/Prefabs/Trials/MeyouSpawner.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f3a901f06ce4e504da9c1272fcbd5d90 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Trials/RangeTrial.meta b/Assets/Prefabs/Trials/RangeTrial.meta new file mode 100644 index 0000000000000000000000000000000000000000..69c3dba2fa3407036dbf547b7f127f37660f9393 --- /dev/null +++ b/Assets/Prefabs/Trials/RangeTrial.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2a5cc2063d067e2488ae90ad24f48f34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Trials/RangeTrial/RangeTrialEvaluator.prefab b/Assets/Prefabs/Trials/RangeTrial/RangeTrialEvaluator.prefab new file mode 100644 index 0000000000000000000000000000000000000000..495aba7a10c312f6b3866e1be72c9b795e263eaf --- /dev/null +++ b/Assets/Prefabs/Trials/RangeTrial/RangeTrialEvaluator.prefab @@ -0,0 +1,46 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3591250020953139189 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 197942380306783007} + - component: {fileID: 2378676397367262812} + m_Layer: 0 + m_Name: RangeTrialEvaluator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &197942380306783007 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3591250020953139189} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2378676397367262812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3591250020953139189} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0361eb9a6b502854881f0c9ff329ab09, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Prefabs/Trials/RangeTrial/RangeTrialEvaluator.prefab.meta b/Assets/Prefabs/Trials/RangeTrial/RangeTrialEvaluator.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..c295abb7eedf55b05f3b14355e9237f5262eb9bd --- /dev/null +++ b/Assets/Prefabs/Trials/RangeTrial/RangeTrialEvaluator.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 45d093060f1209645afa35de3e803176 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Trials/TrialManager.prefab b/Assets/Prefabs/Trials/TrialManager.prefab new file mode 100644 index 0000000000000000000000000000000000000000..6397025f8b9783f619edb6b63f6027d9c0192b5d --- /dev/null +++ b/Assets/Prefabs/Trials/TrialManager.prefab @@ -0,0 +1,46 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7066414950259246497 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2572081669525993303} + - component: {fileID: 7272017846077766839} + m_Layer: 0 + m_Name: TrialManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2572081669525993303 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7066414950259246497} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &7272017846077766839 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7066414950259246497} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aabac0300ef772447b1ce154fe87b071, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Prefabs/Trials/TrialManager.prefab.meta b/Assets/Prefabs/Trials/TrialManager.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..ef1c2d04e88ef12caa8e1854c15194afb8059938 --- /dev/null +++ b/Assets/Prefabs/Trials/TrialManager.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 81c0a518db429c340a5d803beb8a9d04 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/CreatureTest.unity b/Assets/Scenes/CreatureSpawn.unity similarity index 85% rename from Assets/Scenes/CreatureTest.unity rename to Assets/Scenes/CreatureSpawn.unity index 05a5edb8ab87d72800fb82496d86cd34d0547990..0dc9bac2cfced3b53f3c16be2b88f90cc53c2c45 100644 --- a/Assets/Scenes/CreatureTest.unity +++ b/Assets/Scenes/CreatureSpawn.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44658792, g: 0.49642283, b: 0.5748252, a: 1} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -185,7 +185,7 @@ Camera: near clip plane: 0.3 far clip plane: 1000 field of view: 60 - orthographic: 1 + orthographic: 0 orthographic size: 10 m_Depth: -1 m_CullingMask: @@ -210,8 +210,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 159033309} serializedVersion: 2 - m_LocalRotation: {x: 0.057022933, y: 0.25845313, z: -0.01528467, w: 0.9642182} - m_LocalPosition: {x: -6.7, y: 10.7, z: -11.6} + m_LocalRotation: {x: 0.13738643, y: 0.25619656, z: -0.036813945, w: 0.9561031} + m_LocalPosition: {x: -10.82, y: 15.88, z: -18.74} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -357,6 +357,17 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1097966364 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3160958630494815367, guid: acf7640b9d258e24ab008e6d1d4103a0, type: 3} + m_PrefabInstance: {fileID: 1957736985} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 61b361fb7aa08184ab9e809e40a6e089, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1126918041 GameObject: m_ObjectHideFlags: 0 @@ -451,6 +462,52 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &1267023174 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1267023176} + - component: {fileID: 1267023175} + m_Layer: 0 + m_Name: CreatureSpawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1267023175 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1267023174} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a40fa1cd98d16541b50e1f3a54711e2, type: 3} + m_Name: + m_EditorClassIdentifier: + meyou: {fileID: 1097966364} + gene: '{"Generation":233,"NbPositions":3,"MovementSpeed":0.5629647,"Head":{"connections":{"PosY":{"Positions":[{"x":29.1372623,"y":-8.383267},{"x":9.055241,"y":-2.57650638},{"x":-20.3587151,"y":-0.88302207}],"Part":{"connections":{"PosX":{"Positions":[{"x":-4.764468,"y":-27.5853348},{"x":4.04803658,"y":4.954637},{"x":13.8988619,"y":-14.6820564}],"Part":{"connections":{},"ScaleX":0.1,"ScaleY":3.0,"ScaleZ":0.1}},"NegX":{"Positions":[{"x":3.29999924,"y":25.8870277},{"x":4.65393925,"y":-21.6986122},{"x":13.1184206,"y":4.71579838}],"Part":{"connections":{},"ScaleX":0.1,"ScaleY":3.0,"ScaleZ":0.1}}},"ScaleX":2.0,"ScaleY":2.0,"ScaleZ":2.0}}},"ScaleX":1.0,"ScaleY":1.0,"ScaleZ":1.0}}' +--- !u!4 &1267023176 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1267023174} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -5.6854734, y: 7.1861143, z: -8.986925} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1449588815 stripped GameObject: m_CorrespondingSourceObject: {fileID: 5674907606952855594, guid: acf7640b9d258e24ab008e6d1d4103a0, type: 3} @@ -482,7 +539,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6866019591001608757, guid: acf7640b9d258e24ab008e6d1d4103a0, type: 3} propertyPath: m_LocalPosition.y - value: 9.11 + value: 9.53 objectReference: {fileID: 0} - target: {fileID: 6866019591001608757, guid: acf7640b9d258e24ab008e6d1d4103a0, type: 3} propertyPath: m_LocalPosition.z @@ -530,6 +587,7 @@ Transform: SceneRoots: m_ObjectHideFlags: 0 m_Roots: + - {fileID: 1267023176} - {fileID: 159033312} - {fileID: 1126918043} - {fileID: 485262568} diff --git a/Assets/Scenes/CreatureTest.unity.meta b/Assets/Scenes/CreatureSpawn.unity.meta similarity index 100% rename from Assets/Scenes/CreatureTest.unity.meta rename to Assets/Scenes/CreatureSpawn.unity.meta diff --git a/Assets/Scenes/RangeTrial.unity b/Assets/Scenes/RangeTrial.unity new file mode 100644 index 0000000000000000000000000000000000000000..6c004b11a87f2f3e3b5cc66fe2be98d6a12a7310 --- /dev/null +++ b/Assets/Scenes/RangeTrial.unity @@ -0,0 +1,860 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &789751483 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1051977690} + m_Modifications: + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3591250020953139189, guid: 45d093060f1209645afa35de3e803176, type: 3} + propertyPath: m_Name + value: RangeTrialEvaluator + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 45d093060f1209645afa35de3e803176, type: 3} +--- !u!114 &789751484 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2378676397367262812, guid: 45d093060f1209645afa35de3e803176, type: 3} + m_PrefabInstance: {fileID: 789751483} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0361eb9a6b502854881f0c9ff329ab09, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &789751485 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} + m_PrefabInstance: {fileID: 789751483} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1051977688 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1051977690} + - component: {fileID: 1051977689} + m_Layer: 0 + m_Name: Manager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1051977689 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1051977688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aabac0300ef772447b1ce154fe87b071, type: 3} + m_Name: + m_EditorClassIdentifier: + snapshotPath: + snapshotRate: 1 + startupDelay: 500 + animationStartDelay: 3000 + generationDuration: 10 + generationSize: 100 + bulkSize: 100 + spawner: {fileID: 1094373159} + evaluator: {fileID: 789751484} + baseGene: {fileID: 1080464700} + evolver: {fileID: 1650731194} +--- !u!4 &1051977690 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1051977688} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1080464699} + - {fileID: 1650731193} + - {fileID: 789751485} + - {fileID: 1220571982} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1080464698 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1080464699} + - component: {fileID: 1080464700} + m_Layer: 0 + m_Name: BaseGenerator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1080464699 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1080464698} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1051977690} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1080464700 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1080464698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9e959adf511a44ff8f898510a1a76072, type: 3} + m_Name: + m_EditorClassIdentifier: + gene: '{"Generation":233,"NbPositions":3,"MovementSpeed":0.5629647,"Head":{"connections":{"PosY":{"Positions":[{"x":29.1372623,"y":-8.383267},{"x":9.055241,"y":-2.57650638},{"x":-20.3587151,"y":-0.88302207}],"Part":{"connections":{"PosX":{"Positions":[{"x":-4.764468,"y":-27.5853348},{"x":4.04803658,"y":4.954637},{"x":13.8988619,"y":-14.6820564}],"Part":{"connections":{},"ScaleX":0.1,"ScaleY":3.0,"ScaleZ":0.1}},"NegX":{"Positions":[{"x":3.29999924,"y":25.8870277},{"x":4.65393925,"y":-21.6986122},{"x":13.1184206,"y":4.71579838}],"Part":{"connections":{},"ScaleX":0.1,"ScaleY":3.0,"ScaleZ":0.1}}},"ScaleX":2.0,"ScaleY":2.0,"ScaleZ":2.0}}},"ScaleX":1.0,"ScaleY":1.0,"ScaleZ":1.0}}' +--- !u!114 &1094373159 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1201210948483722431, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + m_PrefabInstance: {fileID: 1832238219} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 27e39136fd18b1c4980695845752ba21, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1210065933 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1210065936} + - component: {fileID: 1210065935} + - component: {fileID: 1210065934} + - component: {fileID: 1210065937} + - component: {fileID: 1210065938} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1210065934 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210065933} + m_Enabled: 1 +--- !u!20 &1210065935 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210065933} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 12.1 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1210065936 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210065933} + serializedVersion: 2 + m_LocalRotation: {x: 0.20621501, y: -0.42173436, z: 0.099122696, w: 0.87737685} + m_LocalPosition: {x: 19, y: 30, z: -15} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 26.453, y: -51.345, z: 0} +--- !u!114 &1210065937 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210065933} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c201c02a3b4cc05558c878762b55f0d5, type: 3} + m_Name: + m_EditorClassIdentifier: + objectOfInterest: {fileID: 0} + objectGenerator: {fileID: 0} +--- !u!114 &1210065938 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1210065933} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e318b1f3e2f373d4cb999fc629d0e2d7, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1220571982 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + m_PrefabInstance: {fileID: 1832238219} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1650731191 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1650731193} + - component: {fileID: 1650731194} + m_Layer: 0 + m_Name: Evolver + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1650731193 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650731191} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1051977690} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1650731194 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650731191} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f754e9b109a1d927fa0fd4f60fdfbf91, type: 3} + m_Name: + m_EditorClassIdentifier: + mutationRate: 0.2 + movementMutationAmplitude: 10 + speedMutationAmplitude: 0.5 +--- !u!1001 &1832238219 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1051977690} + m_Modifications: + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalPosition.y + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1201210948483722431, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: meyouPrefab + value: + objectReference: {fileID: 3160958630494815367, guid: acf7640b9d258e24ab008e6d1d4103a0, type: 3} + - target: {fileID: 1759210425026442780, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + propertyPath: m_Name + value: MeyouSpawner + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} +--- !u!1 &1854713984 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1854713988} + - component: {fileID: 1854713987} + - component: {fileID: 1854713986} + - component: {fileID: 1854713985} + m_Layer: 0 + m_Name: RaceSurface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1854713985 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1854713984} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1854713986 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1854713984} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 99ae50724ae3b1c46909bb82d9a82440, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1854713987 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1854713984} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1854713988 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1854713984} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 10, z: 480} + m_LocalScale: {x: 20, y: 20, z: 1000} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2069759174 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2069759178} + - component: {fileID: 2069759177} + - component: {fileID: 2069759176} + - component: {fileID: 2069759175} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &2069759175 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2069759174} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &2069759176 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2069759174} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: fad80ef87e6eb0c44b8fb5a497f68960, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2069759177 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2069759174} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2069759178 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2069759174} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.5574375, y: 0, z: -1.6812131} + m_LocalScale: {x: 10000, y: 1, z: 10000} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2116895960 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2116895962} + - component: {fileID: 2116895961} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &2116895961 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2116895960} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &2116895962 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2116895960} + serializedVersion: 2 + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1051977690} + - {fileID: 1210065936} + - {fileID: 2116895962} + - {fileID: 2069759178} + - {fileID: 1854713988} diff --git a/Assets/Scenes/RangeTrial.unity.meta b/Assets/Scenes/RangeTrial.unity.meta new file mode 100644 index 0000000000000000000000000000000000000000..c237018af9ae0d25a1cb6fd6f73fd9d1fa0a1e9b --- /dev/null +++ b/Assets/Scenes/RangeTrial.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1cb65ab4b2891244f8415c1745779c73 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity new file mode 100644 index 0000000000000000000000000000000000000000..64eafa9b17fe6f0726989532846bc7db53205dfc --- /dev/null +++ b/Assets/Scenes/SampleScene.unity @@ -0,0 +1,515 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 705507994} + m_IndirectSpecularColor: {r: 0.4465785, g: 0.49641252, b: 0.574817, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &485790804 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 485790808} + - component: {fileID: 485790807} + - component: {fileID: 485790806} + - component: {fileID: 485790805} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &485790805 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 485790804} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &485790806 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 485790804} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: fad80ef87e6eb0c44b8fb5a497f68960, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &485790807 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 485790804} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &485790808 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 485790804} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.5331261, y: -2.0981038, z: -2.1815264} + m_LocalScale: {x: 10000, y: 1, z: 10000} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &705507993 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 705507995} + - component: {fileID: 705507994} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &705507994 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &705507995 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + serializedVersion: 2 + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &963194225 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 963194228} + - component: {fileID: 963194227} + - component: {fileID: 963194226} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &963194226 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 +--- !u!20 &963194227 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &963194228 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1597469098 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1597469100} + - component: {fileID: 1597469099} + m_Layer: 0 + m_Name: heredity + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1597469099 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1597469098} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b118bf2eb2af7a1849c560165b8a2590, type: 3} + m_Name: + m_EditorClassIdentifier: + cubePrefab: {fileID: 9114924953592692568, guid: 39849178081a34014b880d57eb5c3130, type: 3} +--- !u!4 &1597469100 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1597469098} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.6, z: -5.39} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1693837656 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1693837658} + - component: {fileID: 1693837657} + m_Layer: 0 + m_Name: CubeGenerator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1693837657 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1693837656} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c40135ed9c967fb4696d12128598b2fc, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1693837658 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1693837656} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -29.850582, y: 3.0424016, z: -4.603986} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 963194228} + - {fileID: 705507995} + - {fileID: 1693837658} + - {fileID: 485790808} + - {fileID: 1597469100} diff --git a/Assets/Scenes/SampleScene.unity.meta b/Assets/Scenes/SampleScene.unity.meta new file mode 100644 index 0000000000000000000000000000000000000000..952bd1e9e110583d94b471a30ff4ddd69f4aee7d --- /dev/null +++ b/Assets/Scenes/SampleScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9fc0d4010bbf28b4594072e72b8655ab +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/CreatureSpawn.cs b/Assets/Scripts/CreatureSpawn.cs new file mode 100644 index 0000000000000000000000000000000000000000..1ab8d4afb0456846afca0d85d028049b0743c013 --- /dev/null +++ b/Assets/Scripts/CreatureSpawn.cs @@ -0,0 +1,34 @@ +using System; +using Newtonsoft.Json; +using UnityEngine; + +public class CreatureSpawn : MonoBehaviour +{ + public const int AnimationStartDelay = 3000; + + public Meyou.Meyou meyou; + public string gene; + + private bool _toBeStarted; + private DateTime _startTime; + + // Start is called before the first frame update + void Start() + { + var g = JsonConvert.DeserializeObject<Meyou.Gene>(gene); + meyou.BuildFrom(g); + + _toBeStarted = true; + _startTime = DateTime.Now; + } + + + private void Update() + { + if (_toBeStarted && DateTime.Now - _startTime > TimeSpan.FromMilliseconds(AnimationStartDelay)) + { + meyou.StartAnimation(); + _toBeStarted = false; + } + } +} diff --git a/Assets/Scripts/CreatureSpawn.cs.meta b/Assets/Scripts/CreatureSpawn.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5835cd56e3aedfb91aac200bd0a3bee96e17b585 --- /dev/null +++ b/Assets/Scripts/CreatureSpawn.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8a40fa1cd98d16541b50e1f3a54711e2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Debug.meta b/Assets/Scripts/Debug.meta new file mode 100644 index 0000000000000000000000000000000000000000..fa0610c1dc9363976560b17b26429dfc433d3b70 --- /dev/null +++ b/Assets/Scripts/Debug.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ce604d043824a4a758671aed932f30f5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Debug/debugMutation.cs b/Assets/Scripts/Debug/debugMutation.cs new file mode 100644 index 0000000000000000000000000000000000000000..96ef10f1aaad3dbd851268e612ed7e0ecb2463d4 --- /dev/null +++ b/Assets/Scripts/Debug/debugMutation.cs @@ -0,0 +1,54 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class debugMutation : MonoBehaviour +{ + // Start is called before the first frame update + void Start() + { + // create a default Gene + Meyou.Gene debugGene = Meyou.Gene.DebugGetSample(); + + // display in the console the default Gene + Debug.Log("First gene"); + Debug.Log("Speed: " + debugGene.MovementSpeed); + displayPartGeneVariables(debugGene.Head); + + // create a Mutation class with big varioables to easily see the mutation + Mutation.MovementMutator debugMutation = new Mutation.MovementMutator(1f, 20f, 5f); + + // create a seconde Gene that is the mutation of the default one + Meyou.Gene debugMutatedGene = debugMutation.MutateGene(debugGene); + + // display the mutated Gene + Debug.Log("Second gene"); + Debug.Log("Speed: " + debugMutatedGene.MovementSpeed); + displayPartGeneVariables(debugMutatedGene.Head); + } + + private void displayPartGeneVariables(Meyou.PartGene p_partGene) + { + // Loop in each connection of the PartGene + foreach (System.Collections.Generic.KeyValuePair<Meyou.PartPos, Meyou.PartConnection> connectionDic in p_partGene.connections) + { + // select only the value witch is the "PartConnection" + Meyou.PartConnection connection = connectionDic.Value; + + // Loop in each position of the PartConnection + foreach (Meyou.SerializableVector2 Position in connection.Positions) + { + // display the position + Debug.Log("Position: " + Position.x + ", " + Position.y); + } + // Recursive call to display the next PartGene + displayPartGeneVariables(connection.Part); + } + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/Assets/Scripts/Debug/debugMutation.cs.meta b/Assets/Scripts/Debug/debugMutation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e62ff8162c9b82ff3c8970a55c395028c4453333 --- /dev/null +++ b/Assets/Scripts/Debug/debugMutation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 90faf7fe8929f50b68871e738f5629d7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Meyou/BodyPart.cs b/Assets/Scripts/Meyou/BodyPart.cs index 9bb6bc552d9d6753bede51c8fb608ccae362b6e1..c5b3bf031b66b1db51f3cb69ae7b3b1cb7a06b43 100644 --- a/Assets/Scripts/Meyou/BodyPart.cs +++ b/Assets/Scripts/Meyou/BodyPart.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Unity.VisualScripting; using UnityEngine; namespace Meyou @@ -85,7 +84,7 @@ namespace Meyou return avg; } - + /// Configure la BodyPart. /// Doit être appelée après toutes les connexions effectuées @@ -190,7 +189,7 @@ namespace Meyou child.Value.SetPosition(p); } - + diff --git a/Assets/Scripts/Meyou/Extensions.cs b/Assets/Scripts/Meyou/Extensions.cs index 0191efd753d0c8d037fcdd60631e97568906551d..bc2836229448bdb5f36dd6680b10d9e664110153 100644 --- a/Assets/Scripts/Meyou/Extensions.cs +++ b/Assets/Scripts/Meyou/Extensions.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -16,7 +15,7 @@ namespace Meyou { return coll.Select(vec => (Vector2)vec).ToList(); } - + public static List<SerializableVector2> AsSerializableVector2(this IEnumerable<Vector2> coll) { return coll.Select(vec => (SerializableVector2)vec).ToList(); diff --git a/Assets/Scripts/Meyou/Gene.cs b/Assets/Scripts/Meyou/Gene.cs index d571e8dc2ceadd30935bb08e3a63c7122c51ca08..a76a53ffbabb15fc528ab5d787c61e385168e991 100644 --- a/Assets/Scripts/Meyou/Gene.cs +++ b/Assets/Scripts/Meyou/Gene.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using Newtonsoft.Json; using UnityEngine; @@ -19,7 +20,7 @@ namespace Meyou /// Représente les données génétiques d'un Meyou /// sous forme d'arbre. - public class Gene + public class Gene : ICloneable { /// Génération de laquelle est issu ce MeyouGene public int Generation { get; set; } = 0; @@ -58,17 +59,28 @@ namespace Meyou { NbPositions = nbPositions; MovementSpeed = movementSpeed; + Generation = 0; + } + + + [JsonConstructor] + public Gene(int generation, int nbPositions, float movementSpeed, PartGene head) + { + Generation = generation; + NbPositions = nbPositions; + MovementSpeed = movementSpeed; + Head = head; } - + /// <summary> /// Renvoie un Gene de Meyou à des fins de debug. /// </summary> public static Gene DebugGetSample() { - var gene = new Gene(2, 0.6f); + var gene = new Gene(3, 0.6f); var geneHead = new PartGene(1, 1, 1); var geneTorso = new PartGene(2, 2, 2); var geneArmLeft = new PartGene(0.1f, 3f, 0.1f); @@ -77,15 +89,10 @@ namespace Meyou var positions = new List<SerializableVector2> { new Vector2(0, 0), - new Vector2(45, 45) - }; - - var positionsBis = new List<SerializableVector2> - { new Vector2(0, 0), - new Vector2(45, -45) + new Vector2(0, 0) }; - + geneTorso.AddConnection( PartPos.PosX, new PartConnection(positions, geneArmLeft) @@ -93,9 +100,9 @@ namespace Meyou geneTorso.AddConnection( PartPos.NegX, - new PartConnection(positionsBis, geneArmRight) + new PartConnection(positions, geneArmRight) ); - + geneHead.AddConnection( PartPos.PosY, new PartConnection(positions, geneTorso) @@ -105,9 +112,9 @@ namespace Meyou return gene; } - - - + + + /// <summary> /// Ecrit dans le fichier Assets/Meyoux/test.json le Json /// du Gene de test issu de DebugGetSample() @@ -126,21 +133,31 @@ namespace Meyou writer.Write(json); writer.Close(); } + + + public object Clone() + { + return new Gene(_nbPositions, _movementSpeed) + { + Generation = Generation, + Head = (PartGene)Head.Clone(), + }; + } } - + /// Représente de manière récursive les parties du corps d'un Meyou. - public class PartGene + public class PartGene : ICloneable { public float ScaleX { get; set; } public float ScaleY { get; set; } public float ScaleZ { get; set; } // Doit être public pour être sérialisé par Json.NET - public Dictionary<PartPos, PartConnection> Connections; + public Dictionary<PartPos, PartConnection> connections; public Vector3 GetScale() @@ -155,28 +172,63 @@ namespace Meyou ScaleY = scaleY; ScaleZ = scaleZ; - Connections = new Dictionary<PartPos, PartConnection>(); + connections = new Dictionary<PartPos, PartConnection>(); + } + + + [JsonConstructor] + public PartGene(float scaleX, float scaleY, float scaleZ, Dictionary<PartPos, PartConnection> connections) + { + //Debug.Log($"called PartGene with: {scaleX} {scaleY} {scaleZ} {connections}"); + + ScaleX = scaleX; + ScaleY = scaleY; + ScaleZ = scaleZ; + + this.connections = connections; } public void AddConnection(PartPos connector, PartConnection connection) { - Connections.Add(connector, connection); + connections.Add(connector, connection); + } + + public object Clone() + { + var partGene = new PartGene(ScaleX, ScaleY, ScaleZ); + foreach (var couple in connections) + { + partGene.AddConnection(couple.Key, (PartConnection)couple.Value.Clone()); + } + + return partGene; } } - - - - - public class PartConnection + + + + + public class PartConnection : ICloneable { - public readonly List<SerializableVector2> Positions; - public readonly PartGene Part; + public List<SerializableVector2> Positions; + public PartGene Part; - public PartConnection(List<SerializableVector2> positions, PartGene connectedPart) + [JsonConstructor] + public PartConnection(List<SerializableVector2> positions, PartGene part) { + //Debug.Log($"Called PartConnection with: {positions.GetType()} {part.GetType()}"); + Positions = positions; - Part = connectedPart; + Part = part; + } + + /// effectue une copie profonde de PartConnection + /// Renvoie un PartConnection + public object Clone() + { + var newList = Positions.Select(e => (SerializableVector2)e.Clone()).ToList(); + return new PartConnection(newList, (PartGene)Part.Clone()); } } } \ No newline at end of file diff --git a/Assets/Scripts/Meyou/Meyou.cs b/Assets/Scripts/Meyou/Meyou.cs index 1afe8e360e121f973d27d39c2f7b77e22691e188..c42b973cf42b2f1e50ad817ed05fa74eaca1c6fd 100644 --- a/Assets/Scripts/Meyou/Meyou.cs +++ b/Assets/Scripts/Meyou/Meyou.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using UnityEngine; namespace Meyou @@ -11,6 +10,7 @@ namespace Meyou // Si BuildFrom() a déjà été appelé sur ce Meyou ou non private bool _hasBeenBuilt; + public bool HasBeenBuilt => _hasBeenBuilt; private Head _head; @@ -20,7 +20,7 @@ namespace Meyou private float _positionDuration; // Données concernant l'animation des Meyoux - private bool _isRunning; + private bool _isRunning = false; private DateTime _startTime; private int _animationStep; @@ -29,34 +29,42 @@ namespace Meyou // à cibler. private GameObject _centerObject; + // Le Meyou stocke son code génétique pour le faire évoluer + tard + private Gene _gene; + public Gene Gene + { + get + { + if (_gene is null) throw new ApplicationException("Le Meyou n'a pas encore été construit."); + return _gene; + } + } + // Start is called before the first frame update private void Start() { - _hasBeenBuilt = false; - _isRunning = false; _centerObject = transform.GetChild(0).gameObject; } - public void BuildFrom(Gene gene) + public void BuildFrom(Gene gene, bool start = false) { if (_hasBeenBuilt) throw new ApplicationException("Tentative de construire un Meyou déjà construit"); - - + _nbPositions = gene.NbPositions; _movementSpeed = gene.MovementSpeed; _positionDuration = _movementSpeed / _nbPositions; - - + + // Construit la tête var headGenes = gene.Head; _head = SpawnHead(headGenes.GetScale(), gene.NbPositions); - - + + // Contruit chaque BodyPart connectée à la tête - foreach (var connection in headGenes.Connections) + foreach (var connection in headGenes.connections) { var newPartGene = connection.Value.Part; var newPart = SpawnPartNextTo(_head, connection.Key, newPartGene.GetScale(), gene.NbPositions); @@ -71,7 +79,10 @@ namespace Meyou _head.PopulateConfigJoints(); _head.Configure(); + _gene = gene; _hasBeenBuilt = true; + + if (start) StartAnimation(); } @@ -99,7 +110,7 @@ namespace Meyou } _isRunning = true; - _startTime = new DateTime(); + _startTime = DateTime.Now; _animationStep = 0; SetChildrenPosition(0); @@ -153,7 +164,7 @@ namespace Meyou /// </summary> private void BuildChildren(BodyPart part, PartGene genes, int nbPositions) { - foreach (var connection in genes.Connections) + foreach (var connection in genes.connections) { var newPartGene = connection.Value.Part; var newPart = SpawnPartNextTo(part, connection.Key, newPartGene.GetScale(), nbPositions); @@ -181,7 +192,7 @@ namespace Meyou headTransform.localPosition = Vector3.zero; head.NbPositions = nbPositions; - + return head; } @@ -249,7 +260,10 @@ namespace Meyou // Change la position cible lorsque le temps est écoulé var now = DateTime.Now; - if ((now - _startTime).Seconds > _positionDuration) + + // on divise par l'échelle de temps + // pour la prendre en compte + if ((now - _startTime).Milliseconds > (_positionDuration / Time.timeScale) * 1000) { _animationStep = (_animationStep + 1) % _nbPositions; SetChildrenPosition(_animationStep); diff --git a/Assets/Scripts/Meyou/SerializableVector2.cs b/Assets/Scripts/Meyou/SerializableVector2.cs index 0ef50855efb2cfb2a5967bdea15dbfac10745540..61cd5391349d1c961dfbf2ae8fd4893eac35baee 100644 --- a/Assets/Scripts/Meyou/SerializableVector2.cs +++ b/Assets/Scripts/Meyou/SerializableVector2.cs @@ -1,5 +1,5 @@ using System; -using System.Collections.ObjectModel; +using Newtonsoft.Json; using UnityEngine; namespace Meyou @@ -7,7 +7,7 @@ namespace Meyou /// La classe Vector2 n'étant visiblement pas sérialisable par Json.NET, /// on utilise cette classe dans MeyouGene plutôt que Vector2. [Serializable] - public class SerializableVector2 + public class SerializableVector2 : ICloneable { public float x; public float y; @@ -18,6 +18,13 @@ namespace Meyou y = v.y; } + [JsonConstructor] // Constructeur utilisé par Json.NET + public SerializableVector2(float x, float y) + { + this.x = x; + this.y = y; + } + public Vector2 GetVector2() { return new Vector2(x, y); @@ -33,6 +40,11 @@ namespace Meyou { return new SerializableVector2(v); } + + public object Clone() + { + return new SerializableVector2(x, y); + } } } diff --git a/Assets/Scripts/Mutation.meta b/Assets/Scripts/Mutation.meta new file mode 100644 index 0000000000000000000000000000000000000000..c82464e24c54d5c3c9c000464563b633509a68c6 --- /dev/null +++ b/Assets/Scripts/Mutation.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 06af8c1a93d14eedb5635a1dc74cfb16 +timeCreated: 1696868696 \ No newline at end of file diff --git a/Assets/Scripts/Mutation/IGeneMutator.cs b/Assets/Scripts/Mutation/IGeneMutator.cs new file mode 100644 index 0000000000000000000000000000000000000000..7e115c2d2cfeae5804b180a0fe24b25ed940b3b0 --- /dev/null +++ b/Assets/Scripts/Mutation/IGeneMutator.cs @@ -0,0 +1,7 @@ +namespace Mutation +{ + public interface IGeneMutator + { + public Meyou.Gene MutateGene(Meyou.Gene p_gene); + } +} \ No newline at end of file diff --git a/Assets/Scripts/Mutation/IGeneMutator.cs.meta b/Assets/Scripts/Mutation/IGeneMutator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1a056f731299a7efb346c248563d4d54ca7ef59d --- /dev/null +++ b/Assets/Scripts/Mutation/IGeneMutator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a0d473ad620e4a78aa52edf65be7c21d +timeCreated: 1696868710 \ No newline at end of file diff --git a/Assets/Scripts/Mutation/MovementMutator.cs b/Assets/Scripts/Mutation/MovementMutator.cs new file mode 100644 index 0000000000000000000000000000000000000000..0e3a74b1fa4628afb5737bc1f28c3ac6f3ddc77b --- /dev/null +++ b/Assets/Scripts/Mutation/MovementMutator.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Numerics; + +/// <summary> +/// Namespace that contains all the mutation classes +/// </summary> +namespace Mutation +{ + /// <summary> + /// Mutation class that mutate the movement of a Meyou + /// </summary> + public class MovementMutator : IGeneMutator + { + /// <summary> + /// 0.0 - 1.0 (0.0 = no mutation, 1.0 = all genes are mutated) + /// </summary> + private float _mutationRate; + + /// <summary> + /// > 0.0 (amplitude of the Position mutation) + /// </summary> + private float _mutationPositionAmplitude; + + /// <summary> + /// > 0.0 (amplitude of the Speed mutation) + /// </summary> + private float _mutationSpeedAmplitude; + + /// <summary> + /// Random number generator + /// </summary> + private Random _random; + + /// <summary> + /// Constructor of the class + /// </summary> + /// <param name="p_mutationRate"> 0.0 - 1.0 (0.0 = no mutation, 1.0 = all genes are mutated) </param> + /// <param name="p_mutationAmplitude"> > 0.0 (amplitude of the Position mutation) </param> + /// <param name="p_mutationSpeedAmplitude"> > 0.0 (amplitude of the Speed mutation) </param> + public MovementMutator(float p_mutationRate, float p_mutationAmplitude, float p_mutationSpeedAmplitude) + { + // Check if the parameters are correct + if (p_mutationRate < 0.0f || p_mutationRate > 1.0f) + throw new ArgumentOutOfRangeException("p_mutationRate", "p_mutationRate must be between 0.0 and 1.0"); + + if (p_mutationAmplitude <= 0.0f) + throw new ArgumentOutOfRangeException("p_mutationAmplitude", "p_mutationAmplitude must be greater than 0.0"); + + if (p_mutationSpeedAmplitude <= 0.0f) + throw new ArgumentOutOfRangeException("p_mutationSpeedAmplitude", "p_mutationSpeedAmplitude must be greater than 0.0"); + + // Set the parameters + _mutationRate = p_mutationRate; + _mutationPositionAmplitude = p_mutationAmplitude; + _mutationSpeedAmplitude = p_mutationSpeedAmplitude; + _random = new Random(); + } + + /// <summary> + /// Mutate a Meyou.Gene and return a new mutated one + /// </summary> + /// <param name="p_gene"> The initial Meyou.Gene </param> + /// <returns> The mutated Meyou.Gene </returns> + public Meyou.Gene MutateGene(Meyou.Gene p_gene) + { + // Clone the gene to avoid modifying the original one + Meyou.Gene newGene = p_gene.Clone() as Meyou.Gene; + + newGene.Generation = p_gene.Generation + 1; + + // Mutate all the PartGene of the Meyou.Gene + newGene.Head = MutatePartGene(newGene.Head).Clone() as Meyou.PartGene; + + // Mutate the speed of the Meyou.Gene + newGene.MovementSpeed = MutateSpeed(newGene.MovementSpeed); + + // Return the mutated Meyou.Gene + return newGene; + } + + private float MutateSpeed(float p_speed) + { + // Check if the speed is mutated + if (_random.NextDouble() < _mutationRate) + { + // Mutate the speed with a random value between -_mutationSpeedAmplitude and _mutationSpeedAmplitude + p_speed += (float)((_random.NextDouble() * 2f - 1f) * _mutationSpeedAmplitude); + } + // Return the mutated speed + return p_speed; + } + + /// <summary> + /// Mutate a Meyou.PartGene and return a new mutated one + /// </summary> + /// <param name="p_partGene"> The initial Meyou.PartGene </param> + /// <returns> The mutated Meyou.PartGene </returns> + private Meyou.PartGene MutatePartGene(Meyou.PartGene p_partGene) + { + // Clone the PartGene to avoid modifying the original one + Meyou.PartGene newPartGene = p_partGene.Clone() as Meyou.PartGene; + + // Loop in each connection of the PartGene + foreach (System.Collections.Generic.KeyValuePair<Meyou.PartPos, Meyou.PartConnection> connectionDic in newPartGene.connections) + { + // select only the value witch is the "PartConnection" + Meyou.PartConnection connection = connectionDic.Value; + + // Loop in each position of the PartConnection + foreach (Meyou.SerializableVector2 Position in connection.Positions) + { + + // Check if the position x is mutated + if (_random.NextDouble() < _mutationRate) + { + // Mutate the position x with a random value between -_mutationAmplitude and _mutationAmplitude + Position.x += (float)((_random.NextDouble() * 2f - 1f) * _mutationPositionAmplitude); + } + + // Check if the position y is mutated + if (_random.NextDouble() < _mutationRate) + { + // Mutate the position y with a random value between -_mutationAmplitude and _mutationAmplitude + Position.y += (float)((_random.NextDouble() * 2f - 1f) * _mutationPositionAmplitude); + } + } + // Recursive call to mutate the next PartGene + connection.Part = MutatePartGene(connection.Part).Clone() as Meyou.PartGene; + } + // Return the mutated PartGene + return newPartGene; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Mutation/MovementMutator.cs.meta b/Assets/Scripts/Mutation/MovementMutator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..7114fb9a30b327e0cf4777c8787aae6754f998f8 --- /dev/null +++ b/Assets/Scripts/Mutation/MovementMutator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 57089f3018cf7f09e9a90b889cb7d77b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trials.meta b/Assets/Scripts/Trials.meta new file mode 100644 index 0000000000000000000000000000000000000000..858d48066354e606cbaa2afccb9471ab8bf0718f --- /dev/null +++ b/Assets/Scripts/Trials.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 99522cfa08ac49d1b08f49b39abe1c10 +timeCreated: 1696598367 \ No newline at end of file diff --git a/Assets/Scripts/Trials/Evaluator.meta b/Assets/Scripts/Trials/Evaluator.meta new file mode 100644 index 0000000000000000000000000000000000000000..1d653988c4804616dc29b9d7a594a80b2917727a --- /dev/null +++ b/Assets/Scripts/Trials/Evaluator.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 53affc6d33b64cd09614eed440158885 +timeCreated: 1697097622 \ No newline at end of file diff --git a/Assets/Scripts/Trials/Evaluator/MeyouEvaluator.cs b/Assets/Scripts/Trials/Evaluator/MeyouEvaluator.cs new file mode 100644 index 0000000000000000000000000000000000000000..f18be4c0610065d21c7a1e916153356f5de72124 --- /dev/null +++ b/Assets/Scripts/Trials/Evaluator/MeyouEvaluator.cs @@ -0,0 +1,16 @@ +using UnityEngine; + +namespace Trials.Evaluator +{ + /// Un objet hériant de cette classe abstraite peut être attaché + /// aux Meyoux créés par MeyouSpawner afin de calculer leur score. + public abstract class MeyouEvaluator: MonoBehaviour + { + /// Indique à l'évaluateur que l'évaluation du Meyou donné commence. + public abstract void StartEvaluation(Meyou.Meyou meyou); + + /// Obtient le score du Meyou. Peut être appelé en cours d'évaluation, + /// ou à la fin pour obtenir le score final. + public abstract double GetScore(); + } +} \ No newline at end of file diff --git a/Assets/Scripts/Trials/Evaluator/MeyouEvaluator.cs.meta b/Assets/Scripts/Trials/Evaluator/MeyouEvaluator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..2e54fc270571b69b38caef7246076ae1a21ab203 --- /dev/null +++ b/Assets/Scripts/Trials/Evaluator/MeyouEvaluator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 69b30b5adfb84069a87c0b01960ff78e +timeCreated: 1696784003 \ No newline at end of file diff --git a/Assets/Scripts/Trials/Evaluator/RangeTrialEvaluator.cs b/Assets/Scripts/Trials/Evaluator/RangeTrialEvaluator.cs new file mode 100644 index 0000000000000000000000000000000000000000..9e7fa336c180ee35490b38f785cf524157a787b0 --- /dev/null +++ b/Assets/Scripts/Trials/Evaluator/RangeTrialEvaluator.cs @@ -0,0 +1,47 @@ +using System; +using UnityEngine; + +namespace Trials.Evaluator +{ + /// Evalue les Meyoux selon les règles suivantes: + /// - Le score est proportionnel à la distance parcouru par le Meyou sur l'axe Z + /// - Si le Meyou passe en dessous de Y = Z, son score ne peut plus augmenter pour cette évaluation + public class RangeTrialEvaluator : MeyouEvaluator + { + private const int YFloor = 10; + + private bool _isEvaluating; + + private Meyou.Meyou _meyou; + private double _score; + + + // Update is called once per frame + void Update() + { + if (!_isEvaluating) return; + if (_meyou is null) throw new ApplicationException("Evaluated Meyou not set"); + + var yCoo = _meyou.GetCenterObject().transform.position.y; + if (yCoo < YFloor) _isEvaluating = false; // Elimination du Meyou, sa progression n'est plus comptée. + + var zCoo = _meyou.GetCenterObject().transform.position.z; + if (zCoo > _score) _score = zCoo; + } + + + public override void StartEvaluation(Meyou.Meyou meyou) + { + if (_isEvaluating) throw new ApplicationException("Already evaluating"); + _isEvaluating = true; + _meyou = meyou; + + _score = 0; + } + + public override double GetScore() + { + return _score; + } + } +} diff --git a/Assets/Scripts/Trials/Evaluator/RangeTrialEvaluator.cs.meta b/Assets/Scripts/Trials/Evaluator/RangeTrialEvaluator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..02c88bca3c5f5f89d2649b7cc9fbb48be8b58f50 --- /dev/null +++ b/Assets/Scripts/Trials/Evaluator/RangeTrialEvaluator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0361eb9a6b502854881f0c9ff329ab09 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trials/Generators.meta b/Assets/Scripts/Trials/Generators.meta new file mode 100644 index 0000000000000000000000000000000000000000..a2c8e18f45fa69c0f622964bf8114e8886e606a5 --- /dev/null +++ b/Assets/Scripts/Trials/Generators.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b08bc8c1fbb34e9caa9cd05b1e53f373 +timeCreated: 1696942733 \ No newline at end of file diff --git a/Assets/Scripts/Trials/Generators/ConstantGeneGenerator.cs b/Assets/Scripts/Trials/Generators/ConstantGeneGenerator.cs new file mode 100644 index 0000000000000000000000000000000000000000..a766013f45ab32dff49ceec6ab8e9cbcdd42954b --- /dev/null +++ b/Assets/Scripts/Trials/Generators/ConstantGeneGenerator.cs @@ -0,0 +1,20 @@ +using Meyou; + +namespace Trials.Generators +{ + /// Renvoie toujours le même gène + public class ConstantGeneGenerator: GeneGenerator + { + protected Gene constantGene; + + public void SetGene(Gene gene) + { + constantGene = gene; + } + + public override Gene GetGene(int _) + { + return constantGene; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Trials/Generators/ConstantGeneGenerator.cs.meta b/Assets/Scripts/Trials/Generators/ConstantGeneGenerator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3707147af94830368fa4cf0e21e60de36331ea2f --- /dev/null +++ b/Assets/Scripts/Trials/Generators/ConstantGeneGenerator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a28e8a82ace64ace8436e64a9c28ee91 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trials/Generators/ConstantGeneGeneratorString.cs b/Assets/Scripts/Trials/Generators/ConstantGeneGeneratorString.cs new file mode 100644 index 0000000000000000000000000000000000000000..cd61a830c5756bd191190e21f2a52e01e512a5ba --- /dev/null +++ b/Assets/Scripts/Trials/Generators/ConstantGeneGeneratorString.cs @@ -0,0 +1,17 @@ +using System; +using Meyou; +using Newtonsoft.Json; + +namespace Trials.Generators +{ + public class ConstantGeneGeneratorString: ConstantGeneGenerator + { + public string gene; + + private void Start() + { + if (gene == "") throw new ArgumentException("Aucun gène spécifié"); + constantGene = JsonConvert.DeserializeObject<Gene>(gene); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Trials/Generators/ConstantGeneGeneratorString.cs.meta b/Assets/Scripts/Trials/Generators/ConstantGeneGeneratorString.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d8f7285a26e58e6af585fdc9ecd8deef04a2fcd3 --- /dev/null +++ b/Assets/Scripts/Trials/Generators/ConstantGeneGeneratorString.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9e959adf511a44ff8f898510a1a76072 +timeCreated: 1696942139 \ No newline at end of file diff --git a/Assets/Scripts/Trials/Generators/DefaultEvolver.cs b/Assets/Scripts/Trials/Generators/DefaultEvolver.cs new file mode 100644 index 0000000000000000000000000000000000000000..01f4a9a3506b79c7f1a99af80a2bc93243049a16 --- /dev/null +++ b/Assets/Scripts/Trials/Generators/DefaultEvolver.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using Meyou; +using Mutation; +using UnityEngine; +using Random = System.Random; + +namespace Trials.Generators +{ + public class DefaultEvolver : GenerationEvolver + { + public float mutationRate = 0.1f; + public float movementMutationAmplitude = 5.0f; + public float speedMutationAmplitude = 0.5f; + + private const double C = 1.1f; + + private IGeneMutator _mutator; + + private List<Meyou.Gene> _evolvedGenes; + private Random _rdm; + + + private void Start() + { + _rdm = new Random(); + _mutator = new MovementMutator( + mutationRate, + movementMutationAmplitude, + speedMutationAmplitude + ); + } + + + public override Gene GetGene(int idx) + { + return _evolvedGenes[idx]; + } + + public override void SetPreviousGenerationResults(List<(Gene, double)> gen) + { + _evolvedGenes = new List<Gene>(); + + // Tri les gènes par score décroissant + var sortedGenes = gen.OrderBy(x => x.Item2).Select(x => x.Item1).Reverse().ToList(); + var nbGene = sortedGenes.Count; + + var tenPercent = nbGene / 10; + var remaining = nbGene - tenPercent; + + // On garde les 10% meilleur tel quel + for (var i = 0; i < tenPercent; i++) _evolvedGenes.Add((Gene) sortedGenes[i].Clone()); + + // On en choisi 10% d'autre à partir de tous les autres Genes. + for (var i = 0; i < tenPercent; i++) + { + var debugRes = GeneIdxPicker(remaining); + var idx = debugRes + tenPercent; + _evolvedGenes.Add((Gene)sortedGenes[idx].Clone()); + } + + // A partir des 20% déjà prélevés, on en génère 80% d'autre en les faisant + // muter + remaining = nbGene - tenPercent - tenPercent; + + for (var i = 0; i < remaining; i++) + { + var idx = GeneIdxPicker(tenPercent * 2); + _evolvedGenes.Add(_mutator.MutateGene(_evolvedGenes[idx])); + } + } + + + + /// <summary> + /// Renvoie un entier entre 0 (inclu) et n (exclu), + /// avec une chance accru de renvoyer un entier proche de 0. + /// </summary> + private int GeneIdxPicker(int n) + { + var k = Math.Pow(C, n + 1) - 1; + var r = Math.Log(_rdm.NextDouble() * k + 1); + var i = n - (n / Math.Log(k + 1)) * r; + return (int) i; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Trials/Generators/DefaultEvolver.cs.meta b/Assets/Scripts/Trials/Generators/DefaultEvolver.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4ce91856cf760fa00782e58c52609943a5eac4cb --- /dev/null +++ b/Assets/Scripts/Trials/Generators/DefaultEvolver.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f754e9b109a1d927fa0fd4f60fdfbf91 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trials/Generators/GeneGenerator.cs b/Assets/Scripts/Trials/Generators/GeneGenerator.cs new file mode 100644 index 0000000000000000000000000000000000000000..4e0f8902ac007f91b63f265392519b759e344339 --- /dev/null +++ b/Assets/Scripts/Trials/Generators/GeneGenerator.cs @@ -0,0 +1,13 @@ +using Meyou; +using UnityEngine; + +namespace Trials.Generators +{ + /// Fournit un gène à assigner à un Meyou + /// en fonction de son rang dans la génération + /// (0 => le meilleur) + public abstract class GeneGenerator: MonoBehaviour + { + public abstract Gene GetGene(int idx); + } +} \ No newline at end of file diff --git a/Assets/Scripts/Trials/Generators/GeneGenerator.cs.meta b/Assets/Scripts/Trials/Generators/GeneGenerator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..170ca471d9a80b1f063479d683cf69b87c5ac6c8 --- /dev/null +++ b/Assets/Scripts/Trials/Generators/GeneGenerator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c5fcdfe7cf5f4309a229dd89a2d4ea3d +timeCreated: 1696598458 \ No newline at end of file diff --git a/Assets/Scripts/Trials/Generators/GenerationEvolver.cs b/Assets/Scripts/Trials/Generators/GenerationEvolver.cs new file mode 100644 index 0000000000000000000000000000000000000000..87991339a94de894378799d317843ede3d80499d --- /dev/null +++ b/Assets/Scripts/Trials/Generators/GenerationEvolver.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; +using Meyou; + +namespace Trials.Generators +{ + /// Fournit un gène en se basant sur le classement d'une + /// précédente génération + public abstract class GenerationEvolver : GeneGenerator + { + public abstract void SetPreviousGenerationResults(List<(Gene, double)> gen); + } +} \ No newline at end of file diff --git a/Assets/Scripts/Trials/Generators/GenerationEvolver.cs.meta b/Assets/Scripts/Trials/Generators/GenerationEvolver.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..10325e93b83b59fda14764e602cee19e4371d663 --- /dev/null +++ b/Assets/Scripts/Trials/Generators/GenerationEvolver.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9400de7a5b0d4168ba4c6a1f09f393bb +timeCreated: 1696940713 \ No newline at end of file diff --git a/Assets/Scripts/Trials/Generators/NotEvolver.cs b/Assets/Scripts/Trials/Generators/NotEvolver.cs new file mode 100644 index 0000000000000000000000000000000000000000..baad8d4ee9d1258016483f06ecd4e8cb2fe3c30e --- /dev/null +++ b/Assets/Scripts/Trials/Generators/NotEvolver.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using Meyou; + +namespace Trials.Generators +{ + /// Renvoie les mêmes gènes qu'à la génération précédente + public class NotEvolver : GenerationEvolver + { + private List<(Gene, double)> _lastGene; + + public override Gene GetGene(int idx) + { + if (_lastGene is null) throw new ApplicationException("Génération précédente non définie"); + return _lastGene[idx].Item1; + } + + public override void SetPreviousGenerationResults(List<(Gene, double)> gen) + { + // Copie profonde des scores + if (_lastGene is null) _lastGene = new List<(Gene, double)>(); + else _lastGene.Clear(); + foreach (var score in gen) + { + _lastGene.Add(((Gene) score.Item1.Clone(), score.Item2)); + } + } + } +} diff --git a/Assets/Scripts/Trials/Generators/NotEvolver.cs.meta b/Assets/Scripts/Trials/Generators/NotEvolver.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ba540fae82180304953d87205d5f6940aa62eb9e --- /dev/null +++ b/Assets/Scripts/Trials/Generators/NotEvolver.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ba23faf7699b134a900f1c39896396d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trials/MeyouSpawner.cs b/Assets/Scripts/Trials/MeyouSpawner.cs new file mode 100644 index 0000000000000000000000000000000000000000..f869987cff96e0a30d1c2f9797cfd38ca8c1d217 --- /dev/null +++ b/Assets/Scripts/Trials/MeyouSpawner.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Trials +{ + /// Classe permettant de faire apparaître un nombre défini de + /// Meyoux dans une scène, au même endroit. + public class MeyouSpawner : MonoBehaviour + { + public Meyou.Meyou meyouPrefab; + + private Meyou.Meyou[] _meyoux; + private bool _spawned; + + private uint _bulkSize; // 0 = pas encore de générations créées + + + private void Start() + { + _spawned = false; + _bulkSize = 0; + } + + + + + /// <summary> + /// Renvoie la taille de la dernière génération créée. + /// Renvoie 0 si ce Spawner n'a pas encore créé de génération. + /// </summary> + public uint GetBulkSize() + { + return _bulkSize; + } + + + + /// Fait apparaître un groupe de Meyou avec l'évaluateur donné. + /// Renvoie une référence vers le tableau des Meyoux créés. + public Meyou.Meyou[] SpawnBulk(uint startIdx, uint bulkSize, Generators.GeneGenerator generator, Evaluator.MeyouEvaluator evaluator) + { + if (_spawned) + throw new ApplicationException("Une génération existe déjà ! Il faut la supprimer d'abord."); + + if (bulkSize == 0) throw new ArgumentException("generationSize doit être > 0"); + + _bulkSize = bulkSize; + + // Liste temporaire pour stocker les Meyoux instanciés; + // convertie en Array + tard + var createdMeyoux = new List<Meyou.Meyou> { Capacity = (int) bulkSize }; + + for (var i=startIdx; i<startIdx+bulkSize; i++) + { + var meyou = Instantiate(meyouPrefab, transform.position, Quaternion.identity); + + // Attache l'évaluateur au Meyou + var eval = Instantiate(evaluator, meyou.transform); + eval.StartEvaluation(meyou); + + meyou.BuildFrom(generator.GetGene((int) i)); + + createdMeyoux.Add(meyou); + } + + _meyoux = createdMeyoux.ToArray(); + + return _meyoux; + } + } +} diff --git a/Assets/Scripts/Trials/MeyouSpawner.cs.meta b/Assets/Scripts/Trials/MeyouSpawner.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a623bc2e52f1f7151ca9b072e171c4358eee32f2 --- /dev/null +++ b/Assets/Scripts/Trials/MeyouSpawner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 27e39136fd18b1c4980695845752ba21 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trials/RangeTrialCamera.cs b/Assets/Scripts/Trials/RangeTrialCamera.cs new file mode 100644 index 0000000000000000000000000000000000000000..45a180f3959f87e55c81b3be700b2d0cfc0a585d --- /dev/null +++ b/Assets/Scripts/Trials/RangeTrialCamera.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace Trials +{ + public class RangeTrialCamera : MonoBehaviour + { + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } + } +} diff --git a/Assets/Scripts/Trials/RangeTrialCamera.cs.meta b/Assets/Scripts/Trials/RangeTrialCamera.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..17b4db28dd49b383db5080c71a07863b06544233 --- /dev/null +++ b/Assets/Scripts/Trials/RangeTrialCamera.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e318b1f3e2f373d4cb999fc629d0e2d7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trials/TrialManager.cs b/Assets/Scripts/Trials/TrialManager.cs new file mode 100644 index 0000000000000000000000000000000000000000..f1aff386621bc5bb8392c923335d74f5dd981199 --- /dev/null +++ b/Assets/Scripts/Trials/TrialManager.cs @@ -0,0 +1,243 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Meyou; +using Newtonsoft.Json; +using UnityEngine; +using Trials.Generators; +using Unity.VisualScripting; +using UnityEngine.Serialization; + +namespace Trials +{ + internal enum ManagerStates + { + Idle, + StartupWaiting, + Evolving + } + + + /// <summary> + /// Objet orchestrant la phase d'évolution. + /// </summary> + public class TrialManager : MonoBehaviour + { + /// Chemin vers le dossier dans lequel les gène des meilleurs Meyou + /// de chaque génération seront écrit. + /// Si laissé vide, aucune snapshot ne sera faite. + public string snapshotPath; + + /// Nombre de générations entre chaque snapshot. + /// Ex: si snapshotRate = 10, une snapshot sera faites toutes les 10 générations + public int snapshotRate = 1; + + /// Nombre de millisecondes à attendre entre Start() + /// et le début de l'évolution + public int startupDelay = 500; + + /// Nombre de millisecondes entre l'apparition des Meyoux + /// et le début de leur évolution. Cela permet qu'ils démarrent + /// leur animation au sol. + public int animationStartDelay = 3000; + + // todo: Peut-être en faire une Interface pour avoir une durée en fonction de la génération + /// Durée de simulation d'une génération, en secondes + public uint generationDuration = 30; + + /// Quantité de Meyoux à simuler par génération + public uint generationSize = 100; + + /// Combien de Meyoux d'une même génération + /// à simuler à la fois. + /// Ex: si generationSize = 200 et bulkSize = 100, + /// une génération sera simulée en 2x. + public uint bulkSize = 100; + + public MeyouSpawner spawner; + public Evaluator.MeyouEvaluator evaluator; + public GeneGenerator baseGene; + public GenerationEvolver evolver; + + private int _currentGeneration; + private uint _toBeSimulated; // nombre de Meyoux de la génération actuel devant encore être simulés + + // Association Gene de Meyou déjà simulé => score du Meyou + // rempli après chaque groupe de Meyou simulé, jusqu'à avoir simulé toute la génération + private List<(Gene, double)> _currentGenerationMeyou; + private Meyou.Meyou[] _currentMeyouBulk; + + + private ManagerStates _state; + private bool _meyouxToBeStarted; + + + private DateTime _evolutionStartDate; + private DateTime _lastBulkStartDate; + + + + + public void StartEvolution() + { + if (_state == ManagerStates.Evolving) throw new ApplicationException("L'évolution est déjà en marche !"); + + _currentGenerationMeyou = new List<(Gene, double)>(); + + + _currentGeneration = -1; + _toBeSimulated = generationSize; + + _state = ManagerStates.Evolving; + + StartGeneration(baseGene); + } + + + + + + + + + + /// Génère soit un nouveau groupe de Meyoux soit de la génération actuelle, + /// soit une nouvelle génération si besoin. + /// Utilise le IGeneEvolver donné lors de l'appel à StartEvolution. + private void RinceAndRepeat() + { + // Stocke les scores des Meyoux + foreach (var meyou in _currentMeyouBulk) + { + var meyouEvaluator = meyou.GetComponentInChildren<Evaluator.MeyouEvaluator>(); + var score = meyouEvaluator.GetScore(); + _currentGenerationMeyou.Add((meyou.Gene, score)); + } + + // Supprime les Meyoux + DestroyMeyoux(); + + // Génération finie ou non + if (_toBeSimulated == 0) + { + evolver.SetPreviousGenerationResults(_currentGenerationMeyou); + + + // Créé une sauvegarde du meilleur gène de la génération + if (Directory.Exists(snapshotPath) && _currentGeneration % snapshotRate == 0) + { + var bestGene = _currentGenerationMeyou + .OrderBy(x => x.Item2) + .Select(x => x.Item1) + .Reverse() + .First(); + + var geneStr = JsonConvert.SerializeObject(bestGene); + var fileName = $"g{_currentGeneration} - {DateTime.Now:MM.dd.yy H.mm.ss}.json"; + + using var sw = File.CreateText($@"{snapshotPath}\{fileName}"); + sw.Write(geneStr); + } + else if (snapshotPath != "") Debug.LogWarning("Snapshot directory set but does not exists"); + + + StartGeneration(evolver); + } + else if (_currentGeneration == 0) SpawnBulk(baseGene); + else SpawnBulk(evolver); + } + + + + + + private void StartGeneration(GeneGenerator generator) + { + _currentGenerationMeyou.Clear(); + _currentGeneration += 1; + _toBeSimulated = generationSize; + + SpawnBulk(generator); + } + + + + + /// Spawn min(bulkSize, _toBeSimulated) + /// et diminue _toBeSimulated par le nombre de Meyou créés. + private void SpawnBulk(GeneGenerator generator) + { + var meyouNb = Math.Min(bulkSize, _toBeSimulated); + + Debug.Log($"Generation {_currentGeneration} ({_currentGenerationMeyou.Count}+{meyouNb}/{generationSize})"); + + _currentMeyouBulk = spawner.SpawnBulk(generationSize-_toBeSimulated, meyouNb, generator, evaluator); + _toBeSimulated -= meyouNb; + + _lastBulkStartDate = DateTime.Now; + _meyouxToBeStarted = true; + } + + + + + /// <summary> + /// Détruit tous les Meyoux dans _currentMeyouBulk + /// </summary> + private void DestroyMeyoux() + { + foreach (var m in _currentMeyouBulk) Destroy(m.GameObject()); + } + + + + + + // Start is called before the first frame update + private void Start() + { + _state = ManagerStates.Idle; + + if (generationDuration == 0) throw new ArgumentException("duration doit être > 0"); + if (generationSize <= 1) throw new ArgumentException("generationSize doit être > 1"); + if (bulkSize == 0) throw new ArgumentException("bulkSize doit être > 0"); + + // Demande le début de l'évolution dans startupDelay ms. + _evolutionStartDate = DateTime.Now; + _state = ManagerStates.StartupWaiting; + } + + + private void Update() + { + if (_state == ManagerStates.StartupWaiting) + { + if (DateTime.Now - _evolutionStartDate > TimeSpan.FromMilliseconds(startupDelay)) + { + StartEvolution(); + } + } + else if (_state == ManagerStates.Evolving) + { + if (DateTime.Now - _lastBulkStartDate > TimeSpan.FromSeconds(generationDuration)) + { + RinceAndRepeat(); + } + } + + + if (_meyouxToBeStarted) + { + if (DateTime.Now - _lastBulkStartDate > TimeSpan.FromMilliseconds(animationStartDelay)) + { + _meyouxToBeStarted = false; + foreach (var meyou in _currentMeyouBulk) + { + meyou.StartAnimation(); + } + } + } + } + } +} diff --git a/Assets/Scripts/Trials/TrialManager.cs.meta b/Assets/Scripts/Trials/TrialManager.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..72ea8f02cf22b8fb5c2cc280afb61fc45a6d60f1 --- /dev/null +++ b/Assets/Scripts/Trials/TrialManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aabac0300ef772447b1ce154fe87b071 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/cameraManager.cs b/Assets/Scripts/cameraManager.cs index 95891057931960e696509daeb1e48c864ebd9693..6c2a73eb82e33b19fcd1bd2eea0cca659d4f2607 100644 --- a/Assets/Scripts/cameraManager.cs +++ b/Assets/Scripts/cameraManager.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class CameraController : MonoBehaviour @@ -14,7 +12,7 @@ public class CameraController : MonoBehaviour void Update() - { + { //go to the furthest cube from the cube genrator when 0 is pressed if (Input.GetKeyDown(KeyCode.Alpha0)) { @@ -30,7 +28,7 @@ public class CameraController : MonoBehaviour } if (target != null) { - MoveCamera(); + MoveCamera(); } } @@ -38,7 +36,7 @@ public class CameraController : MonoBehaviour void GoToFurthestObject() { - GameObject[] objectsOfInterest = GameObject.FindGameObjectsWithTag(objectOfInterest.tag); + GameObject[] objectsOfInterest = GameObject.FindGameObjectsWithTag(objectOfInterest.tag); print(objectOfInterest.tag); float furthestDistance = 0; int furthestIndex = 0; @@ -56,7 +54,7 @@ public class CameraController : MonoBehaviour void CycleThroughObjects() { - GameObject[] objectsOfInterest = GameObject.FindGameObjectsWithTag(objectOfInterest.tag); + GameObject[] objectsOfInterest = GameObject.FindGameObjectsWithTag(objectOfInterest.tag); if (objectsOfInterest.Length > 0) { @@ -66,7 +64,7 @@ public class CameraController : MonoBehaviour for (int i = 0; i < objectsOfInterest.Length; i++) { if (objectsOfInterest[i].transform == target) - { + { currentIndex = i; break; } @@ -82,35 +80,35 @@ public class CameraController : MonoBehaviour target = objectsOfInterest[currentIndex + 1].transform; } } - + } void MoveCamera() { - Vector3 targetPosition = target.position; - - - if(cameraOrientation) - { - offset =new Vector3 (0.0f, 2.0f, -5.0f); - -} - else - { - offset =new Vector3 (0.0f, 5.0f, 0.1f); - } - - Vector3 desiredPosition = targetPosition + offset; - transform.position = Vector3.Lerp(transform.position, desiredPosition, cameraSpeed * Time.deltaTime); - - - // Rotate the camera to look at the cube. - Quaternion targetRotation = Quaternion.LookRotation(targetPosition - transform.position); - transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, rotationSpeed * Time.deltaTime); - - - - + Vector3 targetPosition = target.position; + + + if (cameraOrientation) + { + offset = new Vector3(0.0f, 2.0f, -5.0f); + + } + else + { + offset = new Vector3(0.0f, 5.0f, 0.1f); + } + + Vector3 desiredPosition = targetPosition + offset; + transform.position = Vector3.Lerp(transform.position, desiredPosition, cameraSpeed * Time.deltaTime); + + + // Rotate the camera to look at the cube. + Quaternion targetRotation = Quaternion.LookRotation(targetPosition - transform.position); + transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, rotationSpeed * Time.deltaTime); + + + + } } diff --git a/Assets/Scripts/cameraManagerInEditor.cs b/Assets/Scripts/cameraManagerInEditor.cs index 33abd3ca5268598946660a95b4c2edf26dded2b9..c75d10d4b36e2e4a5b59df537a694b8e29e7d9c5 100644 --- a/Assets/Scripts/cameraManagerInEditor.cs +++ b/Assets/Scripts/cameraManagerInEditor.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class CameraControllerEditor : MonoBehaviour @@ -10,7 +8,7 @@ public class CameraControllerEditor : MonoBehaviour private float verticalInput; private Vector3 offset = new Vector3(0f, 2f, -5f); - private float rotationSpeed = 5.0f; + private float rotationSpeed = 5.0f; private bool cameraOrientation; // True = horizontal, False = vertical. void Start() diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset index cdc1f3eab509699e163f46fd14f0e81eb3a5dbaf..3f95324e81ae1b98b1dd0a3726503ad38ce2adcf 100644 --- a/ProjectSettings/DynamicsManager.asset +++ b/ProjectSettings/DynamicsManager.asset @@ -3,10 +3,11 @@ --- !u!55 &1 PhysicsManager: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 14 m_Gravity: {x: 0, y: -9.81, z: 0} m_DefaultMaterial: {fileID: 0} m_BounceThreshold: 2 + m_DefaultMaxDepenetrationVelocity: 10 m_SleepThreshold: 0.005 m_DefaultContactOffset: 0.01 m_DefaultSolverIterations: 6 @@ -17,11 +18,13 @@ PhysicsManager: m_ClothInterCollisionDistance: 0 m_ClothInterCollisionStiffness: 0 m_ContactsGeneration: 1 - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - m_AutoSimulation: 1 + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffbfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_SimulationMode: 0 m_AutoSyncTransforms: 0 m_ReuseCollisionCallbacks: 1 + m_InvokeCollisionCallbacks: 1 m_ClothInterCollisionSettingsToggle: 0 + m_ClothGravity: {x: 0, y: -9.81, z: 0} m_ContactPairsMode: 0 m_BroadphaseType: 0 m_WorldBounds: @@ -31,4 +34,6 @@ PhysicsManager: m_FrictionType: 0 m_EnableEnhancedDeterminism: 0 m_EnableUnifiedHeightmaps: 1 - m_DefaultMaxAngluarSpeed: 7 + m_ImprovedPatchFriction: 0 + m_SolverType: 0 + m_DefaultMaxAngularSpeed: 7 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index b1152d57946cb6cc6a3321d29725cd080d13828c..561221de9f12278a12d36760636aee9f1d77b2f9 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -42,8 +42,8 @@ PlayerSettings: m_SplashScreenLogos: [] m_VirtualRealitySplashScreen: {fileID: 0} m_HolographicTrackingLossScreen: {fileID: 0} - defaultScreenWidth: 1920 - defaultScreenHeight: 1080 + defaultScreenWidth: 1280 + defaultScreenHeight: 720 defaultScreenWidthWeb: 960 defaultScreenHeightWeb: 600 m_StereoRenderingPath: 0 @@ -101,7 +101,7 @@ PlayerSettings: xboxEnableFitness: 0 visibleInBackground: 1 allowFullscreenSwitch: 1 - fullscreenMode: 1 + fullscreenMode: 3 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index 7b7658d6ebf4a0302c34bf5cc1e9d30813705a9e..8d0bce7dd5cf762a22715f027861895607d380f3 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -6,7 +6,7 @@ QualitySettings: serializedVersion: 5 m_CurrentQuality: 5 m_QualitySettings: - - serializedVersion: 2 + - serializedVersion: 3 name: Very Low pixelLightCount: 0 shadows: 0 @@ -18,17 +18,21 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 1 - textureQuality: 1 + skinWeights: 1 + globalTextureMipmapLimit: 1 + textureMipmapLimitSettings: [] anisotropicTextures: 0 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 + useLegacyDetailDistribution: 1 vSyncCount: 0 + realtimeGICPUUsage: 25 lodBias: 0.3 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -40,8 +44,18 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 3 name: Low pixelLightCount: 0 shadows: 0 @@ -53,17 +67,21 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 2 - textureQuality: 0 + skinWeights: 2 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 0 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 + useLegacyDetailDistribution: 1 vSyncCount: 0 + realtimeGICPUUsage: 25 lodBias: 0.4 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -75,8 +93,18 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 3 name: Medium pixelLightCount: 1 shadows: 1 @@ -88,17 +116,21 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 2 - textureQuality: 0 + skinWeights: 2 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 1 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 + useLegacyDetailDistribution: 1 vSyncCount: 1 + realtimeGICPUUsage: 25 lodBias: 0.7 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -110,8 +142,18 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 3 name: High pixelLightCount: 2 shadows: 2 @@ -123,17 +165,21 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 2 - textureQuality: 0 + skinWeights: 2 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 1 antiAliasing: 0 softParticles: 0 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 1 vSyncCount: 1 + realtimeGICPUUsage: 50 lodBias: 1 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -145,8 +191,18 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 3 name: Very High pixelLightCount: 3 shadows: 2 @@ -158,17 +214,21 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 4 - textureQuality: 0 + skinWeights: 4 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 2 antiAliasing: 2 softParticles: 1 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 1 vSyncCount: 1 + realtimeGICPUUsage: 50 lodBias: 1.5 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -180,8 +240,18 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 3 name: Ultra pixelLightCount: 4 shadows: 2 @@ -193,17 +263,21 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 4 - textureQuality: 0 + skinWeights: 4 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 2 antiAliasing: 2 softParticles: 1 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 1 vSyncCount: 1 + realtimeGICPUUsage: 100 lodBias: 2 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -215,7 +289,18 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] + m_TextureMipmapLimitGroupNames: [] m_PerPlatformDefaultQuality: Android: 2 Lumin: 5 @@ -223,6 +308,7 @@ QualitySettings: Nintendo Switch: 5 PS4: 5 PSP2: 2 + Server: 0 Stadia: 5 Standalone: 5 WebGL: 3 diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 1c92a7840ec11895c76785f65d949a3d20d53355..93fdc01eb2ab88351e565d388b4fd24b4af2bd63 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -3,7 +3,10 @@ --- !u!78 &1 TagManager: serializedVersion: 2 - tags: [] + tags: + - MeyouCenter + - Cube + - complexeObjext layers: - Default - TransparentFX @@ -11,7 +14,7 @@ TagManager: - - Water - UI - - + - Meyou - - -