From c613d5313efea7920c15ca3886910c4b1a76c64d Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 17 Aug 2023 22:02:22 -0700 Subject: [PATCH] possible build failure fix --- Assets/Tools/SchemaEditorPrefs.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Assets/Tools/SchemaEditorPrefs.cs b/Assets/Tools/SchemaEditorPrefs.cs index 9fa03c8b7..6197d6fed 100644 --- a/Assets/Tools/SchemaEditorPrefs.cs +++ b/Assets/Tools/SchemaEditorPrefs.cs @@ -15,9 +15,13 @@ internal class SchemaEditorPrefs static SchemaEditorPrefs() { - string json = EditorPrefs.GetString(KEY); - var bytes = System.Text.Encoding.UTF8.GetBytes(json); - PathedItems = JsonSerializer.Deserialize>(bytes); + string json = EditorPrefs.GetString(KEY, null); + + if (json != null) + { + var bytes = System.Text.Encoding.UTF8.GetBytes(json); + PathedItems = JsonSerializer.Deserialize>(bytes); + } if (PathedItems == null) {