Skip to content

Commit

Permalink
Prefrences: do not use a strict xmlserializer
Browse files Browse the repository at this point in the history
  • Loading branch information
niezbop committed Dec 18, 2018
1 parent 1ee8add commit eec2d98
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Assets/Plugins/Editor/Uplift/UpliftPreferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

using System;
using System.IO;
using System.Xml.Serialization;
using UnityEngine;
using Uplift.Common;

Expand Down Expand Up @@ -66,13 +67,13 @@ public static bool TryLoadFromFile(string source, out UpliftPreferences result)
return false;
}

StrictXmlDeserializer<UpliftPreferences> deserializer = new StrictXmlDeserializer<UpliftPreferences>();
XmlSerializer deserializer = new XmlSerializer(typeof(UpliftPreferences));

using (FileStream fs = new FileStream(source, FileMode.Open))
{
try
{
result = deserializer.Deserialize(fs);
result = deserializer.Deserialize(fs) as UpliftPreferences;
}
catch (InvalidOperationException)
{
Expand All @@ -82,6 +83,7 @@ public static bool TryLoadFromFile(string source, out UpliftPreferences result)

return true;
}

}

public static string GetHomePath()
Expand Down

0 comments on commit eec2d98

Please sign in to comment.