Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

InsaneQA

4
Posts
2
Topics
1
Following
A member registered Dec 30, 2019

Recent community posts

Hi again!

We have discussed the geojson for Unity in this post https://itch.io/t/643400/geojson-export-for-unity3d-integration 

After building the first version of the importer, I haven't tried to import/export any map.

Today, I've tried to export a new map and failed:( It seems that json Feature objects for new maps don't have "geometry" (it is totally required by the standard https://tools.ietf.org/html/rfc7946#section-3.2)

Have the export code was updated somehow?

Done!

The Unity importer can be found here: https://github.com/InsaneQA/UnityMedievalCityImporter

The unitypackage is in the root of the repository

Sure, no need to worry - I've already handled the missing points in the code. 

There is also a situation when a building is imported with only 3 points and the last point equals to the first point (it's basically a line). I simply remove those buildings as well in the importer. 

Thanks!

A small update: I've added a script to fix the Json problem. The script will also remove any ring with 3 points or less, since it's not allowed by the GeoJson specification.

Hi!

I've started creating a 2D medieval game in Unity, and I must say that the Medieval Fantasy City Generator is totally superb, especially with the GeoJson export available!

However, it seems there is a bug in every exported json (please see the image below. I've used http://geojson.io/ for validation):

Basically, the first and the last points in the array should be the same. With this bug, the FeatureCollection object cannot be correctly deserialized. It can only be reproduced for buildings (not earth or walls).

 watabou, could you please fix the bug if that's not too timeconsuming?

I've fixed the bug manually for 2 documents (it took about 15-20 minutes), and here is the result of the mesh generation:

That's the first day of work with the GeoJson, so there are some buildings with the wrong shape, and the city is mirrowed, however it seems I'm on the right track.

I'm going to share the deserialization tool for Unity after it's done.