mirror of
https://github.com/Memorix101/UnityXNA/
synced 2024-12-30 15:25:35 +01:00
Added support for Unity 4
Unity 3.x had an issue with the byte order mark at the start of XML files, which there was a code work around for. Unity 4 has subsequently fixed the issue, so the work around has been ifdef'd to work only on Unity 3.x.
This commit is contained in:
parent
5f120f70f8
commit
b11fd24843
@ -88,7 +88,11 @@ namespace Microsoft.Xna.Framework.Content
|
||||
Dictionary<string, string> fontSettings = new Dictionary<string, string>();
|
||||
|
||||
StringReader stringReader = new StringReader(spriteFontText.text);
|
||||
stringReader.Read(); // Skip the byte order mark - seems to cause Unity issues
|
||||
|
||||
#if UNITY_3_0 || UNITY_3_0_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5
|
||||
stringReader.Read(); // Skip the byte order mark on Unity 3.x - note that this seems to work as of Unity 4
|
||||
#endif
|
||||
|
||||
XmlTextReader xmlReader = new XmlTextReader(stringReader);
|
||||
|
||||
XmlDocument document = new XmlDocument();
|
||||
|
Loading…
x
Reference in New Issue
Block a user