diff --git a/Assets/Plugins/Android/ImageSelector-release.aar b/Assets/Plugins/Android/ImageSelector-release.aar index 27d39f26..32c373ce 100644 Binary files a/Assets/Plugins/Android/ImageSelector-release.aar and b/Assets/Plugins/Android/ImageSelector-release.aar differ diff --git a/Assets/Scripts/UI/Prefab/Panel/DeviceController.cs b/Assets/Scripts/UI/Prefab/Panel/DeviceController.cs index 30496149..29550169 100644 --- a/Assets/Scripts/UI/Prefab/Panel/DeviceController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/DeviceController.cs @@ -9,6 +9,7 @@ using UnityEngine.UI; using UnityEngine.EventSystems; using DG.Tweening; using Assets.Scripts.Devices.Ble.Devices; +using Assets.Scripts; public class DeviceController : PFUIPanel { @@ -187,15 +188,12 @@ public class DeviceController : PFUIPanel public override void Show() { - var cg = this.GetComponent(); - cg.alpha = 0; base.Show(); App.MainDeviceAdapter.ClearDevice(); #if UNITY_ANDROID || UNITY_IOS App.MainDeviceAdapter.StartScan(); #endif - - cg.DOFade(1f, 0.3f); + transform.MyDOFade(); } protected override void OnDisable() diff --git a/Assets/Scripts/UI/Prefab/Panel/HomeController.cs b/Assets/Scripts/UI/Prefab/Panel/HomeController.cs index 2b10e60e..c904e083 100644 --- a/Assets/Scripts/UI/Prefab/Panel/HomeController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/HomeController.cs @@ -254,11 +254,8 @@ public class HomeController : PFUIPanel public override void Show() { - var cg = this.GetComponent(); - cg.alpha = 0; base.Show(); - - cg.DOFade(1f, 0.3f); + transform.MyDOFade(); GetSummary(); } } diff --git a/Assets/Scripts/UI/Prefab/Panel/MapListController.cs b/Assets/Scripts/UI/Prefab/Panel/MapListController.cs index 64d7d15a..fdb88b30 100644 --- a/Assets/Scripts/UI/Prefab/Panel/MapListController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/MapListController.cs @@ -465,8 +465,6 @@ public class MapListController : PFUIPanel transform.Find("RawImage").GetComponent().texture = App.DefaultRotateTexture; } ResetPanel(); - var cg = this.GetComponent(); - cg.alpha = 0; - cg.DOFade(1f, .3f); + transform.MyDOFade(); } } diff --git a/Assets/Scripts/UI/Prefab/Race/RaceScript.cs b/Assets/Scripts/UI/Prefab/Race/RaceScript.cs index ab1fe3e2..ea9040f7 100644 --- a/Assets/Scripts/UI/Prefab/Race/RaceScript.cs +++ b/Assets/Scripts/UI/Prefab/Race/RaceScript.cs @@ -12,9 +12,7 @@ public class RaceScript : PFUIPanel public override void Show() { base.Show(); - var cg = this.GetComponent(); - cg.alpha = 0; - cg.DOFade(1f, .5f); + transform.MyDOFade(); } protected void StartTime() { diff --git a/Assets/Scripts/UI/Prefab/SettingContoller.cs b/Assets/Scripts/UI/Prefab/SettingContoller.cs index 089719cd..6391fafe 100644 --- a/Assets/Scripts/UI/Prefab/SettingContoller.cs +++ b/Assets/Scripts/UI/Prefab/SettingContoller.cs @@ -137,9 +137,7 @@ public class SettingContoller : PFUIPanel public override void Show() { - var cg = this.GetComponent(); - cg.alpha = 0; base.Show(); - cg.DOFade(1f, 0.3f); + transform.MyDOFade(); } } diff --git a/Assets/Scripts/Utils/Utils.cs b/Assets/Scripts/Utils/Utils.cs index f64f4c48..a0bf49bb 100644 --- a/Assets/Scripts/Utils/Utils.cs +++ b/Assets/Scripts/Utils/Utils.cs @@ -502,5 +502,19 @@ namespace Assets.Scripts { UIManager.Instance.StartCoroutine(TimerFunc(seconds, action)); } + + public static void MyDOFade(this Transform transform) + { + var cg = transform.GetComponent(); + if (cg) + { + cg.alpha = 0; +#if UNITY_IOS + cg.DOFade(1f, .6f); +#else + cg.DOFade(1f, .3f); +#endif + } + } } } diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 4706883c..9b996cb4 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -38,6 +38,7 @@ GraphicsSettings: - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}