diff --git a/Source/Editor/Options/ViewportOptions.cs b/Source/Editor/Options/ViewportOptions.cs
index 2dd08b6d1..485ac7294 100644
--- a/Source/Editor/Options/ViewportOptions.cs
+++ b/Source/Editor/Options/ViewportOptions.cs
@@ -136,6 +136,13 @@ namespace FlaxEditor.Options
[DefaultValue(50.0f), Limit(25.0f, 500.0f, 5.0f)]
[EditorDisplay("Defaults"), EditorOrder(220), Tooltip("The default editor viewport grid scale.")]
public float ViewportGridScale { get; set; } = 50.0f;
+
+ ///
+ /// Gets or sets the use persistence over defaults setting
+ ///
+ [DefaultValue(true)]
+ [EditorDisplay("Defaults"), EditorOrder(230), Tooltip("Allow persistence setting from last session to override default settings")]
+ public bool UsePersistenceOverDefaults { get; set; } = true;
///
/// Gets or sets the view distance you can see the grid.
diff --git a/Source/Editor/Windows/EditGameWindow.cs b/Source/Editor/Windows/EditGameWindow.cs
index d445b55ee..8d0c146d9 100644
--- a/Source/Editor/Windows/EditGameWindow.cs
+++ b/Source/Editor/Windows/EditGameWindow.cs
@@ -450,6 +450,9 @@ namespace FlaxEditor.Windows
///
public override void OnLayoutDeserialize(XmlElement node)
{
+ if (!Editor.Options.Options.Viewport.UsePersistenceOverDefaults)
+ return;
+
if (bool.TryParse(node.GetAttribute("GridEnabled"), out bool value1))
Viewport.Grid.Enabled = value1;
if (bool.TryParse(node.GetAttribute("ShowFpsCounter"), out value1))