diff --git a/Scripts/Runtime/Utils/UnityTesting.cs b/Scripts/Runtime/Utils/UnityTesting.cs index 9452657..a8fdadc 100644 --- a/Scripts/Runtime/Utils/UnityTesting.cs +++ b/Scripts/Runtime/Utils/UnityTesting.cs @@ -85,7 +85,7 @@ private static void StoreBase(UnityBuilding.BuildBehavior? behavior, BuildingDat var fileName = Path.GetTempPath() + "/" + BaseFileName; using var stream = new FileStream(fileName, FileMode.Create); using var writer = new StreamWriter(stream); - writer.WriteLine(JsonUtility.ToJson(behavior)); + writer.WriteLine(behavior == null ? "" : JsonUtility.ToJson(behavior.Value)); writer.WriteLine(JsonUtility.ToJson(overwriteData)); } @@ -103,7 +103,8 @@ private static bool LoadBase(out UnityBuilding.BuildBehavior? behavior, out Buil { using var stream = new FileStream(fileName, FileMode.Open); using var reader = new StreamReader(stream); - behavior = JsonUtility.FromJson(reader.ReadLine()); + var behaviorStr = reader.ReadLine(); + behavior = behaviorStr == "" ? null : JsonUtility.FromJson(behaviorStr); overwriteData = JsonUtility.FromJson(reader.ReadLine()); } finally diff --git a/package.json b/package.json index 7d718b2..5183ae8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "org.pcsoft.build-tooling", - "version": "1.4.6", + "version": "1.4.7", "displayName": "Build Tooling", "description": "Add a build toolbar into unity to create and run build very easy.", "unity": "2021.1", @@ -12,7 +12,7 @@ ], "dependencies": { "com.marijnzwemmer.unity-toolbar-extender": "1.4.1", - "org.pcsoft.editor-ex": "1.1.7" + "org.pcsoft.editor-ex": "1.1.8" }, "author": { "name": "Pfeiffer C Soft",