"there are no graphs in the scene" on iOS without disabling stripping

Hello

I’m having trouble running the project on iOS, I get the error “there are no graphs in the scene” in Xcode and it seems that the only way to fix it is to completely disable stripping.
Is there a way to fix this problem without disabling it?

So far this project has been amazingly useful so I’m looking forward to having it running properly on iOS.

Thanks in advance

Hi

Please follow the instructions here: http://arongranberg.com/astar/docs/iphone.php

Cheers,
Aron

Hi Aron

Thank you for such a fast response. I probably should have mentioned I have followed that guide. I’m not using the Fast But No Exceptions or micro mscorlib but did move the link.xml file. Is there a step I have missed?

Hm… Try using the fix for Fast But No Exceptions… I don’t think it should be required, but try it anyway.

Are you getting any other errors?

Hi Aron

I tried using the fast but no exceptions fix like you suggested while actually using fast but no exceptions and also without and I am getting Json serialisation errors.
“Caught exception while deserializing data.
System.MissingMethodException: Method not found: 'Default constructor not found…ctor() of…” etc etc
I tried turning off Json using #define ASTAR_NO_JSON (assuming that’s what it actually does) hoping this would fix it but hasn’t done.

With stripping still on the only error I’m getting is no graphs in the scene error.

Hi

Could you paste that entire stacktrace please?

ASTAR_NO_JSON does disable json, but since graph settings are saved as json in the editor as well, you will have to reconfigure all your graphs if you enable it since it will not be able to load the ones that were saved using json.

Hi Aron

I’m sorry it’s taking me so long to respond but I only have access to the machine with the project on during the day. Recreating the graphs I have wouldn’t be a problem because I only have 1. If you think this would be an effective work around I am happy to try it.
Stack trace…

Caught exception while deserializing data.
System.MissingMethodException: Method not found: ‘Default constructor not found…ctor() of System.ComponentModel.UInt32Converter’.
at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in :0
at System.Activator.CreateInstance (System.Type type) [0x00000] in :0
at System.ComponentModel.TypeDescriptor.GetConverter (System.Type type) [0x00000] in :0
at Pathfinding.Serialization.JsonFx.TypeCoercionUtility.CoerceType (System.Type targetType, System.Object value) [0x00000] in :0
at Pathfinding.Serialization.JsonFx.JsonReader.ReadNumber (System.Type expectedType) [0x00000] in :0
at Pathfinding.Serialization.JsonFx.JsonReader.Read (System.Type expectedType, Boolean typeIsHint) [0x00000] in :0
at Pathfinding.Serialization.JsonFx.JsonReader.PopulateObject (System.Object& result, System.Type objectType, System.Collections.Generic.Dictionary`2 memberMap, System.Type genericDictionaryType) [0x00000] in :0
at Pathfinding.Serialization.JsonFx.JsonReader.PopulateObject (System.Object& obj) [0x00000] in :0
at Pathfinding.Serialization.JsonFx.JsonReader.PopulateObject[NavGraph] (Pathfinding.NavGraph& obj) [0x00000] in :0
at Pathfinding.Serialization.AstarSerializer.DeserializeGraphs () [0x00000] in :0
at Pathfinding.AstarData.DeserializeGraphsPart (Pathfinding.Serialization.AstarSerializer sr) [0x00000] in :0
at Pathfinding.AstarData.DeserializeGraphs (System.Byte[] bytes) [0x00000] in :0

(Filename: /Applications/buildAgent/work/aeedb04a1292f85a/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)

Hi

Aha, that looks like a converter needed by serialization, but has been stripped out.
If you open the link.xml file mentioned previously, you will see a list of similar converters mentioned in it, it seems I have missed to add UInt32Converter, not all converters are used all the time, so for lots of people, it seems to have worked fine without it.

Add
<type fullname="System.ComponentModel.UInt32Converter" preserve="all"/>
to the link.xml file and you should be good to go.

Just in case, I have added a few more of those converters to it, here is the new file: http://pastebin.com/x7rpjrzD

Looks like that has fixed it. Thank you very much