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

Export More Separate Files #726

Open
Cammin opened this issue Sep 8, 2022 · 0 comments
Open

Export More Separate Files #726

Cammin opened this issue Sep 8, 2022 · 0 comments

Comments

@Cammin
Copy link

Cammin commented Sep 8, 2022

I've been thinking about the possibility of exporting more JSON file types so that only modified files are processed in an optimal way.

But first, an explanation

In the Unity engine, when any file is changed (texture, script, etc), Unity automatically reimports the asset by reading the new file's text information. During which, it generates an asset out of it such as a sliced sprite from a texture.
My situation is that when an LDtk project is changed, then unity will automatically reimport the asset by reading the whole json and generating assets, such as a object hierarchy and many sprites+tiles.

The problem

The user could change anything in the LDtk project, and would need to wait through the entire import process every time in unity. (ex. Change entity settings, but then the sprites+tiles are reimported.)
For really large projects, this can add up a lot of time, especially for any menial iterative changes.
Additionally, reading the entire json file can take a long time for large projects. Whenever we can take read JSON files, the better.

Now, enter separate level files.
The great thing about separate levels is that only the level files that were changed are reimported in unity which saves on a lot of time. Then we can avoid having to reimport an entire ldtk project's definitions. The separate levels .ldtkl was an excellent concept that has dramatically improved the unity import experience in terms of speed.

Now my proposition

So to be in line with this, What I propose is to add more types of files to be able to be exported, just like separate levels.
As an example, the advantage with Tiled is that it exports a .tsx file which represents the atlas, so that it only needs to process the atlas and make unity sprite/tile assets when the actual tileset definitions was changed.

In addition to project and level, I request being able to export a json file format for each definition type:

  • Layer Def (.ldtklayer)
  • Entity Def (.ldtkentity)
  • Enum Def (.ldtkenum)
  • Tileset Def (.ldtktileset or .ldtkt)

Example:
image
image
These files can use the same conventions as separate level files; Have a relative path to them.

At the very least, I'd like to have separate tileset files, similar in concept to how tiled exports a .tsx file. It would make my own importing flow in unity a lot easier to work with large projects.
And the file extension could be .ldtkt if that's the only one being considered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant