From c7932bba79adf006858c2bbe74ae5a14f04b3fd6 Mon Sep 17 00:00:00 2001 From: DAIKI Date: Sat, 6 Jul 2024 02:26:52 +0900 Subject: [PATCH 1/8] Remove unused profiler codes --- .../InputGlyphs/Scripts/Loaders/Utils/DeviceGlyphLoader.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Loaders/Utils/DeviceGlyphLoader.cs b/InputGlyphs/Assets/InputGlyphs/Scripts/Loaders/Utils/DeviceGlyphLoader.cs index e79eac9..14a974a 100644 --- a/InputGlyphs/Assets/InputGlyphs/Scripts/Loaders/Utils/DeviceGlyphLoader.cs +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Loaders/Utils/DeviceGlyphLoader.cs @@ -3,7 +3,6 @@ using InputGlyphs.Utils; using UnityEngine; using UnityEngine.InputSystem; -using UnityEngine.Profiling; namespace InputGlyphs.Loaders.Utils { @@ -33,13 +32,9 @@ public bool LoadGlyph(Texture2D texture, IReadOnlyList activeDevice { if (TextureMaps[i].TryGetTexture(localPath, out var result)) { - Profiler.BeginSample("DeviceGlyphLoader.ResizeTexture"); texture.Reinitialize(result.width, result.height, result.format, result.mipmapCount > 0); texture.Apply(); - Profiler.EndSample(); - Profiler.BeginSample("DeviceGlyphLoader.CopyTexture"); Graphics.CopyTexture(result, texture); - Profiler.EndSample(); return true; } } From 9fa33dde3c7fdceeecd34328fc20679083647c6e Mon Sep 17 00:00:00 2001 From: DAIKI Date: Sat, 6 Jul 2024 02:28:11 +0900 Subject: [PATCH 2/8] Change package version to 0.6.1 --- InputGlyphs/Assets/InputGlyphs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InputGlyphs/Assets/InputGlyphs/package.json b/InputGlyphs/Assets/InputGlyphs/package.json index 8e8d9ac..38e95f7 100644 --- a/InputGlyphs/Assets/InputGlyphs/package.json +++ b/InputGlyphs/Assets/InputGlyphs/package.json @@ -1,7 +1,7 @@ { "name": "com.eviltwo.input-glyphs", "displayName": "Input Glyphs", - "version": "0.6.0", + "version": "0.6.1", "unity": "2022.3", "description": "Displays glyphs (icons) of keyboard & mouse or controller buttons recognized by Unity's InputSystem.", "author": { From f88bfbf014ccba22fc25ceef61d269b83704547e Mon Sep 17 00:00:00 2001 From: DAIKI Date: Sat, 6 Jul 2024 03:50:01 +0900 Subject: [PATCH 3/8] Display glyph for UI image. --- .../InputGlyphs/Samples/SampleScene.unity | 816 +++++++++-- .../SteamworksSample/SteamworksSample.unity | 1251 +++++++++++------ .../InputGlyphs.Display.TextMeshPro.asmdef | 3 +- .../Display/TextMeshPro/TextInputGlyph.cs | 23 +- .../InputGlyphs/Scripts/Display/UI.meta | 8 + .../Scripts/Display/UI/ImageGlyph.cs | 143 ++ .../Scripts/Display/UI/ImageGlyph.cs.meta | 11 + .../Display/UI/InputGlyphs.Display.UI.asmdef | 18 + .../UI/InputGlyphs.Display.UI.asmdef.meta | 7 + .../Scripts/Utils/InputLayoutPathUtility.cs | 18 + 10 files changed, 1779 insertions(+), 519 deletions(-) create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI.meta create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs.meta create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/InputGlyphs.Display.UI.asmdef create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/InputGlyphs.Display.UI.asmdef.meta diff --git a/InputGlyphs/Assets/InputGlyphs/Samples/SampleScene.unity b/InputGlyphs/Assets/InputGlyphs/Samples/SampleScene.unity index 5c4ec5a..0a1b896 100644 --- a/InputGlyphs/Assets/InputGlyphs/Samples/SampleScene.unity +++ b/InputGlyphs/Assets/InputGlyphs/Samples/SampleScene.unity @@ -201,6 +201,71 @@ MonoBehaviour: m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 m_CursorLockBehavior: 0 +--- !u!1 &111232474 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 111232475} + - component: {fileID: 111232476} + m_Layer: 5 + m_Name: Images + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &111232475 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 111232474} + 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: 1076544465} + - {fileID: 1165845526} + m_Father: {fileID: 719275435} + m_RootOrder: -1 + 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 &111232476 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 111232474} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1 &187798264 GameObject: m_ObjectHideFlags: 0 @@ -341,7 +406,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 800, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &189886321 MonoBehaviour: @@ -363,11 +428,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 'Player 1 - - Move: - - Attack: ' + m_text: Player 1 moves with and attacks with m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -462,6 +523,141 @@ MonoBehaviour: InputActionReferences: - {fileID: 1942945179757384036, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} - {fileID: -6609880655223600665, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} +--- !u!1 &275803797 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 275803798} + - component: {fileID: 275803800} + - component: {fileID: 275803799} + m_Layer: 5 + m_Name: Action Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &275803798 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 275803797} + 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: 1165845526} + m_RootOrder: -1 + 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: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &275803799 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 275803797} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: Attack + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &275803800 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 275803797} + m_CullTransparentMesh: 1 --- !u!1 &404029258 GameObject: m_ObjectHideFlags: 0 @@ -498,7 +694,7 @@ Camera: m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 - m_BackGroundColor: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 0} + m_BackGroundColor: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 1} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 @@ -584,6 +780,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 774356338} + - {fileID: 111232475} m_Father: {fileID: 187798268} m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -601,7 +798,7 @@ MonoBehaviour: m_GameObject: {fileID: 719275434} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} m_Name: m_EditorClassIdentifier: m_Padding: @@ -613,8 +810,8 @@ MonoBehaviour: m_Spacing: 0 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 0 - m_ChildControlHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 @@ -654,7 +851,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 400, y: 400} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 1} --- !u!114 &774356339 MonoBehaviour: @@ -677,12 +874,12 @@ MonoBehaviour: m_Spacing: 0 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 0 - m_ChildControlHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 ---- !u!1 &1046320015 +--- !u!1 &933883783 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -690,92 +887,541 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1046320017} - - component: {fileID: 1046320016} - m_Layer: 0 - m_Name: Directional Light + - component: {fileID: 933883784} + - component: {fileID: 933883786} + - component: {fileID: 933883785} + m_Layer: 5 + m_Name: Action Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!108 &1046320016 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1046320015} - 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 &1046320017 -Transform: +--- !u!224 &933883784 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1046320015} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} + m_GameObject: {fileID: 933883783} + 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: 1076544465} + m_RootOrder: -1 + 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: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &933883785 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 933883783} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: Move + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &933883786 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 933883783} + m_CullTransparentMesh: 1 +--- !u!1 &1046320015 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1046320017} + - component: {fileID: 1046320016} + 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 &1046320016 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1046320015} + 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 &1046320017 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1046320015} + 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_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &1076544464 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1076544465} + - component: {fileID: 1076544466} + m_Layer: 5 + m_Name: Action + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1076544465 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1076544464} + 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: 933883784} + - {fileID: 1830157633} + m_Father: {fileID: 111232475} + m_RootOrder: -1 + 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 &1076544466 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1076544464} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1165845525 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165845526} + - component: {fileID: 1165845527} + m_Layer: 5 + m_Name: Action + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1165845526 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165845525} + 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: 275803798} + - {fileID: 1347461809} + m_Father: {fileID: 111232475} + m_RootOrder: -1 + 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 &1165845527 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165845525} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1347461808 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1347461809} + - component: {fileID: 1347461811} + - component: {fileID: 1347461810} + - component: {fileID: 1347461812} + m_Layer: 5 + m_Name: Action Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1347461809 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1347461808} + 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: 1165845526} + m_RootOrder: -1 + 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: 50, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1347461810 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1347461808} + 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: 0} + m_Type: 0 + 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!222 &1347461811 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1347461808} + m_CullTransparentMesh: 1 +--- !u!114 &1347461812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1347461808} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f9fbd65c33a09a54f885eec0c2d5acf9, type: 3} + m_Name: + m_EditorClassIdentifier: + Image: {fileID: 1347461810} + PlayerInput: {fileID: 1847320111} + InputActionReference: {fileID: -6609880655223600665, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} +--- !u!1 &1830157632 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1830157633} + - component: {fileID: 1830157635} + - component: {fileID: 1830157634} + - component: {fileID: 1830157636} + m_Layer: 5 + m_Name: Action Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1830157633 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1830157632} + 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: 1076544465} + m_RootOrder: -1 + 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: 50, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1830157634 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1830157632} + 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: 0} + m_Type: 0 + 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!222 &1830157635 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1830157632} + m_CullTransparentMesh: 1 +--- !u!114 &1830157636 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1830157632} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f9fbd65c33a09a54f885eec0c2d5acf9, type: 3} + m_Name: + m_EditorClassIdentifier: + Image: {fileID: 1830157634} + PlayerInput: {fileID: 1847320111} + InputActionReference: {fileID: 1942945179757384036, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} --- !u!1 &1847320110 GameObject: m_ObjectHideFlags: 0 diff --git a/InputGlyphs/Assets/InputGlyphs/Samples/SteamworksSample/SteamworksSample.unity b/InputGlyphs/Assets/InputGlyphs/Samples/SteamworksSample/SteamworksSample.unity index 3363bea..231fc14 100644 --- a/InputGlyphs/Assets/InputGlyphs/Samples/SteamworksSample/SteamworksSample.unity +++ b/InputGlyphs/Assets/InputGlyphs/Samples/SteamworksSample/SteamworksSample.unity @@ -123,6 +123,109 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &234187254 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 234187258} + - component: {fileID: 234187257} + - component: {fileID: 234187256} + - component: {fileID: 234187255} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &234187255 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 234187254} + 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 &234187256 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 234187254} + 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 &234187257 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 234187254} + 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: 25 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &234187258 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 234187254} + 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: 1763828601} + m_Father: {fileID: 0} + m_RootOrder: 2 + 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} --- !u!1 &266021195 GameObject: m_ObjectHideFlags: 0 @@ -217,6 +320,160 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &278394321 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 278394322} + - component: {fileID: 278394325} + - component: {fileID: 278394324} + - component: {fileID: 278394323} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &278394322 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 278394321} + 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: 1526787186} + m_RootOrder: -1 + 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 &278394323 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 278394321} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 122678166f0bcb1499246674cb41d711, type: 3} + m_Name: + m_EditorClassIdentifier: + Text: {fileID: 278394324} + Material: {fileID: 2100000, guid: ea49b1babf7e91f4293973bff501c8ae, type: 2} + PlayerInput: {fileID: 1795501703} + InputActionReferences: + - {fileID: 1942945179757384036, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} + - {fileID: -6609880655223600665, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} +--- !u!114 &278394324 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 278394321} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: Player 1 moves with and attacks with + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &278394325 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 278394321} + m_CullTransparentMesh: 1 --- !u!1 &438948971 GameObject: m_ObjectHideFlags: 0 @@ -261,7 +518,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &580598656 +--- !u!1 &754266222 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -269,202 +526,35 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 580598660} - - component: {fileID: 580598659} - - component: {fileID: 580598658} - - component: {fileID: 580598657} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged + - component: {fileID: 754266225} + - component: {fileID: 754266224} + - component: {fileID: 754266223} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &580598657 -MonoBehaviour: +--- !u!81 &754266223 +AudioListener: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 580598656} + m_GameObject: {fileID: 754266222} 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 &580598658 -MonoBehaviour: +--- !u!20 &754266224 +Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 580598656} - 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 &580598659 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 580598656} - 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: 25 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &580598660 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 580598656} - 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: 701746825} - m_Father: {fileID: 0} - m_RootOrder: 2 - 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} ---- !u!1 &701746824 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 701746825} - - component: {fileID: 701746826} - m_Layer: 5 - m_Name: Panel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &701746825 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 701746824} - 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: 1383053439} - m_Father: {fileID: 580598660} - m_RootOrder: -1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -100, y: -100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &701746826 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 701746824} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 0 - m_Spacing: 0 - m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 0 - m_ChildControlHeight: 0 - m_ChildScaleWidth: 0 - m_ChildScaleHeight: 0 - m_ReverseArrangement: 0 ---- !u!1 &754266222 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 754266225} - - component: {fileID: 754266224} - - component: {fileID: 754266223} - 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 &754266223 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 754266222} - m_Enabled: 1 ---- !u!20 &754266224 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 754266222} + m_GameObject: {fileID: 754266222} m_Enabled: 1 serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 1} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 @@ -598,7 +688,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1383053438 +--- !u!1 &989226475 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -606,126 +696,91 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1383053439} - - component: {fileID: 1383053440} + - component: {fileID: 989226476} + - component: {fileID: 989226478} + - component: {fileID: 989226477} + - component: {fileID: 989226479} m_Layer: 5 - m_Name: Texts + m_Name: Action Image m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &1383053439 +--- !u!224 &989226476 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1383053438} + m_GameObject: {fileID: 989226475} 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: 2137006865} - - {fileID: 2041478294} - m_Father: {fileID: 701746825} + m_Children: [] + m_Father: {fileID: 2070899936} m_RootOrder: -1 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: 400, y: 400} - m_Pivot: {x: 0, y: 1} ---- !u!114 &1383053440 + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &989226477 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1383053438} + m_GameObject: {fileID: 989226475} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 0 - m_Spacing: 0 - m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 0 - m_ChildControlHeight: 0 - m_ChildScaleWidth: 0 - m_ChildScaleHeight: 0 - m_ReverseArrangement: 0 ---- !u!1 &1617637339 -GameObject: + 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: 0} + m_Type: 0 + 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!222 &989226478 +CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1617637341} - - component: {fileID: 1617637340} - m_Layer: 0 - m_Name: Player 2 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1617637340 + m_GameObject: {fileID: 989226475} + m_CullTransparentMesh: 1 +--- !u!114 &989226479 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1617637339} + m_GameObject: {fileID: 989226475} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} + m_Script: {fileID: 11500000, guid: f9fbd65c33a09a54f885eec0c2d5acf9, type: 3} m_Name: m_EditorClassIdentifier: - m_Actions: {fileID: -944628639613478452, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} - m_NotificationBehavior: 3 - m_UIInputModule: {fileID: 0} - m_DeviceLostEvent: - m_PersistentCalls: - m_Calls: [] - m_DeviceRegainedEvent: - m_PersistentCalls: - m_Calls: [] - m_ControlsChangedEvent: - m_PersistentCalls: - m_Calls: [] - m_ActionEvents: [] - m_NeverAutoSwitchControlSchemes: 0 - m_DefaultControlScheme: Gamepad - m_DefaultActionMap: InGame - m_SplitScreenIndex: -1 - m_Camera: {fileID: 0} ---- !u!4 &1617637341 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1617637339} - 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_RootOrder: 7 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1795501702 + Image: {fileID: 989226477} + PlayerInput: {fileID: 1795501703} + InputActionReference: {fileID: -6609880655223600665, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} +--- !u!1 &1411641333 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -733,142 +788,57 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1795501704} - - component: {fileID: 1795501703} - m_Layer: 0 - m_Name: Player 1 + - component: {fileID: 1411641334} + - component: {fileID: 1411641336} + - component: {fileID: 1411641335} + m_Layer: 5 + m_Name: Action Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &1795501703 +--- !u!224 &1411641334 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1411641333} + 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: 1429010415} + m_RootOrder: -1 + 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: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1411641335 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1795501702} + m_GameObject: {fileID: 1411641333} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: - m_Actions: {fileID: -944628639613478452, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} - m_NotificationBehavior: 3 - m_UIInputModule: {fileID: 0} - m_DeviceLostEvent: - m_PersistentCalls: - m_Calls: [] - m_DeviceRegainedEvent: - m_PersistentCalls: - m_Calls: [] - m_ControlsChangedEvent: + 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_ActionEvents: [] - m_NeverAutoSwitchControlSchemes: 0 - m_DefaultControlScheme: Keyboard&Mouse - m_DefaultActionMap: InGame - m_SplitScreenIndex: -1 - m_Camera: {fileID: 0} ---- !u!4 &1795501704 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1795501702} - 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_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2041478293 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2041478294} - - component: {fileID: 2041478297} - - component: {fileID: 2041478296} - - component: {fileID: 2041478295} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2041478294 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2041478293} - 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: 1383053439} - m_RootOrder: -1 - 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: 800, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2041478295 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2041478293} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 122678166f0bcb1499246674cb41d711, type: 3} - m_Name: - m_EditorClassIdentifier: - Text: {fileID: 2041478296} - Material: {fileID: 2100000, guid: ea49b1babf7e91f4293973bff501c8ae, type: 2} - PlayerInput: {fileID: 1617637340} - InputActionReferences: - - {fileID: 1942945179757384036, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} - - {fileID: -6609880655223600665, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} ---- !u!114 &2041478296 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2041478293} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: 'Player 2 - - Move: - - Attack: ' + m_text: Move m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -937,15 +907,15 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &2041478297 +--- !u!222 &1411641336 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2041478293} + m_GameObject: {fileID: 1411641333} m_CullTransparentMesh: 1 ---- !u!1 &2137006864 +--- !u!1 &1429010414 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -953,62 +923,173 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 2137006865} - - component: {fileID: 2137006868} - - component: {fileID: 2137006867} - - component: {fileID: 2137006866} + - component: {fileID: 1429010415} + - component: {fileID: 1429010416} m_Layer: 5 - m_Name: Text (TMP) + m_Name: Action m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &2137006865 +--- !u!224 &1429010415 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2137006864} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_GameObject: {fileID: 1429010414} + 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: 1383053439} + m_Children: + - {fileID: 1411641334} + - {fileID: 1576210590} + m_Father: {fileID: 1436905473} m_RootOrder: -1 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: 800, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2137006866 +--- !u!114 &1429010416 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2137006864} + m_GameObject: {fileID: 1429010414} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 122678166f0bcb1499246674cb41d711, type: 3} + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} m_Name: m_EditorClassIdentifier: - Text: {fileID: 2137006867} - Material: {fileID: 2100000, guid: ea49b1babf7e91f4293973bff501c8ae, type: 2} - PlayerInput: {fileID: 1795501703} - InputActionReferences: - - {fileID: 1942945179757384036, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} - - {fileID: -6609880655223600665, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} ---- !u!114 &2137006867 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1436905472 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1436905473} + - component: {fileID: 1436905474} + m_Layer: 5 + m_Name: Images + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1436905473 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1436905472} + 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: 1429010415} + - {fileID: 2070899936} + m_Father: {fileID: 1763828601} + m_RootOrder: -1 + 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 &1436905474 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1436905472} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1437242515 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1437242516} + - component: {fileID: 1437242518} + - component: {fileID: 1437242517} + m_Layer: 5 + m_Name: Action Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1437242516 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1437242515} + 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: 2070899936} + m_RootOrder: -1 + 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: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1437242517 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2137006864} + m_GameObject: {fileID: 1437242515} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -1022,11 +1103,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 'Player 1 - - Move: - - Attack: ' + m_text: Attack m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -1095,14 +1172,362 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &2137006868 +--- !u!222 &1437242518 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1437242515} + m_CullTransparentMesh: 1 +--- !u!1 &1526787185 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1526787186} + - component: {fileID: 1526787187} + m_Layer: 5 + m_Name: Texts + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1526787186 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1526787185} + 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: 278394322} + m_Father: {fileID: 1763828601} + m_RootOrder: -1 + 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: 1} +--- !u!114 &1526787187 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1526787185} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1576210589 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1576210590} + - component: {fileID: 1576210593} + - component: {fileID: 1576210592} + - component: {fileID: 1576210591} + m_Layer: 5 + m_Name: Action Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1576210590 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1576210589} + 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: 1429010415} + m_RootOrder: -1 + 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: 50, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1576210591 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1576210589} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f9fbd65c33a09a54f885eec0c2d5acf9, type: 3} + m_Name: + m_EditorClassIdentifier: + Image: {fileID: 1576210592} + PlayerInput: {fileID: 1795501703} + InputActionReference: {fileID: 1942945179757384036, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} +--- !u!114 &1576210592 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1576210589} + 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: 0} + m_Type: 0 + 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!222 &1576210593 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2137006864} + m_GameObject: {fileID: 1576210589} m_CullTransparentMesh: 1 +--- !u!1 &1763828600 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1763828601} + - component: {fileID: 1763828602} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1763828601 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1763828600} + 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: 1526787186} + - {fileID: 1436905473} + m_Father: {fileID: 234187258} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -100, y: -100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1763828602 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1763828600} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1795501702 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1795501704} + - component: {fileID: 1795501703} + m_Layer: 0 + m_Name: Player 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1795501703 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1795501702} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actions: {fileID: -944628639613478452, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} + m_NotificationBehavior: 3 + m_UIInputModule: {fileID: 0} + m_DeviceLostEvent: + m_PersistentCalls: + m_Calls: [] + m_DeviceRegainedEvent: + m_PersistentCalls: + m_Calls: [] + m_ControlsChangedEvent: + m_PersistentCalls: + m_Calls: [] + m_ActionEvents: [] + m_NeverAutoSwitchControlSchemes: 0 + m_DefaultControlScheme: Keyboard&Mouse + m_DefaultActionMap: InGame + m_SplitScreenIndex: -1 + m_Camera: {fileID: 0} +--- !u!4 &1795501704 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1795501702} + 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_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2070899935 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2070899936} + - component: {fileID: 2070899937} + m_Layer: 5 + m_Name: Action + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2070899936 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2070899935} + 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: 1437242516} + - {fileID: 989226476} + m_Father: {fileID: 1436905473} + m_RootOrder: -1 + 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 &2070899937 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2070899935} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1001 &8306618701853336496 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/InputGlyphs.Display.TextMeshPro.asmdef b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/InputGlyphs.Display.TextMeshPro.asmdef index 0c657be..483058d 100644 --- a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/InputGlyphs.Display.TextMeshPro.asmdef +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/InputGlyphs.Display.TextMeshPro.asmdef @@ -4,7 +4,8 @@ "references": [ "GUID:75469ad4d38634e559750d17036d5f7c", "GUID:6055be8ebefd69e48b49212b09b47b2f", - "GUID:fc48f7dd8f1155d429d2f9eeb74a4fd4" + "GUID:fc48f7dd8f1155d429d2f9eeb74a4fd4", + "GUID:8149eef813b3f0349807ebbba05a55cd" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/TextInputGlyph.cs b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/TextInputGlyph.cs index ad2cc82..9bfb858 100644 --- a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/TextInputGlyph.cs +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/TextMeshPro/TextInputGlyph.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Reflection; +using InputGlyphs.Utils; using TMPro; using UnityEngine; using UnityEngine.InputSystem; @@ -152,7 +153,7 @@ private void UpdateGlyphs(PlayerInput playerInput) for (var i = 0; i < InputActionReferences.Length; i++) { var actionReference = InputActionReferences[i]; - if (TryGetInputPaths(InputActionReferences[i], PlayerInput, _pathBuffer)) + if (InputLayoutPathUtility.TryGetActionBindingPath(actionReference?.action, PlayerInput.currentControlScheme, _pathBuffer)) { Texture2D texture; if (i < _actionTextureBuffer.Count) @@ -167,7 +168,7 @@ private void UpdateGlyphs(PlayerInput playerInput) InputGlyphManager.LoadGlyph(texture, devices, _pathBuffer[0]); if (texture == null) { - Debug.LogError($"Failed to get glyph for input path: {_pathBuffer[0]}"); + Debug.LogError($"Failed to get glyph for input path: {_pathBuffer[0]}", this); var white = Texture2D.whiteTexture; texture.Reinitialize(white.width, white.height, white.format, white.mipmapCount > 0); texture.Apply(); @@ -181,24 +182,6 @@ private void UpdateGlyphs(PlayerInput playerInput) Profiler.EndSample(); } - private static bool TryGetInputPaths(InputActionReference actionReferences, PlayerInput playerInput, List results) - { - results.Clear(); - var action = actionReferences?.action; - if (action == null) - { - return false; - } - // TODO: Get multiple bindings - var bindingIndex = action.GetBindingIndex(InputBinding.MaskByGroup(playerInput.currentControlScheme)); - if (bindingIndex < 0) - { - return false; - } - results.Add(action.bindings[bindingIndex].effectivePath); - return true; - } - private void SetGlyphsToSpriteAsset(IReadOnlyList actionTextures, IReadOnlyList> actionTextureIndexes) { Profiler.BeginSample("SetGlyphsToSpriteAsset"); diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI.meta b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI.meta new file mode 100644 index 0000000..46b3aa4 --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 15b652ef6c2c65846aa5a49f642af284 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs new file mode 100644 index 0000000..572d0e6 --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs @@ -0,0 +1,143 @@ +#if ENABLE_INPUT_SYSTEM +using System.Collections.Generic; +using InputGlyphs.Utils; +using UnityEngine; +using UnityEngine.InputSystem; +using UnityEngine.UI; + +namespace InputGlyphs.Display +{ + [RequireComponent(typeof(Image))] + public class ImageGlyph : MonoBehaviour + { + [SerializeField, HideInInspector] + public Image Image = null; + + [SerializeField] + public PlayerInput PlayerInput = null; + + [SerializeField] + public InputActionReference InputActionReference = null; + + private PlayerInput _lastPlayerInput; + private List _pathBuffer = new List(); + private Texture2D _texture; + + private void Reset() + { + Image = GetComponent(); + } + + private void Awake() + { + if (Image == null) + { + Image = GetComponent(); + } + _texture = new Texture2D(2, 2); + } + + private void OnDisable() + { + if (_lastPlayerInput != null) + { + UnregisterPlayerInputEvents(_lastPlayerInput); + _lastPlayerInput = null; + } + } + + private void OnDestroy() + { + Destroy(_texture); + _texture = null; + if (Image != null) + { + Destroy(Image.sprite); + Image.sprite = null; + } + } + + private void Update() + { + if (PlayerInput != _lastPlayerInput) + { + if (_lastPlayerInput != null) + { + UnregisterPlayerInputEvents(_lastPlayerInput); + } + if (PlayerInput == null) + { + Debug.LogError("PlayerInput is not set.", this); + } + else + { + RegisterPlayerInputEvents(PlayerInput); + UpdateGlyphs(PlayerInput); + } + _lastPlayerInput = PlayerInput; + } + } + + private void RegisterPlayerInputEvents(PlayerInput playerInput) + { + switch (playerInput.notificationBehavior) + { + case PlayerNotifications.InvokeUnityEvents: + playerInput.controlsChangedEvent.AddListener(OnControlsChanged); + break; + case PlayerNotifications.InvokeCSharpEvents: + playerInput.onControlsChanged += OnControlsChanged; + break; + } + } + + private void UnregisterPlayerInputEvents(PlayerInput playerInput) + { + switch (playerInput.notificationBehavior) + { + case PlayerNotifications.InvokeUnityEvents: + playerInput.controlsChangedEvent.RemoveListener(OnControlsChanged); + break; + case PlayerNotifications.InvokeCSharpEvents: + playerInput.onControlsChanged -= OnControlsChanged; + break; + } + } + + private void OnControlsChanged(PlayerInput playerInput) + { + UpdateGlyphs(playerInput); + } + + private void UpdateGlyphs(PlayerInput playerInput) + { + if (!playerInput.isActiveAndEnabled) + { + return; + } + + var devices = playerInput.devices; + if (devices.Count == 0) + { + Debug.LogWarning("No devices are connected.", this); + return; + } + + if (InputLayoutPathUtility.TryGetActionBindingPath(InputActionReference?.action, PlayerInput.currentControlScheme, _pathBuffer)) + { + InputGlyphManager.LoadGlyph(_texture, devices, _pathBuffer[0]); + if (_texture == null) + { + Debug.LogError($"Failed to get glyph for input path: {_pathBuffer[0]}", this); + var white = Texture2D.whiteTexture; + _texture.Reinitialize(white.width, white.height, white.format, white.mipmapCount > 0); + _texture.Apply(); + Graphics.CopyTexture(white, _texture); + } + Destroy(Image.sprite); + Image.sprite = Sprite.Create(_texture, new Rect(0, 0, _texture.width, _texture.height), new Vector2(0.5f, 0.5f)); + } + } + } +} +#endif diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs.meta b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs.meta new file mode 100644 index 0000000..b3b7051 --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f9fbd65c33a09a54f885eec0c2d5acf9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/InputGlyphs.Display.UI.asmdef b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/InputGlyphs.Display.UI.asmdef new file mode 100644 index 0000000..5e110bf --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/InputGlyphs.Display.UI.asmdef @@ -0,0 +1,18 @@ +{ + "name": "InputGlyphs.Display.UI", + "rootNamespace": "", + "references": [ + "GUID:75469ad4d38634e559750d17036d5f7c", + "GUID:fc48f7dd8f1155d429d2f9eeb74a4fd4", + "GUID:8149eef813b3f0349807ebbba05a55cd" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/InputGlyphs.Display.UI.asmdef.meta b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/InputGlyphs.Display.UI.asmdef.meta new file mode 100644 index 0000000..f5819a3 --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/InputGlyphs.Display.UI.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 91854ac339534994193148d227ad1312 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Utils/InputLayoutPathUtility.cs b/InputGlyphs/Assets/InputGlyphs/Scripts/Utils/InputLayoutPathUtility.cs index 8779b7c..bbf397c 100644 --- a/InputGlyphs/Assets/InputGlyphs/Scripts/Utils/InputLayoutPathUtility.cs +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Utils/InputLayoutPathUtility.cs @@ -1,4 +1,5 @@ #if ENABLE_INPUT_SYSTEM +using System.Collections.Generic; using System.Text; using UnityEngine.InputSystem; @@ -38,6 +39,23 @@ public static string GetLocalPath(string inputLayoutPath) } return _stringBuilder.ToString(); } + + public static bool TryGetActionBindingPath(InputAction action, string controlScheme, List results) + { + results.Clear(); + if (action == null) + { + return false; + } + // TODO: Get multiple bindings + var bindingIndex = action.GetBindingIndex(InputBinding.MaskByGroup(controlScheme)); + if (bindingIndex < 0) + { + return false; + } + results.Add(action.bindings[bindingIndex].effectivePath); + return true; + } } } #endif From f1d11086af5b6ba8ec51a63da057c0556b6e3f31 Mon Sep 17 00:00:00 2001 From: DAIKI Date: Sat, 6 Jul 2024 03:52:27 +0900 Subject: [PATCH 4/8] Update changelog --- InputGlyphs/Assets/InputGlyphs/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InputGlyphs/Assets/InputGlyphs/CHANGELOG.md b/InputGlyphs/Assets/InputGlyphs/CHANGELOG.md index d0a7e6f..cd47a29 100644 --- a/InputGlyphs/Assets/InputGlyphs/CHANGELOG.md +++ b/InputGlyphs/Assets/InputGlyphs/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.6.1] - 2024-07-06 +### Added +- Added glyph display for UI Image. + ## [0.6.0] - 2024-07-05 ### Changed - Change GetGlyph() to LoadGlyph(). From 300dd024daf4b695a4d153a2dba2848d315d162d Mon Sep 17 00:00:00 2001 From: DAIKI Date: Sat, 6 Jul 2024 03:56:15 +0900 Subject: [PATCH 5/8] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fcd3ed0..12d8af0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ Displays glyphs (icons) of keyboard & mouse or controller buttons recognized by Easy to use and extensible. Glyph images are taken from [Xelu's FREE Controller Prompts](https://thoseawesomeguys.com/prompts/) (CC0). This package can also load Glyphs for Gamepads provided by Steamworks. -![image](https://github.com/eviltwo/InputGlyphs/assets/7721151/5df7b8ee-578f-4c58-9fdb-5770a82980d9) +![image](https://github.com/eviltwo/InputGlyphs/assets/7721151/30d87848-11fd-462c-845c-00fdfa8a12e7) + |Feature|Status| |---|---| @@ -14,7 +15,7 @@ Easy to use and extensible. Glyph images are taken from [Xelu's FREE Controller |Steam input glyph API|Supported| ||| |Sprite icon in text (TMPro)|Supported| -|uGUI Image|not yet| +|UI Image|Supported| |Sprite renderer|not yet| |Multiple key|not yet| ||| From 70c6fb074e3bc8234e2d38b111e66c13159abf3e Mon Sep 17 00:00:00 2001 From: DAIKI Date: Sat, 6 Jul 2024 11:36:14 +0900 Subject: [PATCH 6/8] Add glyph display for sprite renderer --- .../InputGlyphs/Samples/SampleScene.unity | 100 ++++++++++++ .../InputGlyphs/Scripts/Display/Sprite.meta | 8 + .../Sprite/InputGlyps.Display.Sprite.asmdef | 18 +++ .../InputGlyps.Display.Sprite.asmdef.meta | 7 + .../Scripts/Display/Sprite/SpriteGlyph.cs | 142 ++++++++++++++++++ .../Display/Sprite/SpriteGlyph.cs.meta | 11 ++ 6 files changed, 286 insertions(+) create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite.meta create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/InputGlyps.Display.Sprite.asmdef create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/InputGlyps.Display.Sprite.asmdef.meta create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs create mode 100644 InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs.meta diff --git a/InputGlyphs/Assets/InputGlyphs/Samples/SampleScene.unity b/InputGlyphs/Assets/InputGlyphs/Samples/SampleScene.unity index 0a1b896..7cf36b5 100644 --- a/InputGlyphs/Assets/InputGlyphs/Samples/SampleScene.unity +++ b/InputGlyphs/Assets/InputGlyphs/Samples/SampleScene.unity @@ -658,6 +658,106 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 275803797} m_CullTransparentMesh: 1 +--- !u!1 &303118344 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 303118347} + - component: {fileID: 303118346} + - component: {fileID: 303118345} + m_Layer: 0 + m_Name: SpriteRenderer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &303118345 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 303118344} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6c751871428450a4a9c6434d09550373, type: 3} + m_Name: + m_EditorClassIdentifier: + SpriteRenderer: {fileID: 303118346} + PlayerInput: {fileID: 1847320111} + InputActionReference: {fileID: 1942945179757384036, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} +--- !u!212 &303118346 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 303118344} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + 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: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.2, y: 0.2} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 0 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &303118347 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 303118344} + 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_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &404029258 GameObject: m_ObjectHideFlags: 0 diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite.meta b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite.meta new file mode 100644 index 0000000..948cc8f --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5da9b2e2b3564414aa4bab0b686d5a81 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/InputGlyps.Display.Sprite.asmdef b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/InputGlyps.Display.Sprite.asmdef new file mode 100644 index 0000000..e4f7719 --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/InputGlyps.Display.Sprite.asmdef @@ -0,0 +1,18 @@ +{ + "name": "InputGlyps.Display.Sprite", + "rootNamespace": "", + "references": [ + "GUID:75469ad4d38634e559750d17036d5f7c", + "GUID:fc48f7dd8f1155d429d2f9eeb74a4fd4", + "GUID:8149eef813b3f0349807ebbba05a55cd" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/InputGlyps.Display.Sprite.asmdef.meta b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/InputGlyps.Display.Sprite.asmdef.meta new file mode 100644 index 0000000..40ad498 --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/InputGlyps.Display.Sprite.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 82fde0816ab54d74d9ce457f78dd6b14 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs new file mode 100644 index 0000000..0908c0b --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs @@ -0,0 +1,142 @@ +#if ENABLE_INPUT_SYSTEM +using System.Collections.Generic; +using InputGlyphs.Utils; +using UnityEngine; +using UnityEngine.InputSystem; + +namespace InputGlyphs.Display +{ + [RequireComponent(typeof(SpriteRenderer))] + public class SpriteGlyph : MonoBehaviour + { + [SerializeField, HideInInspector] + public SpriteRenderer SpriteRenderer = null; + + [SerializeField] + public PlayerInput PlayerInput = null; + + [SerializeField] + public InputActionReference InputActionReference = null; + + private PlayerInput _lastPlayerInput; + private List _pathBuffer = new List(); + private Texture2D _texture; + + private void Reset() + { + SpriteRenderer = GetComponent(); + } + + private void Awake() + { + if (SpriteRenderer == null) + { + SpriteRenderer = GetComponent(); + } + _texture = new Texture2D(2, 2); + } + + private void OnDisable() + { + if (_lastPlayerInput != null) + { + UnregisterPlayerInputEvents(_lastPlayerInput); + _lastPlayerInput = null; + } + } + + private void OnDestroy() + { + Destroy(_texture); + _texture = null; + if (SpriteRenderer != null) + { + Destroy(SpriteRenderer.sprite); + SpriteRenderer.sprite = null; + } + } + + private void Update() + { + if (PlayerInput != _lastPlayerInput) + { + if (_lastPlayerInput != null) + { + UnregisterPlayerInputEvents(_lastPlayerInput); + } + if (PlayerInput == null) + { + Debug.LogError("PlayerInput is not set.", this); + } + else + { + RegisterPlayerInputEvents(PlayerInput); + UpdateGlyphs(PlayerInput); + } + _lastPlayerInput = PlayerInput; + } + } + + private void RegisterPlayerInputEvents(PlayerInput playerInput) + { + switch (playerInput.notificationBehavior) + { + case PlayerNotifications.InvokeUnityEvents: + playerInput.controlsChangedEvent.AddListener(OnControlsChanged); + break; + case PlayerNotifications.InvokeCSharpEvents: + playerInput.onControlsChanged += OnControlsChanged; + break; + } + } + + private void UnregisterPlayerInputEvents(PlayerInput playerInput) + { + switch (playerInput.notificationBehavior) + { + case PlayerNotifications.InvokeUnityEvents: + playerInput.controlsChangedEvent.RemoveListener(OnControlsChanged); + break; + case PlayerNotifications.InvokeCSharpEvents: + playerInput.onControlsChanged -= OnControlsChanged; + break; + } + } + + private void OnControlsChanged(PlayerInput playerInput) + { + UpdateGlyphs(playerInput); + } + + private void UpdateGlyphs(PlayerInput playerInput) + { + if (!playerInput.isActiveAndEnabled) + { + return; + } + + var devices = playerInput.devices; + if (devices.Count == 0) + { + Debug.LogWarning("No devices are connected.", this); + return; + } + + if (InputLayoutPathUtility.TryGetActionBindingPath(InputActionReference?.action, PlayerInput.currentControlScheme, _pathBuffer)) + { + InputGlyphManager.LoadGlyph(_texture, devices, _pathBuffer[0]); + if (_texture == null) + { + Debug.LogError($"Failed to get glyph for input path: {_pathBuffer[0]}", this); + var white = Texture2D.whiteTexture; + _texture.Reinitialize(white.width, white.height, white.format, white.mipmapCount > 0); + _texture.Apply(); + Graphics.CopyTexture(white, _texture); + } + Destroy(SpriteRenderer.sprite); + SpriteRenderer.sprite = Sprite.Create(_texture, new Rect(0, 0, _texture.width, _texture.height), new Vector2(0.5f, 0.5f)); + } + } + } +} +#endif diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs.meta b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs.meta new file mode 100644 index 0000000..4d8d4a4 --- /dev/null +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6c751871428450a4a9c6434d09550373 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From a19fc45869347ce6931471f634bbc210cebb1909 Mon Sep 17 00:00:00 2001 From: DAIKI Date: Sat, 6 Jul 2024 11:40:27 +0900 Subject: [PATCH 7/8] Fix pixel per unit --- .../SteamworksSample/SteamworksSample.unity | 100 ++++++++++++++++++ .../Scripts/Display/Sprite/SpriteGlyph.cs | 2 +- .../Scripts/Display/UI/ImageGlyph.cs | 2 +- 3 files changed, 102 insertions(+), 2 deletions(-) diff --git a/InputGlyphs/Assets/InputGlyphs/Samples/SteamworksSample/SteamworksSample.unity b/InputGlyphs/Assets/InputGlyphs/Samples/SteamworksSample/SteamworksSample.unity index 231fc14..25f5aaa 100644 --- a/InputGlyphs/Assets/InputGlyphs/Samples/SteamworksSample/SteamworksSample.unity +++ b/InputGlyphs/Assets/InputGlyphs/Samples/SteamworksSample/SteamworksSample.unity @@ -1463,6 +1463,106 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1981045602 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1981045605} + - component: {fileID: 1981045604} + - component: {fileID: 1981045603} + m_Layer: 0 + m_Name: SpriteRenderer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1981045603 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1981045602} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6c751871428450a4a9c6434d09550373, type: 3} + m_Name: + m_EditorClassIdentifier: + SpriteRenderer: {fileID: 1981045604} + PlayerInput: {fileID: 1795501703} + InputActionReference: {fileID: 1942945179757384036, guid: 1b9bb0cc544975040b6fa735b8e5fcf7, type: 3} +--- !u!212 &1981045604 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1981045602} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + 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: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.2, y: 0.2} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 0 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &1981045605 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1981045602} + 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_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2070899935 GameObject: m_ObjectHideFlags: 0 diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs index 0908c0b..f7bf02a 100644 --- a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/Sprite/SpriteGlyph.cs @@ -134,7 +134,7 @@ private void UpdateGlyphs(PlayerInput playerInput) Graphics.CopyTexture(white, _texture); } Destroy(SpriteRenderer.sprite); - SpriteRenderer.sprite = Sprite.Create(_texture, new Rect(0, 0, _texture.width, _texture.height), new Vector2(0.5f, 0.5f)); + SpriteRenderer.sprite = Sprite.Create(_texture, new Rect(0, 0, _texture.width, _texture.height), new Vector2(0.5f, 0.5f), Mathf.Max(_texture.width, _texture.height)); } } } diff --git a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs index 572d0e6..a02884a 100644 --- a/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs +++ b/InputGlyphs/Assets/InputGlyphs/Scripts/Display/UI/ImageGlyph.cs @@ -135,7 +135,7 @@ private void UpdateGlyphs(PlayerInput playerInput) Graphics.CopyTexture(white, _texture); } Destroy(Image.sprite); - Image.sprite = Sprite.Create(_texture, new Rect(0, 0, _texture.width, _texture.height), new Vector2(0.5f, 0.5f)); + Image.sprite = Sprite.Create(_texture, new Rect(0, 0, _texture.width, _texture.height), new Vector2(0.5f, 0.5f), Mathf.Max(_texture.width, _texture.height)); } } } From 5fe2b4e293a7aba1da62f7f4795ced92733edf57 Mon Sep 17 00:00:00 2001 From: DAIKI Date: Sat, 6 Jul 2024 12:55:17 +0900 Subject: [PATCH 8/8] Update documents --- InputGlyphs/Assets/InputGlyphs/CHANGELOG.md | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/InputGlyphs/Assets/InputGlyphs/CHANGELOG.md b/InputGlyphs/Assets/InputGlyphs/CHANGELOG.md index cd47a29..7cf17b2 100644 --- a/InputGlyphs/Assets/InputGlyphs/CHANGELOG.md +++ b/InputGlyphs/Assets/InputGlyphs/CHANGELOG.md @@ -3,6 +3,7 @@ ## [0.6.1] - 2024-07-06 ### Added - Added glyph display for UI Image. +- Added glyph display for Sprite Renderer. ## [0.6.0] - 2024-07-05 ### Changed diff --git a/README.md b/README.md index 12d8af0..26d24ed 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Easy to use and extensible. Glyph images are taken from [Xelu's FREE Controller ||| |Sprite icon in text (TMPro)|Supported| |UI Image|Supported| -|Sprite renderer|not yet| +|Sprite renderer|Supported| |Multiple key|not yet| ||| |Samples|making|