diff --git a/Assets/AudioKata/Prefabs/DebugPlayer.prefab b/Assets/AudioKata/Prefabs/DebugPlayer.prefab index d5072dc0..c029f2df 100644 --- a/Assets/AudioKata/Prefabs/DebugPlayer.prefab +++ b/Assets/AudioKata/Prefabs/DebugPlayer.prefab @@ -526,6 +526,11 @@ PrefabInstance: propertyPath: handType value: 2 objectReference: {fileID: 0} + - target: {fileID: 1666709261117039964, guid: 2942a21401a861746b6c0d436c5815c1, + type: 3} + propertyPath: gunMaterial + value: + objectReference: {fileID: 2100000, guid: c2ab1f4105630ab4cb06edcff6e903cb, type: 2} - target: {fileID: 1666709261117039964, guid: 2942a21401a861746b6c0d436c5815c1, type: 3} propertyPath: gunTrailManager @@ -712,6 +717,11 @@ PrefabInstance: propertyPath: handType value: 1 objectReference: {fileID: 0} + - target: {fileID: 1666709261117039964, guid: 2942a21401a861746b6c0d436c5815c1, + type: 3} + propertyPath: gunMaterial + value: + objectReference: {fileID: 2100000, guid: 0b53c5d351c35704583bc86d74cf7471, type: 2} - target: {fileID: 1666709261117039964, guid: 2942a21401a861746b6c0d436c5815c1, type: 3} propertyPath: gunTrailManager diff --git a/Assets/AudioKata/Prefabs/Pages/Settings/SettingColorPicker.prefab b/Assets/AudioKata/Prefabs/Pages/Settings/SettingColorPicker.prefab new file mode 100644 index 00000000..8171f145 --- /dev/null +++ b/Assets/AudioKata/Prefabs/Pages/Settings/SettingColorPicker.prefab @@ -0,0 +1,364 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3256957734412286033 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8329072073024516413} + - component: {fileID: 8649361243547566873} + - component: {fileID: 4795036804523424932} + - component: {fileID: 4007703050341204625} + m_Layer: 5 + m_Name: ColorPicker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8329072073024516413 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3256957734412286033} + 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: 6748346447434165752} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 203.76999, y: 0} + m_SizeDelta: {x: 404.44, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8649361243547566873 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3256957734412286033} + m_CullTransparentMesh: 1 +--- !u!114 &4795036804523424932 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3256957734412286033} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Texture: {fileID: 2800000, guid: d6200033707e00b48954c55d4784e054, type: 3} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!114 &4007703050341204625 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3256957734412286033} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 148a2f1730164db493d3c1b3c2a3f01c, type: 3} + m_Name: + m_EditorClassIdentifier: + hueImage: {fileID: 4795036804523424932} + hueTexture: {fileID: 2800000, guid: d6200033707e00b48954c55d4784e054, type: 3} +--- !u!1 &5058055937950736560 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6748346447434165752} + - component: {fileID: 4596775207724112533} + m_Layer: 5 + m_Name: SettingColorPicker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6748346447434165752 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5058055937950736560} + 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: 8125189699215648571} + - {fileID: 5357244903851936119} + - {fileID: 8329072073024516413} + 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.5, y: 0.5} +--- !u!114 &4596775207724112533 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5058055937950736560} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e301af5a8d61498990f8de95e3ac575b, type: 3} + m_Name: + m_EditorClassIdentifier: + colorPicker: {fileID: 4007703050341204625} + selectedColorImage: {fileID: 6030633045267444157} + displayNameLabel: {fileID: 3794331111414666930} +--- !u!1 &9202431194417966167 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5357244903851936119} + - component: {fileID: 9216722518556760306} + - component: {fileID: 6030633045267444157} + m_Layer: 5 + m_Name: SelectedColor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5357244903851936119 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9202431194417966167} + 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: 6748346447434165752} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -40, y: 0} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &9216722518556760306 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9202431194417966167} + m_CullTransparentMesh: 1 +--- !u!114 &6030633045267444157 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9202431194417966167} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 6842e05038768bc449fd0fbc194dfc76, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1001 &2959281589107803213 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 6748346447434165752} + m_Modifications: + - target: {fileID: 2141838651368821503, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: 'm_ActiveFontFeatures.Array.data[0]' + value: 1801810542 + objectReference: {fileID: 0} + - target: {fileID: 5147179209850649711, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_Name + value: SettingDisplayName Variant + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_RootOrder + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_SizeDelta.x + value: 300 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_SizeDelta.y + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -250 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a5cbf6748c79bff498db1be79416e8ed, type: 3} +--- !u!114 &3794331111414666930 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2141838651368821503, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + m_PrefabInstance: {fileID: 2959281589107803213} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &8125189699215648571 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6472519384575681398, guid: a5cbf6748c79bff498db1be79416e8ed, + type: 3} + m_PrefabInstance: {fileID: 2959281589107803213} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/AudioKata/Prefabs/Pages/Settings/SettingColorPicker.prefab.meta b/Assets/AudioKata/Prefabs/Pages/Settings/SettingColorPicker.prefab.meta new file mode 100644 index 00000000..8326f468 --- /dev/null +++ b/Assets/AudioKata/Prefabs/Pages/Settings/SettingColorPicker.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f377c03105e4cbd4eb0344fa908b0b17 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AudioKata/Prefabs/Pages/Settings/Settings Menu.prefab b/Assets/AudioKata/Prefabs/Pages/Settings/Settings Menu.prefab index a1a7e65d..4052136e 100644 --- a/Assets/AudioKata/Prefabs/Pages/Settings/Settings Menu.prefab +++ b/Assets/AudioKata/Prefabs/Pages/Settings/Settings Menu.prefab @@ -88,6 +88,8 @@ MonoBehaviour: sliderTemplate: {fileID: 5295334611921220266} sliderWithButtonTemplate: {fileID: 9137275556628441187} toggleTemplate: {fileID: 3164181234658569601} + colorPickerTemplate: {fileID: 4596775207724112533, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} calibrationPageVisual: {fileID: 0} btnCalibrationVisualText: m_TableReference: diff --git a/Assets/AudioKata/Prefabs/Pages/Settings/SettingsCategory.prefab b/Assets/AudioKata/Prefabs/Pages/Settings/SettingsCategory.prefab index 37c7a372..0b01ca9e 100644 --- a/Assets/AudioKata/Prefabs/Pages/Settings/SettingsCategory.prefab +++ b/Assets/AudioKata/Prefabs/Pages/Settings/SettingsCategory.prefab @@ -116,6 +116,7 @@ RectTransform: - {fileID: 8554897230442840146} - {fileID: 4687060596772002459} - {fileID: 3807853389008018828} + - {fileID: 4716051212628107225} m_Father: {fileID: 1822219801422699595} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -1803,6 +1804,130 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 1317731396093653094} m_PrefabAsset: {fileID: 0} +--- !u!1001 &2077345533427102241 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 5312966560048128036} + m_Modifications: + - target: {fileID: 5058055937950736560, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_Name + value: SettingColorPicker + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f377c03105e4cbd4eb0344fa908b0b17, type: 3} +--- !u!224 &4716051212628107225 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6748346447434165752, guid: f377c03105e4cbd4eb0344fa908b0b17, + type: 3} + m_PrefabInstance: {fileID: 2077345533427102241} + m_PrefabAsset: {fileID: 0} --- !u!1001 &2887889320543469604 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/AudioKata/Prefabs/XR Camera Rig.prefab b/Assets/AudioKata/Prefabs/XR Camera Rig.prefab index fc75d0db..d88d7bfd 100644 --- a/Assets/AudioKata/Prefabs/XR Camera Rig.prefab +++ b/Assets/AudioKata/Prefabs/XR Camera Rig.prefab @@ -1092,6 +1092,11 @@ PrefabInstance: propertyPath: handType value: 1 objectReference: {fileID: 0} + - target: {fileID: 1666709261117039964, guid: 2942a21401a861746b6c0d436c5815c1, + type: 3} + propertyPath: gunMaterial + value: + objectReference: {fileID: 2100000, guid: 0b53c5d351c35704583bc86d74cf7471, type: 2} - target: {fileID: 1666709261117039964, guid: 2942a21401a861746b6c0d436c5815c1, type: 3} propertyPath: gunTrailManager @@ -1265,6 +1270,11 @@ PrefabInstance: propertyPath: handType value: 2 objectReference: {fileID: 0} + - target: {fileID: 1666709261117039964, guid: 2942a21401a861746b6c0d436c5815c1, + type: 3} + propertyPath: gunMaterial + value: + objectReference: {fileID: 2100000, guid: c2ab1f4105630ab4cb06edcff6e903cb, type: 2} - target: {fileID: 1666709261117039964, guid: 2942a21401a861746b6c0d436c5815c1, type: 3} propertyPath: gunTrailManager diff --git a/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings Shared Data.asset b/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings Shared Data.asset index e863c237..7d17c24b 100644 --- a/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings Shared Data.asset +++ b/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings Shared Data.asset @@ -119,6 +119,14 @@ MonoBehaviour: m_Key: setting_description_telegraphBoost m_Metadata: m_Items: [] + - m_Id: 2512391307780096 + m_Key: setting_description_rightHandColor + m_Metadata: + m_Items: [] + - m_Id: 2512450195808256 + m_Key: setting_description_leftHandColor + m_Metadata: + m_Items: [] m_Metadata: m_Items: [] m_KeyGenerator: diff --git a/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings_en.asset b/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings_en.asset index 39288089..8f855290 100644 --- a/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings_en.asset +++ b/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings_en.asset @@ -129,6 +129,14 @@ MonoBehaviour: m_Localized: Multiplies target colors to make them appear brighter. m_Metadata: m_Items: [] + - m_Id: 2512391307780096 + m_Localized: Right Hand Color + m_Metadata: + m_Items: [] + - m_Id: 2512450195808256 + m_Localized: Left Hand Color + m_Metadata: + m_Items: [] references: version: 2 RefIds: [] diff --git a/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings_fr.asset b/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings_fr.asset index 6d0e5662..66b60ad6 100644 --- a/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings_fr.asset +++ b/Assets/AudioKata/ScriptableObjects/Localization/AKSettingsStrings_fr.asset @@ -131,6 +131,14 @@ MonoBehaviour: m_Localized: Multiplie les couleurs cibles pour les rendre plus lumineuses. m_Metadata: m_Items: [] + - m_Id: 2512391307780096 + m_Localized: Couleur Main Gauche + m_Metadata: + m_Items: [] + - m_Id: 2512450195808256 + m_Localized: Couleur Main Droite + m_Metadata: + m_Items: [] references: version: 2 RefIds: [] diff --git a/Assets/AudioKata/Scripts/KataGun.cs b/Assets/AudioKata/Scripts/KataGun.cs index 4b524fbe..d9bd01e0 100644 --- a/Assets/AudioKata/Scripts/KataGun.cs +++ b/Assets/AudioKata/Scripts/KataGun.cs @@ -26,6 +26,7 @@ public class KataGun : MonoBehaviour, IRequireHandColors [SerializeField] Rigidbody gunBody; [SerializeField] Collider rigidBodyCollider; [SerializeField] bool temporalAimAssistEnabled; + [SerializeField] Material gunMaterial; public TargetHandType handType; public Transform gunTip; public Color gunColor; @@ -98,6 +99,7 @@ public void OnHandColorsChanged() { gunColor = VisualConfig.GetColorForHandType(handType); gunParticleController.UpdateColors(gunColor); + gunMaterial.color = gunColor; } public static bool TryGetGun(TargetHandType handType, out KataGun kataGun) => diff --git a/Assets/AudioKata/Scripts/Settings/UserPreferences.cs b/Assets/AudioKata/Scripts/Settings/UserPreferences.cs index 69224645..4cf28419 100644 --- a/Assets/AudioKata/Scripts/Settings/UserPreferences.cs +++ b/Assets/AudioKata/Scripts/Settings/UserPreferences.cs @@ -3,6 +3,7 @@ using AudioKata.UI.Pages.SongSelect; using TargetPreview.ScriptableObjects; using TargetPreview.Scripts; +using TargetPreview.Targets; using UnityEngine; namespace AudioKata.Settings @@ -137,12 +138,12 @@ private static (bool, string) ValidateSoundPackName(string soundPackName) new Color(1f, 0.3993749f, 0f, 1f), //Orange SettingsCategory.Customization, "leftHandColor", - onValueChanged: value => VisualConfig.Instance.leftHandColor = value, + onValueChanged: value => VisualConfig.SetHandColor(TargetHandType.Left, value), metaData: new KataPrefMetaData() { DisplayName = "Left Hand Color", Description = "Color of the left hand.", - SettingsDisplayType = SettingsDisplay.Hide // Hiding until we can get a color picker added + SettingsDisplayType = SettingsDisplay.ReadWrite } ); @@ -150,12 +151,31 @@ private static (bool, string) ValidateSoundPackName(string soundPackName) new Color(0f, 0.6785717f, 1f, 1f), //Orange SettingsCategory.Customization, "rightHandColor", - onValueChanged: value => VisualConfig.Instance.rightHandColor = value, + onValueChanged: value => VisualConfig.SetHandColor(TargetHandType.Right, value), metaData: new KataPrefMetaData() { DisplayName = "Right Hand Color", Description = "Color of the right hand.", - SettingsDisplayType = SettingsDisplay.Hide // Hiding until we can get a color picker added + SettingsDisplayType = SettingsDisplay.ReadWrite + } + ); + + /// + /// WIP - deprecating. Audio time comes from the main song playing and is the source of truth. + /// Positive makes the audio start later, + /// negative makes the audio start earlier. + /// + public static KataPref AudioOffsetMs = new( + 0, + SettingsCategory.Calibration, + "audioOffsetMs", + onValueChanged: value => TimeController.AudioOffsetMs = value, + metaData: new KataPrefMetaData() + { + DisplayName = "Audio Offset (ms)", + Description = "Offset to be applied to audio. Positive makes the audio play later, negative makes the audio play earlier.\nIf you have audio delay, make this negative", + NumericRange = new KataNumericRange(-100, 100, true), + SettingsDisplayType = SettingsDisplay.Hide } ); diff --git a/Assets/AudioKata/Scripts/UI/Pages/Settings/KataColorPicker.cs b/Assets/AudioKata/Scripts/UI/Pages/Settings/KataColorPicker.cs new file mode 100644 index 00000000..eca209eb --- /dev/null +++ b/Assets/AudioKata/Scripts/UI/Pages/Settings/KataColorPicker.cs @@ -0,0 +1,27 @@ +using System; +using AudioKata.Settings; +using TMPro; +using UnityEngine; +using UnityEngine.UI; + +namespace AudioKata.UI.Pages.Settings +{ + public class KataColorPicker : MonoBehaviour + { + [SerializeField] UIColorPicker colorPicker; + [SerializeField] Image selectedColorImage; + [SerializeField] TMP_Text displayNameLabel; + public void Setup(string metaDisplayName, KataColor settingValue, Func colorChangedDelegate) + { + displayNameLabel.SetText(metaDisplayName); + selectedColorImage.color = settingValue; + colorPicker.OnColorPicked += (color) => + { + if (colorChangedDelegate(color)) + { + selectedColorImage.color = color; + } + }; + } + } +} \ No newline at end of file diff --git a/Assets/AudioKata/Scripts/UI/Pages/Settings/KataColorPicker.cs.meta b/Assets/AudioKata/Scripts/UI/Pages/Settings/KataColorPicker.cs.meta new file mode 100644 index 00000000..25882918 --- /dev/null +++ b/Assets/AudioKata/Scripts/UI/Pages/Settings/KataColorPicker.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e301af5a8d61498990f8de95e3ac575b +timeCreated: 1739637987 \ No newline at end of file diff --git a/Assets/AudioKata/Scripts/UI/Pages/Settings/SettingsControlsFactory.cs b/Assets/AudioKata/Scripts/UI/Pages/Settings/SettingsControlsFactory.cs index 75988b78..f86178d7 100644 --- a/Assets/AudioKata/Scripts/UI/Pages/Settings/SettingsControlsFactory.cs +++ b/Assets/AudioKata/Scripts/UI/Pages/Settings/SettingsControlsFactory.cs @@ -1,6 +1,7 @@ using System; using AudioKata.Settings; using UnityEngine; +using Object = UnityEngine.Object; using UnityEngine.Localization; namespace AudioKata.UI.Pages.Settings @@ -12,6 +13,7 @@ public class SettingsControlsFactory : MonoBehaviour [SerializeField] private SettingsSliderUI sliderTemplate; [SerializeField] private SettingsSliderUI sliderWithButtonTemplate; [SerializeField] private SettingsToggleUI toggleTemplate; + [SerializeField] private KataColorPicker colorPickerTemplate; [SerializeField] private CalibrationMenuPage calibrationPageVisual; [SerializeField] private LocalizedString btnCalibrationVisualText; @@ -90,6 +92,11 @@ public GameObject CreateControl(SettingsCategory categoryType, string key, Trans return CreateInputField(categoryType, key, parent, meta)?.gameObject; } + if (settingTypeName == nameof(KataColor)) + { + return CreateColorPicker(categoryType, key, parent, meta)?.gameObject; + } + if (settingTypeName is nameof(Single)) { if (meta.NumericRange == null) @@ -123,6 +130,24 @@ public GameObject CreateControl(SettingsCategory categoryType, string key, Trans return null; } + private KataColorPicker CreateColorPicker(SettingsCategory categoryType, string key, Transform parent, KataPrefMetaData meta) + { + var colorPicker = Instantiate( + colorPickerTemplate, + parent, + false + ); + + var settingValue = KataPreferences.Settings.Get(categoryType, key); + colorPicker.Setup( + meta.DisplayName, + settingValue, + newValue => KataPreferences.Settings.Set(categoryType, key, newValue) + ); + + return colorPicker; + } + /// /// Certain settings need specific controls instead of the standard ones. Handle those cases here. /// Returns true if the given setting was handled (with the created control passed back). diff --git a/Assets/AudioKata/Scripts/UI/Pages/Settings/ShootableColorPicker.cs b/Assets/AudioKata/Scripts/UI/Pages/Settings/ShootableColorPicker.cs new file mode 100644 index 00000000..028866e9 --- /dev/null +++ b/Assets/AudioKata/Scripts/UI/Pages/Settings/ShootableColorPicker.cs @@ -0,0 +1,26 @@ +using System; +using UnityEngine; + +namespace AudioKata.UI.Pages.Settings +{ + /// + /// A shootable color picker that allows selecting a color from a texture + /// + public class ShootableColorPicker : Shootable + { + [SerializeField] Texture2D hueTexture; + + public event Action OnColorShot = delegate { }; + public override void OnShot(KataGun gun, RaycastHit raycastHit) + { + base.OnShot(gun, raycastHit); + Vector2 textureCoord = raycastHit.textureCoord; + int x = Mathf.FloorToInt(textureCoord.x * hueTexture.width); + int y = Mathf.FloorToInt(textureCoord.y * hueTexture.height); + x = Mathf.Clamp(x, 0, hueTexture.width - 1); + y = Mathf.Clamp(y, 0, hueTexture.height - 1); + Color sampledColor = hueTexture.GetPixel(x, y); + OnColorShot?.Invoke(sampledColor); + } + } +} \ No newline at end of file diff --git a/Assets/AudioKata/Scripts/UI/Pages/Settings/ShootableColorPicker.cs.meta b/Assets/AudioKata/Scripts/UI/Pages/Settings/ShootableColorPicker.cs.meta new file mode 100644 index 00000000..e8236c15 --- /dev/null +++ b/Assets/AudioKata/Scripts/UI/Pages/Settings/ShootableColorPicker.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9b67b5c383234531a0280fc03540095d +timeCreated: 1739639729 \ No newline at end of file diff --git a/Assets/AudioKata/Scripts/UI/Pages/Settings/UIColorPicker.cs b/Assets/AudioKata/Scripts/UI/Pages/Settings/UIColorPicker.cs new file mode 100644 index 00000000..bb50e37c --- /dev/null +++ b/Assets/AudioKata/Scripts/UI/Pages/Settings/UIColorPicker.cs @@ -0,0 +1,36 @@ +using System; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +namespace AudioKata.UI.Pages.Settings +{ + /// + /// Simple color picker that picks a color from a texture, similar to + /// + public class UIColorPicker : MonoBehaviour, IPointerDownHandler + { + [SerializeField] RawImage hueImage; + [SerializeField] Texture2D hueTexture; + + public event Action OnColorPicked = delegate { }; + + public void OnPointerDown(PointerEventData eventData) + { + RectTransform rectTransform = hueImage.GetComponent(); + if (RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform, eventData.position, eventData.pressEventCamera, out Vector2 localPoint)) + { + Rect rect = rectTransform.rect; + float xNormalized = Mathf.InverseLerp(rect.xMin, rect.xMax, localPoint.x); + float yNormalized = Mathf.InverseLerp(rect.yMin, rect.yMax, localPoint.y); + int x = Mathf.FloorToInt(xNormalized * hueTexture.width); + int y = Mathf.FloorToInt(yNormalized * hueTexture.height); + x = Mathf.Clamp(x, 0, hueTexture.width - 1); + y = Mathf.Clamp(y, 0, hueTexture.height - 1); + + Color sampledColor = hueTexture.GetPixel(x, y); + OnColorPicked?.Invoke(sampledColor); + } + } + } +} \ No newline at end of file diff --git a/Assets/AudioKata/Scripts/UI/Pages/Settings/UIColorPicker.cs.meta b/Assets/AudioKata/Scripts/UI/Pages/Settings/UIColorPicker.cs.meta new file mode 100644 index 00000000..50c35cfa --- /dev/null +++ b/Assets/AudioKata/Scripts/UI/Pages/Settings/UIColorPicker.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 148a2f1730164db493d3c1b3c2a3f01c +timeCreated: 1739639729 \ No newline at end of file diff --git a/Assets/AudioKata/TargetPreview/Assets/TargetPreview/ScriptableObjects/Definitions/VisualConfig.cs b/Assets/AudioKata/TargetPreview/Assets/TargetPreview/ScriptableObjects/Definitions/VisualConfig.cs index b5ba06da..eafa46aa 100644 --- a/Assets/AudioKata/TargetPreview/Assets/TargetPreview/ScriptableObjects/Definitions/VisualConfig.cs +++ b/Assets/AudioKata/TargetPreview/Assets/TargetPreview/ScriptableObjects/Definitions/VisualConfig.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using AudioKata.Scripts; +using AudioKata.Settings; using TargetPreview.Targets; using UnityEngine; @@ -102,5 +103,30 @@ public static void UnregisterForHandColorEvents(IRequireHandColors fHandColors) { handColorListeners.Remove(fHandColors); } + + public static void OnHandColorsUpdated() + { + foreach (var listener in handColorListeners) + { + listener.OnHandColorsChanged(); + } + } + + public static void SetHandColor(TargetHandType handType, KataColor value) + { + switch (handType) + { + case TargetHandType.Left: + Instance.leftHandColor = value; + break; + case TargetHandType.Right: + Instance.rightHandColor = value; + break; + case TargetHandType.None: + Instance.noHandColor = value; + break; + } + OnHandColorsUpdated(); + } } } diff --git a/Assets/AudioKata/TargetPreview/Assets/TargetPreview/Scripts/Targets/CueDart.cs b/Assets/AudioKata/TargetPreview/Assets/TargetPreview/Scripts/Targets/CueDart.cs index ec6ff0b4..9b5538d4 100644 --- a/Assets/AudioKata/TargetPreview/Assets/TargetPreview/Scripts/Targets/CueDart.cs +++ b/Assets/AudioKata/TargetPreview/Assets/TargetPreview/Scripts/Targets/CueDart.cs @@ -66,6 +66,7 @@ void OnDisable() public void OnTimeUpdated(float baseTimeMs, float audioTimeMs, float visualTimeMs, float inputTimeMs) { + startColor = VisualConfig.GetColorForHandType(handType); TargetReference? foundTarget = null; TargetReference? previousTarget = null; foreach (var cueManagerActiveCue in cueManager.ActiveCues) diff --git a/Assets/AudioKata/Textures/Sprites/UI/kata_hue_gradient.png b/Assets/AudioKata/Textures/Sprites/UI/kata_hue_gradient.png new file mode 100644 index 00000000..faa97f01 Binary files /dev/null and b/Assets/AudioKata/Textures/Sprites/UI/kata_hue_gradient.png differ diff --git a/Assets/AudioKata/Textures/Sprites/UI/kata_hue_gradient.png.meta b/Assets/AudioKata/Textures/Sprites/UI/kata_hue_gradient.png.meta new file mode 100644 index 00000000..da512c2d --- /dev/null +++ b/Assets/AudioKata/Textures/Sprites/UI/kata_hue_gradient.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: d6200033707e00b48954c55d4784e054 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: