Cammin / LDtkToUnity

Unity importer for the LDtk level editor
https://cammin.github.io/LDtkToUnity
MIT License
381 stars 38 forks source link

Help getting started please #20

Closed chaosdrop closed 3 years ago

chaosdrop commented 3 years ago

With no documentation for version 2 I am having a heck of a time getting started.

Could someone give me a quick and dirty how to, to re-make the AutoLayers_1_basic example?

I tried taking the AutoLayers_1_basic ldtk file saving as a new file, then import it back in and collision no longer works, and I can't figure out were the atlases are being generated to.

chaosdrop commented 3 years ago

Think I'm getting closer managed to notice that the example had a LDtkIntGridTile added to it in unity and making that got grind collisions working.

chaosdrop commented 3 years ago

For fellow super noobs who might wonder by: You most use an IntGrid for your tiles for collision to work, since you need to make a "LDtkIntGridTile" asset in unity. [right click in asset manager create -> LDtkIntGridTile ] set it to grid for collision and than map that tile to your IntGrid value in unity by selecting the ldtk file and and assigning it in the inspector, after that you need to reimport the asset or restart unity and basic grind collisions will be working.

Cammin commented 3 years ago

Hi, I'm currently working on the documentation right now so that it's all caught up. I'll definitely try making a simple startup guide as well 🙂

For now, it is indeed a bit difficult to fully understand because of no documentation updates, but it's my priority to make this as simple as possible, even without documentation. Most (if not all) fields have a tooltip that helps describe what they do. image

For the IntGrid Values section, By default, an empty field does use the default tile. This tile is only for rendering (in case the user wants to display their flat colours). Then if you'd like a custom collision, then create one and assign it to the fields.

I can't figure out were the atlases are being generated to.

All of the sprite slices are generated as an import result in the LDtk file, whether or not the sprite atlas field is actually used. image

In your previous GitHub issue, you mentioned the tilemap painter. I have not actually checked in with this, but it might be interesting to add support to generate a palette of all the tiles, in case anyone would like to paint tilemaps in unity after importing their levels in LDtk.

Thanks for posting this issue. It helps let me know about certain areas that could be better explained or improved upon 🙂
If you have any other issues then throw them my way.

Cammin commented 3 years ago

Hello again, I've updated all of the documentation to the new reworked content. This issue is now resolved, but feel free to reopen if there is any other need for help. 😃

Check out the new documentation contents: https://cammin.github.io/LDtkUnity/