Fix C# objects serialization bug when script throws exception during saving to Json

#1656
This commit is contained in:
Wojtek Figat
2023-10-09 15:31:46 +02:00
parent fa57440a2f
commit 00100e11f2
2 changed files with 3 additions and 3 deletions

View File

@@ -73,6 +73,7 @@ namespace FlaxEngine.Json
if (IsWriting)
{
// Reset writing state (eg if previous serialization got exception)
SerializerWriter = new JsonSerializerInternalWriter(JsonSerializer);
JsonWriter = new JsonTextWriter(StringWriter)
{
IndentChar = '\t',