Fix project cache in editor to use invariant culture when converting numbers

This commit is contained in:
Wojtek Figat
2024-05-30 17:22:30 +02:00
parent 3f3df090f4
commit 5c23f4ac09
11 changed files with 122 additions and 78 deletions

View File

@@ -1,6 +1,5 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using System.ComponentModel;
using FlaxEditor.CustomEditors;
using FlaxEngine;
@@ -177,7 +176,7 @@ namespace FlaxEditor.Windows
/// <inheritdoc />
public override void OnInit()
{
if (Editor.ProjectCache.TryGetCustomData(_optionsName, out var options) && !string.IsNullOrEmpty(options))
if (Editor.ProjectCache.TryGetCustomData(_optionsName, out string options) && !string.IsNullOrEmpty(options))
{
// Load cached settings
JsonSerializer.Deserialize(_viewModel, options);