Skip to content

Commit

Permalink
SerializedMap would use ToString() for conversioning to json
Browse files Browse the repository at this point in the history
  • Loading branch information
iconstudio committed Oct 2, 2023
1 parent 192ec85 commit 491a134
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Editor/TestEditor/Contents/MapHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ public static Task SaveMap(in Map? map, in string filepath)
ErrorHelper.RaiseMissingArgumentError(nameof(filepath));
}

if (map is Map gmap)
if (map is Map gamemap)
{
var serial = gmap.Serialize();
var serialized_map = gamemap.Serialize();
try
{
if (serial is string contents)
if (serialized_map.ToString() is string contents)
{
return File.WriteAllTextAsync(filepath, contents);
}
Expand Down

0 comments on commit 491a134

Please sign in to comment.