Skip to content

Releases: Cammin/LDtkToUnity

4.0.1

29 Sep 06:23
Compare
Choose a tag to compare
  • Updated json support for LDtk 1.4
  • Fixed a compile error if Unity's Aseprite importer is also installed
  • Fixed an issue where the tileset file export app wasn't able to run on MacOS
  • Swapped the order of the TilemapCollider2D and CompositeCollider2D in layers to resolve a physics issue for particles
  • Updated the docs with content for the 4.0.0 update, among other tweaks

4.0.0

23 Sep 05:10
Compare
Choose a tag to compare

Major update that introduces the separate tileset file!

Additions

  • Added a new separate Tileset Definition File (.ldtkt)
    • LDtk will run a custom command to write these files to the same location as separate levels.
    • This tileset file now generates the sprites and tiles instead of the project file
    • Will only reimport when the tileset was changed in LDtk, saving on iteration time
    • Interacts with the sprite editor window:
      • Can change pivot point / border
      • Can define collision shapes
      • Can now access the customData and enumTags that are associated with tiles through the tilemap components
  • Added a new LDtkComponentWorld to the project's hierarchy
  • Added Identifier to LDtkNeighbour
  • Added a new field into the project importer inspector to specify the geometry type for composite colliders
  • Added support for blocking backups at a custom backup path

Quality of Life

  • Optimized the loading speed when separate levels lookup their dependencies
  • Failed imports will now display an error icon in the Project window
  • Updated codebase to support Unity 2023.1's various API changes
  • Largely improved the error/warning handling when importing
    • Less spam, more clear indications when something's wrong, displayed in the importer's UI.
    • Recreated a feature from Unity 2022.2+ for older unity versions to show errors/warnings in the importer inspectors to help point out issues
  • IntGrid tile fields in the inspector can now accept TileBase instead.
    • This allows more versatility. However, continue using the IntGridTile type to still utilize the Tag/Layer/PhysicsMaterial.

Fixes

  • Fixed a bug causing a failure to draw scene entity references and logging error spam
  • Fixed backups not blocking importing properly
  • The single World GameObject will now have it's dummyWorldIid set when using MultiWorlds

Breaking Changes

  • Generating Tileset definitions will be a hard requirement in order to import LDtk projects properly.
    • They are not automatically generated and need a quick one-time setup (It's relatively quick and painless)
    • To generate these, follow along with the guide displayed in the project import inspector
  • Changed the default tile for an empty tile field back to None collision. Make any fixes to reflect this change.
    • Because there are now two options for defining collision, turning off grid collision by default became more sensible.
  • Removed the SpriteAtlas field from the project importer
    • Instead, you can directly add a tileset file into a sprite atlas to pack it's sprites, much like the normal Unity workflow
    • Because sprites and tiles are now generated from each respective tileset file, the references to these assets will be lost if they were referenced prior
  • Level background sprites are now keyed by the level's identifier instead of the {name}{x}{y}{w}{h} format, so any prior references to these sprites may be lost
  • Removed the Export Button in the importer inspector until the feature is supported again

Note

At the moment, there isn't an easy way to define Tag, Layer, or Physics Material for Tile/Auto layers.

3.3.3

04 May 06:58
Compare
Choose a tag to compare
  • Added json support for the latest LDtk 1.3.2 update
  • Increased the minimum supported LDtk version to 1.3.0 due to a json restructure noted in the previous update
  • Updated samples

3.3.2

29 Apr 07:51
Compare
Choose a tag to compare
  • Added json support for the latest LDtk 1.3.0 update
  • Fixed a major bug related to LDtk 1.3.0's update
  • Fixed an entity reference scene drawer bug if a referenced object didn't exist
  • Fixed an entity scene drawer bug where the size of an entity was different than the expected size from LDtk
  • Updated Samples

Note

  • Due to an unforeseen json restructure, all previous versions of the importer will fail to import LDtk 1.3.0 files if there are any field instances within entity instances or levels.

3.3.1

27 Mar 06:09
Compare
Choose a tag to compare
  • Fixed an issue that was failing WebGL builds

3.3.0

15 Mar 06:57
Compare
Choose a tag to compare
  • Added support for the Table of contents toc data from the json root
  • Added support for the EntityDefinition.doc as tooltips in the entities section of the importer inspector
  • Added support for the LayerDefinition.doc as a Doc field in the LDtkComponentLayer
  • Point fields will now be represented by a child transform
    • This fixes the issue where points would always be positioned in world space instead of relative to the entity/level
    • The API is unchanged; It will still return a Vector2 from the fields component
  • Entity reference fields now have an additional option to access it's layer, level and world; Breaking change mentioned below
  • Fixed an issue where custom collider shapes for IntGrid value tiles would be scaled improperly if the sprite aspect was not the same as the textures
  • Minor fix to samples

Breaking Changes

  • The Json schema classes are changing their field types from double to float, and long to int. Re-correct your code if necessary
    • This change is to help streamline using the fields so that casts are not required, but also to match the LDtk Json docs
  • Because Point fields are being changed from Vector2s to Transforms, the serialized values are reset. This only impacts you if you set prefab overrides onto the point fields.
  • The API for getting the neighbours from the LDtkComponentLevel has changed; Re-correct your code if necessary
  • The API for getting entity references has changed; Re-correct your code if necessary

3.2.0

05 Feb 22:20
Compare
Choose a tag to compare
  • Replaced the Newtonsoft Json library with Utf8Json, which deserializes json assets significantly faster.
    ↳ The importer is now standalone and has no more dependency on an external library.
    ↳ The new library should fully support Unity in any of the supported versions and with IL2CPP. However if there are any direct compatibility issues, feel free to post an issue.
  • Fixed a load failure related to using the internal icons for any tile layer or field instance tiles.
  • Fixed an inconsequential error from appearing after clicking away from an importer with dirty changes and selecting save in the popup

3.1.6

13 Jan 04:47
Compare
Choose a tag to compare
  • Added json support for the latest LDtk 1.2.5 update
  • Updated Samples

Note: Currently the unity package also requires newtonsoft json to be installed manually.

3.1.5

08 Jan 10:06
Compare
Choose a tag to compare

A new version is available in the package manager. Check out the install wiki page to view how to install.

  • Added support for the FieldDefinition.doc from 1.2.0 as tooltips in LDtkFields
  • Fixed an important bug related to tile scaling for IntGrid collisions

Note: Currently the unity package also requires newtonsoft json to be installed manually.

3.1.4

03 Jan 08:59
Compare
Choose a tag to compare

A new version is available in the package manager. Check out the install wiki page to view how to install.

  • Added json support for the latest LDtk 1.2.0 update
    • Updated support for the new embedded tileset dimensions and where it's sourced from
    • Updated samples
  • Performed some optimizations:
    • Setting tiles to tilemaps in batches instead of individually for both IntGrid and tile layers
    • Started caching in an extremely performance-critical location related to getting assets via a name and rect
  • Fixed an issue with scaling tiles in a certain circumstance

As of this update, it's now possible to install via the GitHub releases as a .unitypackage.
Use them instead if it's a better option for you. But otherwise, the package manager is still the recommended installation method.
Note: Currently the unity package also requires newtonsoft json to be installed manually.