Cammin / LDtkToUnity

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

Rectangle entity grid size mismatch #46

Closed codetaylor closed 1 year ago

codetaylor commented 1 year ago

Hello, thank you for this amazing tool!

image I have two layers, one IntGrid with rules and one Entity layer.

The IntGrid layer has a grid size of 16 and the Entity layer is 8.

image Snapping a rectangle entity on the 8x8 Entity layer works as expected in LDtk.

image When importing into Unity, the rectangle entity is twice the size it should be.

image If I change the grid size of the Entity 8x8 layer to 16 before saving...

image ... the imported size is correct.

image

Cammin commented 1 year ago

Hi, I will look into this so the expected size remains. Thank you :) For now, you can make the entity's grid size match the remaining standard of your project.

Cammin commented 1 year ago

Rectangle entity grid size mismatch

Cammin commented 1 year ago

Looking at this right now, it appears to only be a visual bug; the entity gameobject scale works as expected when I checked in the Entities example, though the scene-drawn box was twice the size, much like your issue above.

I will make a fix so that the editor gizmo is the expected size. But just know that it shouldn't functionally affect any of your objects in an unexpected way :)

Cammin commented 1 year ago

The fix is done :) I'll pack it in with the next minor update and post back here

Cammin commented 1 year ago

Hi, the update with this fix is out! (3.3.2) I will close this now, but feel free to reopen it if nessesary.