diff --git a/Assets/Scenes/MainMenu.unity b/Assets/Scenes/MainMenu.unity index c754c12a4a2f02d8f859ae9bdfb76b1b69b99d56..1a1cd51eadb0d82af92b3b6530a0e5cd08eb2b12 100644 --- a/Assets/Scenes/MainMenu.unity +++ b/Assets/Scenes/MainMenu.unity @@ -39,6 +39,7 @@ RenderSettings: m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0.44657773, g: 0.4964139, b: 0.5748172, a: 1} + m_IndirectSpecularColor: {r: 0.44657773, g: 0.4964139, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -157,50 +158,63 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 1201210948483722431, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1201210948483722431, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: meyouPrefab value: objectReference: {fileID: 3160958630494815367, guid: acf7640b9d258e24ab008e6d1d4103a0, type: 3} + - target: {fileID: 1759210425026442780, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + objectReference: {fileID: 3160958630494815367, guid: acf7640b9d258e24ab008e6d1d4103a0, type: 3} - target: {fileID: 1759210425026442780, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_Name value: MeyouSpawner @@ -280,6 +294,7 @@ Camera: near clip plane: 0.3 far clip plane: 1000 field of view: 50 + field of view: 50 orthographic: 0 orthographic size: 5 m_Depth: -1 @@ -307,6 +322,8 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: -0.0022060263, y: -0.9913281, z: 0.00029238797, w: 0.13139118} m_LocalPosition: {x: 5.26, y: 1.71, z: 5.09} + m_LocalRotation: {x: -0.0022060263, y: -0.9913281, z: 0.00029238797, w: 0.13139118} + m_LocalPosition: {x: 5.26, y: 1.71, z: 5.09} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -1022,6 +1039,142 @@ MonoBehaviour: m_sendNavigationEvents: 1 m_DragThreshold: 10 --- !u!4 &1265799335 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1265799332} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1265799332 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1265799335} + - component: {fileID: 1265799334} + - component: {fileID: 1265799333} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1265799333 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1265799332} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1265799334 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1265799332} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1265799335 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1265799332} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1265799332 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1265799335} + - component: {fileID: 1265799334} + - component: {fileID: 1265799333} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1265799333 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1265799332} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1265799334 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1265799332} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1265799335 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1304,6 +1457,7 @@ Transform: m_GameObject: {fileID: 1516540774} serializedVersion: 2 m_LocalRotation: {x: 0.11671531, y: 0.8710599, z: -0.40618184, w: 0.25029698} + m_LocalRotation: {x: 0.11671531, y: 0.8710599, z: -0.40618184, w: 0.25029698} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -1370,6 +1524,109 @@ MonoBehaviour: m_DynamicPixelsPerUnit: 1 m_PresetInfoIsWorld: 0 --- !u!223 &1667254272 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1667254269} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 0 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1667254273 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1667254269} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1075756284} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} + m_LocalEulerAnglesHint: {x: 50, y: 147.936, z: 0} +--- !u!1 &1667254269 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1667254273} + - component: {fileID: 1667254272} + - component: {fileID: 1667254271} + - component: {fileID: 1667254270} + m_Layer: 5 + m_Name: Menu + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1667254270 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1667254269} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1667254271 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1667254269} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1667254272 Canvas: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1713,6 +1970,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: spawner: {fileID: 865317045} + spawner: {fileID: 865317045} --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/RangeTrial.unity b/Assets/Scenes/RangeTrial.unity index 4aaf7f1865972ebe64adf69c2f4d60be44691349..535db4b02e05f8428ac71942f5b171fbe7366ec8 100644 --- a/Assets/Scenes/RangeTrial.unity +++ b/Assets/Scenes/RangeTrial.unity @@ -315,46 +315,57 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1051977690} m_Modifications: + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 3591250020953139189, guid: 45d093060f1209645afa35de3e803176, type: 3} - target: {fileID: 3591250020953139189, guid: 45d093060f1209645afa35de3e803176, type: 3} propertyPath: m_Name value: RangeTrialEvaluator @@ -366,6 +377,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 45d093060f1209645afa35de3e803176, type: 3} --- !u!114 &789751484 stripped MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2378676397367262812, guid: 45d093060f1209645afa35de3e803176, type: 3} m_CorrespondingSourceObject: {fileID: 2378676397367262812, guid: 45d093060f1209645afa35de3e803176, type: 3} m_PrefabInstance: {fileID: 789751483} m_PrefabAsset: {fileID: 0} @@ -377,6 +389,7 @@ MonoBehaviour: m_EditorClassIdentifier: --- !u!4 &789751485 stripped Transform: + m_CorrespondingSourceObject: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} m_CorrespondingSourceObject: {fileID: 197942380306783007, guid: 45d093060f1209645afa35de3e803176, type: 3} m_PrefabInstance: {fileID: 789751483} m_PrefabAsset: {fileID: 0} @@ -409,6 +422,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: aabac0300ef772447b1ce154fe87b071, type: 3} m_Name: m_EditorClassIdentifier: +<<<<<<< HEAD statsOutputFile: P:\evolution-snapshots\stats.csv snapshotPath: P:\evolution-snapshots snapshotRate: 1 @@ -422,6 +436,7 @@ MonoBehaviour: baseGene: {fileID: 1080464700} evolver: {fileID: 1650731194} trialCamera: {fileID: 1210065937} + trialCamera: {fileID: 1210065937} --- !u!4 &1051977690 Transform: m_ObjectHideFlags: 0 @@ -488,6 +503,7 @@ MonoBehaviour: gene: '{"Generation":1306,"NbPositions":4,"MovementSpeed":0.702799857,"Head":{"connections":{"NegZ":{"Positions":[{"x":9.88361549,"y":27.9677124},{"x":87.20232,"y":-71.30896},{"x":43.4345131,"y":-38.61641},{"x":45.78688,"y":-13.2397709}],"Part":{"connections":{"PosX":{"Positions":[{"x":26.3152714,"y":-19.998003},{"x":8.61035,"y":-42.09449},{"x":-32.89131,"y":-43.1509628},{"x":-29.0774727,"y":-41.69906}],"Part":{"connections":{},"ScaleX":0.2,"ScaleY":3.0,"ScaleZ":0.2}},"NegX":{"Positions":[{"x":47.06098,"y":-13.00554},{"x":-3.32960939,"y":8.159893},{"x":-23.2564716,"y":14.4273787},{"x":-59.5468025,"y":-25.0913811}],"Part":{"connections":{},"ScaleX":0.2,"ScaleY":3.0,"ScaleZ":0.2}},"PosY":{"Positions":[{"x":-6.01505947,"y":-11.6544046},{"x":-38.6122169,"y":-1.85086846},{"x":83.75655,"y":-12.9996643},{"x":-39.3320541,"y":-27.8323021}],"Part":{"connections":{"PosX":{"Positions":[{"x":28.9703121,"y":5.668328},{"x":41.0553436,"y":-18.9213142},{"x":21.2189941,"y":-24.60537},{"x":-44.74871,"y":-18.8411236}],"Part":{"connections":{},"ScaleX":0.2,"ScaleY":3.0,"ScaleZ":0.2}},"NegX":{"Positions":[{"x":70.35082,"y":-3.93944263},{"x":0.08380985,"y":15.9638319},{"x":-15.3801517,"y":24.4730072},{"x":-30.0638866,"y":51.4248047}],"Part":{"connections":{},"ScaleX":0.2,"ScaleY":3.0,"ScaleZ":0.2}}},"ScaleX":2.0,"ScaleY":2.0,"ScaleZ":2.0}}},"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_CorrespondingSourceObject: {fileID: 1201210948483722431, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} m_PrefabInstance: {fileID: 1832238219} m_PrefabAsset: {fileID: 0} @@ -605,6 +621,7 @@ MonoBehaviour: trialManager: {fileID: 1051977689} --- !u!4 &1220571982 stripped Transform: + m_CorrespondingSourceObject: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} m_CorrespondingSourceObject: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} m_PrefabInstance: {fileID: 1832238219} m_PrefabAsset: {fileID: 0} @@ -709,50 +726,63 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1051977690} m_Modifications: + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalPosition.y value: 20 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1119984720830485686, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 1201210948483722431, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} - target: {fileID: 1201210948483722431, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: meyouPrefab value: objectReference: {fileID: 3160958630494815367, guid: acf7640b9d258e24ab008e6d1d4103a0, type: 3} + - target: {fileID: 1759210425026442780, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} + objectReference: {fileID: 3160958630494815367, guid: acf7640b9d258e24ab008e6d1d4103a0, type: 3} - target: {fileID: 1759210425026442780, guid: f3a901f06ce4e504da9c1272fcbd5d90, type: 3} propertyPath: m_Name value: MeyouSpawner diff --git a/Assets/Scenes/RangeTrialBody.unity b/Assets/Scenes/RangeTrialBody.unity index edfad5a171e60623515200ae5762f79e59c077a9..403d4766025d39153ed63217e541be2c8396355f 100644 --- a/Assets/Scenes/RangeTrialBody.unity +++ b/Assets/Scenes/RangeTrialBody.unity @@ -230,9 +230,9 @@ MonoBehaviour: snapshotRate: 1 startupDelay: 500 animationStartDelay: 1000 - generationDuration: 25 + generationDuration: 5 generationSize: 200 - bulkSize: 50 + bulkSize: 200 spawner: {fileID: 1094373159} evaluator: {fileID: 789751484} baseGene: {fileID: 1080464700} @@ -325,6 +325,7 @@ GameObject: - component: {fileID: 1210065935} - component: {fileID: 1210065934} - component: {fileID: 1210065937} + - component: {fileID: 1210065938} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -400,7 +401,7 @@ Transform: 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: 32.1, z: -23.1} + m_LocalPosition: {x: 19, y: 30, z: -15} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -418,13 +419,25 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c201c02a3b4cc05558c878762b55f0d5, type: 3} m_Name: m_EditorClassIdentifier: - trialManager: {fileID: 1051977689} + trialManager: {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 &1547792023 +--- !u!1 &1468873930 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -432,22 +445,22 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1547792024} - - component: {fileID: 1547792025} + - component: {fileID: 1468873931} + - component: {fileID: 1468873932} m_Layer: 0 - m_Name: GameObject + m_Name: Mutator m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &1547792024 +--- !u!4 &1468873931 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1547792023} + m_GameObject: {fileID: 1468873930} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} @@ -456,13 +469,13 @@ Transform: m_Children: [] m_Father: {fileID: 1650731193} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1547792025 +--- !u!114 &1468873932 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1547792023} + m_GameObject: {fileID: 1468873930} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 4ceb29f2adccd0d2c96b817c8d149c7b, type: 3} @@ -471,9 +484,9 @@ MonoBehaviour: mutationRate: 0.1 movementMutationAmplitude: 30 speedMutationAmplitude: 0.5 - mutationSizeAmplitude: 0.5 + mutationSizeAmplitude: 2 sizeMutationRate: 0.1 - bodyMutationRate: 0.1 + bodyMutationRate: 0.02 --- !u!1 &1650731191 GameObject: m_ObjectHideFlags: 0 @@ -504,7 +517,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 1547792024} + - {fileID: 1468873931} m_Father: {fileID: 1051977690} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1650731194 @@ -519,7 +532,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f754e9b109a1d927fa0fd4f60fdfbf91, type: 3} m_Name: m_EditorClassIdentifier: - mutator: {fileID: 1547792025} + mutator: {fileID: 1468873932} --- !u!1001 &1832238219 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Meyou/Gene.cs b/Assets/Scripts/Meyou/Gene.cs index 485b9f6c2a54af6937e5005c58e891d5977a127f..2f76ef52b9d5f74a67a5dfbcec4f9821257c3496 100644 --- a/Assets/Scripts/Meyou/Gene.cs +++ b/Assets/Scripts/Meyou/Gene.cs @@ -81,7 +81,7 @@ namespace Meyou public static Gene DebugGetSample() { var positions = new List<SerializableVector2> - { + { new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), diff --git a/Assets/Scripts/Mutation/BodyMutator.cs b/Assets/Scripts/Mutation/BodyMutator.cs index e803da8dc3990d1968881dfaa348d31441449d99..ce79a779e8e0c4d1749b9823ad657dac2d1bb0d2 100644 --- a/Assets/Scripts/Mutation/BodyMutator.cs +++ b/Assets/Scripts/Mutation/BodyMutator.cs @@ -25,7 +25,7 @@ namespace Mutation /// </summary> public float bodyMutationRate = 0.1f; - public void Start() + public new void Start() { base.Start(); diff --git a/Assets/Scripts/Mutation/MovementMutator.cs b/Assets/Scripts/Mutation/MovementMutator.cs index 17c3538236f8399b660c2620fcabb6389c117016..4e6bd1e9f038d9cbb3e105e3b58d0064eae9c2d7 100644 --- a/Assets/Scripts/Mutation/MovementMutator.cs +++ b/Assets/Scripts/Mutation/MovementMutator.cs @@ -9,6 +9,7 @@ namespace Mutation /// <summary> /// Mutation class that mutate the movement of a Meyou /// </summary> + public class MovementMutator : RecursiveMutator { /// <summary> @@ -71,6 +72,7 @@ namespace Mutation if (_random.NextDouble() < mutationRate) { // Mutate the speed with a random value between -_mutationSpeedAmplitude and _mutationSpeedAmplitude + Gene.MovementSpeed += (float)((_random.NextDouble() * 2f - 1f) * speedMutationAmplitude); } // Return the mutated speed diff --git a/Assets/Scripts/SaveFile.cs b/Assets/Scripts/SaveFile.cs new file mode 100644 index 0000000000000000000000000000000000000000..1b240bc5cebe7533eb051dd673eeda4a64d0fbd5 --- /dev/null +++ b/Assets/Scripts/SaveFile.cs @@ -0,0 +1,92 @@ +using UnityEngine; +using System; +using System.IO; +using Meyou; +using System.Linq; +using System.Collections.Generic; + +namespace Save +{ + public class SaveFile + { + public SaveFile() { } + + public void SaveGene(Gene _gene) + { + // serialize the gene + string JSON = Newtonsoft.Json.JsonConvert.SerializeObject(_gene); + + // get the current date and time + DateTime now = DateTime.Now; + + // create the file name with the date and time + string fileName = now.ToString("yyyy-MM-dd_HH-mm-ss") + "_Meyou.json"; + string saveDoc = "Meyou"; + + string documentsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); + string filePath = Path.Combine(documentsFolder, saveDoc); + + // check if directory exists + if (!Directory.Exists(filePath)) + { + Directory.CreateDirectory(filePath); + } + + filePath = Path.Combine(filePath, fileName); + File.WriteAllText(Application.persistentDataPath + "/SaveFile.json", JSON); + File.WriteAllText(filePath, JSON); + } + + public Gene[] LoadGene() + { + // load all the files and order them by date + string saveDoc = "Meyou"; + string documentsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); + string directoryPath = Path.Combine(documentsFolder, saveDoc); + List<string> fileContents = LoadFilesByTime(directoryPath); + + // make them into genes + Gene[] genes = new Gene[fileContents.Count]; + int loopCount = 0; + + foreach (var content in fileContents) + { + //get the JSON from the file + string JSON = File.ReadAllText(Application.persistentDataPath + "/SaveFile.json"); + + genes[loopCount] = Newtonsoft.Json.JsonConvert.DeserializeObject<Gene>(JSON); + loopCount++; + } + + return genes; + } + + static List<string> LoadFilesByTime(string directoryPath) + { + List<string> fileContents = new List<string>(); + + try + { + // Get all files in the directory + DirectoryInfo directory = new DirectoryInfo(directoryPath); + FileInfo[] files = directory.GetFiles(); + + // Order files by last modified time + files = files.OrderByDescending(f => f.LastWriteTime).ToArray(); + + // Read content of each file + foreach (var file in files) + { + string content = File.ReadAllText(file.FullName); + fileContents.Add($"File: {file.Name}, Last Modified: {file.LastWriteTime}\n{content}"); + } + } + catch (Exception ex) + { + Console.WriteLine($"An error occurred: {ex.Message}"); + } + + return fileContents; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SaveFile.cs.meta b/Assets/Scripts/SaveFile.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5b755514687e3d46bff62827a93e81a560d9c584 --- /dev/null +++ b/Assets/Scripts/SaveFile.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bccd6d93deaaa3c8f91cd2c16ccf8f33 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trials/Generators/DefaultEvolver.cs b/Assets/Scripts/Trials/Generators/DefaultEvolver.cs index 8290488e8331fc1300ee5c1f6ca99e883fdcd637..a5771aedcd508bc62b1408edd365dd65c518baa3 100644 --- a/Assets/Scripts/Trials/Generators/DefaultEvolver.cs +++ b/Assets/Scripts/Trials/Generators/DefaultEvolver.cs @@ -4,6 +4,7 @@ using System.Linq; using Meyou; using Mutation; using Random = System.Random; +using Save; namespace Trials.Generators { diff --git a/Assets/Scripts/Trials/TrialManager.cs b/Assets/Scripts/Trials/TrialManager.cs index b10ef58c64aef3d5fa14235c88826cc03c3c76a9..c60409816058a8a7df3bbb58a4db63e327304559 100644 --- a/Assets/Scripts/Trials/TrialManager.cs +++ b/Assets/Scripts/Trials/TrialManager.cs @@ -37,7 +37,7 @@ namespace Trials /// 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; @@ -121,7 +121,7 @@ namespace Trials _currentGeneration = -1; _toBeSimulated = generationSize; _state = ManagerStates.Evolving; - + StartGeneration(baseGene); } @@ -250,17 +250,17 @@ namespace Trials // Créé une sauvegarde du meilleur gène de la génération if (snapshotPath != "" && _currentGeneration % snapshotRate == 0) WriteSnapshot(); - + StartGeneration(evolver); } else if (_currentGeneration == 0) SpawnBulk(baseGene); else SpawnBulk(evolver); } - - + + private void StartGeneration(GeneGenerator generator) { _currentGenerationMeyou.Clear(); @@ -269,17 +269,17 @@ namespace Trials 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); - _currentMeyouBulk = spawner.SpawnBulk(generationSize-_toBeSimulated, meyouNb, generator, evaluator); + _currentMeyouBulk = spawner.SpawnBulk(generationSize - _toBeSimulated, meyouNb, generator, evaluator); _toBeSimulated -= meyouNb; _currentBest = _currentMeyouBulk[0]; @@ -300,11 +300,11 @@ namespace Trials { foreach (var m in _currentMeyouBulk) Destroy(m.GameObject()); } - - - - - + + + + + // Start is called before the first frame update private void Start() { @@ -348,23 +348,23 @@ namespace Trials switch (_state) { case ManagerStates.StartupWaiting: - { - if (DateTime.Now - _evolutionStartDate > TimeSpan.FromMilliseconds(startupDelay) / Time.timeScale) { - StartEvolution(); - } + if (DateTime.Now - _evolutionStartDate > TimeSpan.FromMilliseconds(startupDelay) / Time.timeScale) + { + StartEvolution(); + } - break; - } + break; + } case ManagerStates.Evolving: - { - if (DateTime.Now - _lastBulkStartDate > TimeSpan.FromSeconds(generationDuration) / Time.timeScale) { - RinceAndRepeat(); - } + if (DateTime.Now - _lastBulkStartDate > TimeSpan.FromSeconds(generationDuration) / Time.timeScale) + { + RinceAndRepeat(); + } - break; - } + break; + } } diff --git a/Assets/Scripts/Trials/TrialUI.cs b/Assets/Scripts/Trials/TrialUI.cs index 377bf7f9f5470386adf6a5ea5d98a249aade1897..e85bdc5f51d3315be507dc84dbf6945c67970e3b 100644 --- a/Assets/Scripts/Trials/TrialUI.cs +++ b/Assets/Scripts/Trials/TrialUI.cs @@ -6,7 +6,7 @@ using UnityEngine.UI; namespace Trials { - public class TrialUI: MonoBehaviour + public class TrialUI : MonoBehaviour { public TrialManager manager; public Image progressionBar; @@ -24,7 +24,7 @@ namespace Trials private void UpdateProgressionBar() { - var targetWidth = (int) (manager.GetGenerationProgression() * Screen.width); + var targetWidth = (int)(manager.GetGenerationProgression() * Screen.width); var targetPosition = new Vector3(targetWidth / 2, -55); progressionBar.rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, targetWidth);