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",