reinterpretcat / utymap

Highly customizable library for procedural world generation based on real map data
Apache License 2.0
958 stars 151 forks source link

Cannot setup object graph #127

Closed hiteshbpatel closed 5 years ago

hiteshbpatel commented 5 years ago

Hi, I found the map really interesting and amazing with 3D buildings. I am trying to run the demo application on my android phone. I am getting Fatal: Cannot setup object graph. Exception: System.InvalidOperationException. Is my build not proper?

reinterpretcat commented 5 years ago

This error is thrown when initialization process failed, see

https://github.com/reinterpretcat/utymap/blob/master/unity/demo/Assets/Scripts/Core/InitTask.cs

Actual error should be somewhere deeper in stack trace

hiteshbpatel commented 5 years ago

Okay. Thanks. Is there any general cause for this error? Can you tell what I must be doing wrong?

reinterpretcat commented 5 years ago

Missing core lib might be one of the reasons. Have you built it according to the docs?

hiteshbpatel commented 5 years ago

Yeah. First I built it on android and got the library, copied to the unity asset folder and created the application. I have followed the same instructions as given

hiteshbpatel commented 5 years ago

Hi, I was checking the logs for the application.

The app isn’t being able to generate modelBuilder in InitTask.cs. The android log says,

[Debug] file: read text from /storage/emulated/0/Android/data/com.utymap.demo/files/config/icon.schema.txt

But that icon.schema.txt file isn’t there on my phone, so isn't config folder too.

reinterpretcat commented 5 years ago

These files are part of streaming assets which are embedded to apk, so the error reason is something else

hiteshbpatel commented 5 years ago

Yeah I will look into it.

One more thing, I had been getting the below exception when I try to load the map in unity editor. I couldn't really figure out why it is so. Can you help me with this one please.

[Error] library:Cannot execute.. Exception: System.ArgumentException: An element with the same key already exists in the dictionary.

reinterpretcat commented 5 years ago

Without full stack trace it is hard to say what is the reason

hiteshbpatel commented 5 years ago

Hi, is there any way to find distance between 2 geo points using utymaps??

reinterpretcat commented 5 years ago

Yes, it is there:

In native: https://github.com/reinterpretcat/utymap/blob/master/core/src/utils/GeoUtils.hpp GeoUtils::distance

In managed: https://github.com/reinterpretcat/utymap/blob/master/unity/library/UtyMap.Unity/Utils/GeoUtils.cs GeoUtils.Distance

hiteshbpatel commented 5 years ago

You are the best. Thanks man.

I am trying to use utymaps & move the 3d- object on the basis of the current location of the user. I am having the problem with getting the current location & refreshing it.

The code works fine with another dummy project. I can detect the location & it updates but with utymaps it gives me (approximately correct) location and it doesn't update.

hiteshbpatel commented 5 years ago

Hi, Can you tell me what is the scale you have used in the utymaps. I mean how much meter is equivalent to 1 unity unit? Is it 1:1?

Also when the maps loads & the model lands on the maps, he always faces towards same direction. How is that working? Is is possible to face the object on the direction where user is facing using utymaps?