Hello, I’ve opened this new thread to help Aron debug the WP8 +W8 version of the A*.
So far, when trying to run the basic Test scene on a WP8 device I get the following errors:
The build, however, shows no errors.
Hello, I’ve opened this new thread to help Aron debug the WP8 +W8 version of the A*.
So far, when trying to run the basic Test scene on a WP8 device I get the following errors:
The build, however, shows no errors.
Thanks for testing. Great that it works without compiler errors.
Could you try it again, but this time enabling “ASTAR_FAST_NO_EXCEPTIONS” in the Optimizations panel?
It’s odd that just that exception is thrown, because that code should be inside a try…catch block which looks specifically for that exception.
[EDIT] Actually… it was just inside a block testing for #if UNITY_METRO which does not include UNITY_WP8. I should be testing for #if UNITY_WINRT.
Do you think you could do a search and replace in the project for UNITY_METRO and replace it with UNITY_WINRT?
Hi,
Just replaced the WIN_RT stuff, and now, when trying to compile I get the following error:
Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs(851,32): error CS0104: FileStream' is an ambiguous reference between
System.IO.FileStream’ and `MarkerMetro.Unity.WinLegacy.IO.FileStream
Hi again
I have made some changes and updated to the latest version of the project.
Could you try again and see if this works: http://arongranberg.com/wp-content/uploads/astarpathfinding/PathfindingProject_Win8_WebsiteDownload.unitypackage
Note that this will also add files to your Plugins directory.
Hi Aron, I’ll try this later today and let you know.
Best.
Hi aron,
I’ve tried the new package, it was again giving compiler errors
Error building Player: Exception: Error: method System.Int32 System.Math::DivRem(System.Int32,System.Int32,System.Int32&)
doesn’t exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void Pathfinding.RecastGraph::GetTileCoordinates(System.Int32,System.Int32&,System.Int32&).
Ok, fixed that issue. Try this one: http://arongranberg.com/wp-content/uploads/astarpathfinding/PathfindingProject_Win8_WebsiteDownload.unitypackage
im getting this :
Error building Player: Exception: Error: method System.Type System.Type::GetInterface(System.String)
doesn’t exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Type Pathfinding.Serialization.JsonFx.JsonReader::GetGenericDictionaryType(System.Type).
Error: method System.Type System.Type::GetInterface(System.String)
doesn’t exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Void Pathfinding.Serialization.JsonFx.JsonReader::PopulateObject(System.Object&,System.Type,System.Collections.Generic.Dictionary2<System.String,System.Reflection.MemberInfo>,System.Type). Error: method
System.Type System.Type::GetInterface(System.String)doesn't exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Void Pathfinding.Serialization.JsonFx.JsonWriter::Write(System.Object,System.Boolean). Error: method
System.Object System.Enum::ToObject(System.Type,System.UInt64)doesn't exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Enum[] Pathfinding.Serialization.JsonFx.JsonWriter::GetFlagList(System.Type,System.Object). Error: type
System.ComponentModel.TypeDescriptordoesn't exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Object Pathfinding.Serialization.JsonFx.TypeCoercionUtility::CoerceType(System.Type,System.Object). Error: method
System.ComponentModel.TypeConverter System.ComponentModel.TypeDescriptor::GetConverter(System.Type)doesn't exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Object Pathfinding.Serialization.JsonFx.TypeCoercionUtility::CoerceType(System.Type,System.Object). Error: type
System.ComponentModel.TypeDescriptordoesn't exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Object Pathfinding.Serialization.JsonFx.TypeCoercionUtility::CoerceType(System.Type,System.Object). Error: method
System.ComponentModel.TypeConverter System.ComponentModel.TypeDescriptor::GetConverter(System.Type)` doesn’t exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Object Pathfinding.Serialization.JsonFx.TypeCoercionUtility::CoerceType(System.Type,System.Object).
on a WP8,
Well, at least we are getting past compile.
Since it is the Json that is failing, try to go to the Optimizations tab and enable “ASTAR_NO_JSON” (and later “ASTAR_NO_ZIP” if zipping also causes problems) and then create a small scene which only uses a point graph (only those can be serialized without json right now).
Working on fixing the incompatibilities in the json library.
I have tried to make everything compatible with windows phone now. Here is the new dll: http://arongranberg.com/wp-content/uploads/astarpathfinding/Pathfinding.JsonFx.dll
This dll will probably not compile in Unity, but you should be able to run a build on windows phone.
Xamarin scan: http://scan.xamarin.com/Home/Report?scanId=6978c918-b5fd-43f3-a875-64a0174a8533 says it is 100% compatible with windows phone, only 81% compatible with windows store though.
At least now the main project (without dll extensions) is 100% compatible with both windows phone and windows store: http://scan.xamarin.com/Home/Report?scanId=35ca572c-768a-433a-8a62-eb70dbefdfd2
Well then compilation within the Unity is not possible for now
Unity editor will not be able to compile stuff, but you can try to make a build for windows phone, hopefully that will work.
If it works I will have to supply two dll files, one for the editor and one for the build.
Error was generating during compile time
Error building Player: Exception: Error: method System.Type System.Type::GetInterface(System.String)
doesn’t exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Type Pathfinding.Serialization.JsonFx.JsonReader::GetGenericDictionaryType(System.Type).
Error: method System.Type System.Type::GetInterface(System.String)
doesn’t exist in target framework. It is referenced from Pathfinding.JsonFx.dll at System.Void Pathfinding.Serialization.JsonFx.JsonReader::PopulateObject(System.Object&,System.Type,System.Collections.Generic.Dictionary`2<System.String,System.Reflection.MemberInfo>,System.Type).
I’ve changed the Dll, but no use
Sure you have switched out the dll in all places (if there are multiple)? Because that method is not called in the dll I sent you.
Again after changing Dll,
TypeLoadException: Could not load type ‘System.Reflection.TypeInfo’ from assembly ‘mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’.
Pathfinding.Serialization.JsonFx.JsonWriter.Write (System.Object value)
Pathfinding.Serialization.AstarSerializer.SerializeUserConnections (Pathfinding.UserConnection[] conns) (at Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs:200)
Pathfinding.AstarData.SerializeGraphsPart (Pathfinding.Serialization.AstarSerializer sr) (at Assets/AstarPathfindingProject/Core/AstarData.cs:222)
AstarPathEditor+c__AnonStorey1.<>m__2 (Boolean force) (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:2355)
AstarPath.ProcessWorkItems (Boolean force) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:814)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/SceneView/SceneView.cs:1649)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/SceneView/SceneView.cs:1051)
UnityEditor.SceneView.OnGUI () (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/SceneView/SceneView.cs:928)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Yes, you would get that in the editor. Even though it will definitely throw errors in the editor right now, try to build a win phone app from it, that should not throw those errors.
During the build time of the App these errors are generating and the build was aborting, Or you are saying other context Couldn’t understand aron
Those errors are definitely not from the build process. If you look at the stacktrace they are from OnSceneGUI (i.e the method which draws the scene view in the unity editor).
After replacing the DLL, No graphs are in scene !!!