brnkhy / MapzenGo

Pokemon Go clone using Unity3D & Mapzen/OpenStreetMap
http://www.barankahyaoglu.com
MIT License
198 stars 59 forks source link

Just running the BasicLoader scene gets null reference exceptions #17

Closed flarb closed 8 years ago

flarb commented 8 years ago

I get a bunch of Null Reference Exceptions when I run the Basic Loader in the latest version:

NullReferenceException: Object reference not set to an instance of an object Assets.Models.Factories.BuildingFactory+cIterator1.MoveNext () (at Assets/MapzenGo/Models/Factories/BuildingFactory.cs:31) System.Linq.Enumerable+cIterator122[JSONObject,UnityEngine.MonoBehaviour].MoveNext () Assets.Tile.RunFactories (.JSONObject mapData) (at Assets/MapzenGo/Models/Tile.cs:94) Assets.Tile+<ConstructAsync>c__AnonStorey38.<>m__15 (.JSONObject mapData) (at Assets/MapzenGo/Models/Tile.cs:70) UniRx.Observer+Subscribe1[JSONObject].OnNext (.JSONObject value) (at Assets/MapzenGo/Plugins/UniRx/Scripts/Observer.cs:164) UniRx.Operators.ObserveOnObservable1+ObserveOn_[JSONObject].OnNext_ (.JSONObject value) (at Assets/MapzenGo/Plugins/UniRx/Scripts/Operators/ObserveOn.cs:159) UniRx.Scheduler+MainThreadScheduler+QueuedAction1[JSONObject].Invoke (System.Object state) (at Assets/MapzenGo/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs:203) UniRx.InternalUtil.ThreadSafeQueueWorker.ExecuteAll (System.Action`1 unhandledExceptionCallback) (at errors

brnkhy commented 8 years ago

I checked that and turns out it's just a simple type check issue. I'll keep trying different coordinates now but in case I cant find a sample (it doesnt crash in paris for me), can you post the coordinates?

brnkhy commented 8 years ago

dcf33a774568df13dbce2ad60bb38c15ffb40fdb should fix that, it's on dev branch at the moment but I'll soon push it on main as well