Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import .geojson-files with custom Asset importer #6

Open
ElmarJ opened this issue May 3, 2020 · 2 comments
Open

Import .geojson-files with custom Asset importer #6

ElmarJ opened this issue May 3, 2020 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@ElmarJ
Copy link
Owner

ElmarJ commented May 3, 2020

Currently, we import the geojson-files as text assets using the .json extension.

  • One obvious disadvantage is that this means that UI only accepts .geojson-files with a .json extension. The .geojson extension is more common and should be supported as well.
  • On a larger scale, it would be an important step to allow two-way link between the geojson and the unity-app, enabling scenario's where in-editor changes and even runtime-changes to the maps, could be propagated back into the original geojson-files (e.g. on a git server).

Resources / interesting reads:

@ElmarJ ElmarJ added the enhancement New feature or request label May 3, 2020
@ElmarJ ElmarJ self-assigned this Jul 21, 2020
@ElmarJ ElmarJ added this to the v2.0 milestone Aug 3, 2020
@ElmarJ ElmarJ removed their assignment Aug 17, 2020
@ElmarJ
Copy link
Owner Author

ElmarJ commented Aug 17, 2020

This would mean not using TextAsset. Moving away from TextAsset would actually be a good idea, as it would also allow us te keep the .geojson-files out of the runtime assets - they are not used at runtime anyway.

@ElmarJ ElmarJ modified the milestones: v0.4.0, v0.5.0 Jan 10, 2022
@ElmarJ ElmarJ modified the milestones: v0.5.0, v0.6.0 Feb 14, 2022
@ElmarJ
Copy link
Owner Author

ElmarJ commented Sep 20, 2024

See https://docs.unity3d.com/Manual/ScriptedImporters.html for info on writing custom importers for specific file extensions. This would also make it easier to:

  1. Put the git submodule with geojson-files directly in the assets folder.
  2. Store metadata (such as original git-filelocation of the geojson file)

@ElmarJ ElmarJ changed the title Support .geojson extension Import .geojson-files with custom Asset importer Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant