From 09dfbefd7e2aba3ded01a5f0ee0bfb0da2e0efe1 Mon Sep 17 00:00:00 2001 From: Koji Hasegawa Date: Tue, 5 Nov 2024 07:31:53 +0900 Subject: [PATCH] Add set dirty flag after convert obsolete fields --- Runtime/Settings/AutopilotSettings.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Runtime/Settings/AutopilotSettings.cs b/Runtime/Settings/AutopilotSettings.cs index 7117581..b87c81f 100644 --- a/Runtime/Settings/AutopilotSettings.cs +++ b/Runtime/Settings/AutopilotSettings.cs @@ -264,6 +264,9 @@ private void CreateDefaultLoggerIfNeeded() // not change field directly. this.LoggerAsset.Logger.Log("Create default logger."); +#if UNITY_EDITOR + EditorUtility.SetDirty(this); +#endif } } @@ -295,6 +298,9 @@ internal void ConvertReportersFromObsoleteReporter(ILogger logger) This time, temporarily converting."); this.reporters.Add(this.reporter); +#if UNITY_EDITOR + EditorUtility.SetDirty(this); +#endif } [Obsolete("Remove this method when bump major version")] @@ -321,6 +327,9 @@ internal void ConvertSlackReporterFromObsoleteSlackSettings(ILogger logger) SaveConvertedObject(convertedReporter); #endif this.reporters.Add(convertedReporter); +#if UNITY_EDITOR + EditorUtility.SetDirty(this); +#endif } private void SaveConvertedObject(Object obj)