Guest User

Untitled

a guest
Jun 10th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.56 KB | None | 0 0
  1. commit a4abb64824cd314b0dfe03b547aafac7c908b77d
  2. Author: Aron Granberg <aron.granberg@gmail.com>
  3. Date:   Sun May 21 22:37:26 2017 +0200
  4.  
  5.     Fixed compilation error when targeting the Windows Store. Introduced in 4.0.3.
  6.  
  7. diff --git a/Assets/AstarPathfindingProject/Core/Serialization/TinyJson.cs b/Assets/AstarPathfindingProject/Core/Serialization/TinyJson.cs
  8. index f7c14f76..3ebab6f0 100644
  9. --- a/Assets/AstarPathfindingProject/Core/Serialization/TinyJson.cs
  10. +++ b/Assets/AstarPathfindingProject/Core/Serialization/TinyJson.cs
  11. @@ -64,14 +64,14 @@ namespace Pathfinding.Serialization {
  12.                 SerializeUnityObject(obj as UnityEngine.Object);
  13.             } else {
  14.  #if NETFX_CORE
  15. -               var optIn = tpInfo.CustomAttributes.Any(attr => attr.GetType() == typeof(JsonOptInAttribute));
  16. +               var optIn = typeInfo.CustomAttributes.Any(attr => attr.GetType() == typeof(JsonOptInAttribute));
  17.  #else
  18.                 var optIn = typeInfo.GetCustomAttributes(typeof(JsonOptInAttribute), true).Length > 0;
  19.  #endif
  20.                 output.Append("{");
  21.  
  22.  #if NETFX_CORE
  23. -               var fields = tpInfo.DeclaredFields.Where(f => !f.IsStatic).ToArray();
  24. +               var fields = typeInfo.DeclaredFields.Where(f => !f.IsStatic).ToArray();
  25.  #else
  26.                 var fields = type.GetFields(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic);
  27.  #endif
  28. commit 63227eb1d4571016e60de70070f4f253c88372b6
  29. Author: Aron Granberg <aron.granberg@gmail.com>
  30. Date:   Sun May 21 22:41:01 2017 +0200
  31.  
  32.     Fixed runtime error when targeting the Windows Store.
  33.  
  34. diff --git a/Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs b/Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs
  35. index ba83059a..16d3ffc3 100644
  36. --- a/Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs
  37. +++ b/Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs
  38. @@ -649,9 +649,13 @@ namespace Pathfinding.Serialization {
  39.                 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);
  40.             }
  41.  
  42. +#if !NETFX_CORE
  43. +           // For Windows Store apps the BaseStream.Position property is not supported
  44. +           // so we have to disable this error check on that platform
  45.             if (reader.BaseStream.Position != reader.BaseStream.Length) {
  46.                 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.");
  47.             }
  48. +#endif
  49.  
  50.             reader.Close();
  51.             return int2Node;
Add Comment
Please, Sign In to add comment