From 2899d13d603ea3f1c2f0a6b27c6d05afb716e88e Mon Sep 17 00:00:00 2001 From: walon Date: Sun, 9 Oct 2022 21:08:53 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8D2019=E7=9A=84?= =?UTF-8?q?=E4=B8=8D=E5=85=BC=E5=AE=B9=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/Settings/HybridCLRSettingProvider.cs | 6 +++--- Editor/Settings/SettingsPresetReceiver.cs | 2 ++ package.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Editor/Settings/HybridCLRSettingProvider.cs b/Editor/Settings/HybridCLRSettingProvider.cs index 78ccfd7..9484772 100644 --- a/Editor/Settings/HybridCLRSettingProvider.cs +++ b/Editor/Settings/HybridCLRSettingProvider.cs @@ -26,7 +26,7 @@ namespace HybridCLR.Editor HybridCLRSettings.Instance.Save(); var setting = HybridCLRSettings.Instance; setting.hideFlags &= ~HideFlags.NotEditable; - m_SerializedObject ??= new SerializedObject(setting); + m_SerializedObject = m_SerializedObject ?? new SerializedObject(setting); m_Enable = m_SerializedObject.FindProperty("enable"); m_UseGlobalIl2cpp = m_SerializedObject.FindProperty("useGlobalIl2cpp"); m_CloneFromGitee = m_SerializedObject.FindProperty("cloneFromGitee"); @@ -42,7 +42,7 @@ namespace HybridCLR.Editor { base.OnTitleBarGUI(); var rect = GUILayoutUtility.GetLastRect(); - buttonStyle ??= GUI.skin.GetStyle("IconButton"); + buttonStyle = buttonStyle ?? GUI.skin.GetStyle("IconButton"); #region 绘制官方网站跳转按钮 var w = rect.x + rect.width; @@ -135,7 +135,7 @@ namespace HybridCLR.Editor { var provider = new HybridCLRSettingsProvider { - keywords = GetSearchKeywordsFromSerializedObject(m_SerializedObject ??= new SerializedObject(HybridCLRSettings.Instance)) + keywords = GetSearchKeywordsFromSerializedObject(m_SerializedObject = m_SerializedObject ?? new SerializedObject(HybridCLRSettings.Instance)) }; return provider; } diff --git a/Editor/Settings/SettingsPresetReceiver.cs b/Editor/Settings/SettingsPresetReceiver.cs index 3636c49..592ae64 100644 --- a/Editor/Settings/SettingsPresetReceiver.cs +++ b/Editor/Settings/SettingsPresetReceiver.cs @@ -26,7 +26,9 @@ namespace HybridCLR.Editor Undo.RecordObject(m_Target, "Cancel Preset"); m_InitialValue.ApplyTo(m_Target); } +#if UNITY_2020_1_OR_NEWER SettingsService.RepaintAllSettingsWindow(); +#endif } public override void OnSelectionClosed(Preset selection) { diff --git a/package.json b/package.json index 8ac6e9c..b2d2401 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.focus-creative-games.hybridclr_unity", - "version": "0.3.8", + "version": "0.3.9", "displayName": "HybridCLR", "description": "Unity package for HybridCLR. It includes editor and runtime scripts and assets for HybridCLR", "category": "Runtime",