Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit a4abb64824cd314b0dfe03b547aafac7c908b77d
- Author: Aron Granberg <aron.granberg@gmail.com>
- Date: Sun May 21 22:37:26 2017 +0200
- Fixed compilation error when targeting the Windows Store. Introduced in 4.0.3.
- diff --git a/Assets/AstarPathfindingProject/Core/Serialization/TinyJson.cs b/Assets/AstarPathfindingProject/Core/Serialization/TinyJson.cs
- index f7c14f76..3ebab6f0 100644
- --- a/Assets/AstarPathfindingProject/Core/Serialization/TinyJson.cs
- +++ b/Assets/AstarPathfindingProject/Core/Serialization/TinyJson.cs
- @@ -64,14 +64,14 @@ namespace Pathfinding.Serialization {
- SerializeUnityObject(obj as UnityEngine.Object);
- } else {
- #if NETFX_CORE
- - var optIn = tpInfo.CustomAttributes.Any(attr => attr.GetType() == typeof(JsonOptInAttribute));
- + var optIn = typeInfo.CustomAttributes.Any(attr => attr.GetType() == typeof(JsonOptInAttribute));
- #else
- var optIn = typeInfo.GetCustomAttributes(typeof(JsonOptInAttribute), true).Length > 0;
- #endif
- output.Append("{");
- #if NETFX_CORE
- - var fields = tpInfo.DeclaredFields.Where(f => !f.IsStatic).ToArray();
- + var fields = typeInfo.DeclaredFields.Where(f => !f.IsStatic).ToArray();
- #else
- var fields = type.GetFields(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic);
- #endif
- commit 63227eb1d4571016e60de70070f4f253c88372b6
- Author: Aron Granberg <aron.granberg@gmail.com>
- Date: Sun May 21 22:41:01 2017 +0200
- Fixed runtime error when targeting the Windows Store.
- diff --git a/Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs b/Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs
- index ba83059a..16d3ffc3 100644
- --- a/Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs
- +++ b/Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs
- @@ -649,9 +649,13 @@ namespace Pathfinding.Serialization {
- throw new Exception("Some graph(s) has thrown an exception during GetNodes, or some graph(s) have deserialized more or fewer nodes than were serialized", e);
- }
- +#if !NETFX_CORE
- + // For Windows Store apps the BaseStream.Position property is not supported
- + // so we have to disable this error check on that platform
- if (reader.BaseStream.Position != reader.BaseStream.Length) {
- throw new Exception((reader.BaseStream.Length / 4) + " nodes were serialized, but only data for " + (reader.BaseStream.Position / 4) + " nodes was found. The data looks corrupt.");
- }
- +#endif
- reader.Close();
- return int2Node;
Add Comment
Please, Sign In to add comment