From bdbc88d51682186533123d1110a1bb8bd84824fc Mon Sep 17 00:00:00 2001 From: minenice55 Date: Sat, 2 Dec 2023 20:13:29 -0500 Subject: [PATCH] fix that alignment bug in controller settings --- .../SettingsMenu/ControllerSetup.prefab | 61 +++++++++++++------ Assets/Scripts/GlobalGameManager.cs | 11 +++- 2 files changed, 53 insertions(+), 19 deletions(-) diff --git a/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab b/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab index c327de5de..18b9312ce 100644 --- a/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab +++ b/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab @@ -3503,7 +3503,7 @@ MonoBehaviour: m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -3552,9 +3552,9 @@ RectTransform: m_Father: {fileID: 3918594454557351925} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 330, y: -0.0000000019699655} + 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, y: 0.5} --- !u!222 &3918594454379110530 @@ -4334,6 +4334,7 @@ GameObject: - component: {fileID: 3918594454557351925} - component: {fileID: 3918594454557351915} - component: {fileID: 3918594454557351924} + - component: {fileID: 2657434016506138070} m_Layer: 5 m_Name: Connection m_TagString: Untagged @@ -4462,6 +4463,32 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &2657434016506138070 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3918594454557351926} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 328 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 3 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1 &3918594454563211273 GameObject: m_ObjectHideFlags: 0 @@ -5269,7 +5296,7 @@ MonoBehaviour: m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -6196,7 +6223,7 @@ MonoBehaviour: m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -6348,7 +6375,7 @@ MonoBehaviour: m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -6424,7 +6451,7 @@ MonoBehaviour: m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -6703,7 +6730,7 @@ MonoBehaviour: m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -7652,8 +7679,8 @@ RectTransform: m_Father: {fileID: 3918594454557351925} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0.5} - m_AnchorMax: {x: 1, y: 0.5} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 990, y: 50} m_Pivot: {x: 1, y: 0.5} @@ -7685,7 +7712,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: + m_text: 'Connected Controlers: 999' m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 4810e200fa0cb24438bac52343d7674b, type: 2} m_sharedMaterial: {fileID: 8580487687356851718, guid: 4810e200fa0cb24438bac52343d7674b, type: 2} @@ -7720,7 +7747,7 @@ MonoBehaviour: m_fontSizeMax: 36 m_fontStyle: 0 m_HorizontalAlignment: 1 - m_VerticalAlignment: 256 + m_VerticalAlignment: 512 m_textAlignment: 65535 m_characterSpacing: 0 m_wordSpacing: 0 @@ -7895,7 +7922,7 @@ MonoBehaviour: m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -7971,7 +7998,7 @@ MonoBehaviour: m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -8025,8 +8052,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 951.5, y: 0} - m_SizeDelta: {x: 1863, y: 0} + m_AnchoredPosition: {x: 861.5, y: 0} + m_SizeDelta: {x: 1683, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3918594456218978261 CanvasRenderer: diff --git a/Assets/Scripts/GlobalGameManager.cs b/Assets/Scripts/GlobalGameManager.cs index e1edc9b04..aae8933e0 100644 --- a/Assets/Scripts/GlobalGameManager.cs +++ b/Assets/Scripts/GlobalGameManager.cs @@ -421,8 +421,15 @@ namespace HeavenStudio { if (PersistentDataManager.gameSettings.discordRPCEnable) { - DiscordRPC.DiscordRPC.UpdateActivity(editor ? "In Editor " : "Playing ", details, updateTime); - Debug.Log("Discord status updated"); + try + { + DiscordRPC.DiscordRPC.UpdateActivity(editor ? "In Editor " : "Playing ", details, updateTime); + Debug.Log("Discord status updated"); + } + catch (System.Exception e) + { + Debug.Log("Discord status update failed: " + e.Message); + } } } }