Skip to content

Commit

Permalink
Add set dirty flag after convert obsolete fields
Browse files Browse the repository at this point in the history
  • Loading branch information
nowsprinting committed Nov 5, 2024
1 parent 6a80098 commit 09dfbef
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Runtime/Settings/AutopilotSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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")]
Expand All @@ -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)
Expand Down

0 comments on commit 09dfbef

Please sign in to comment.