SuperTiled2Unity icon indicating copy to clipboard operation
SuperTiled2Unity copied to clipboard

Prefab replacement weird offsets on import

Open MorningstarPhoenix opened this issue 4 years ago • 1 comments

So long story short, in Tiled I have an object placeholder. I set SuperTiled2Unity to automatically replace my placeholder (via the settings) with a prefab, but when imported the first time I noticed there was a big offset (7.5f on the x and 8.5f on the y).

The next day I changed a couple of things and reimported, the offset was 8.5 on both axis.

Fast forward to today, I added a new placeholder and no offset was present upon importing.

Any idea why?

MorningstarPhoenix avatar Mar 20 '21 16:03 MorningstarPhoenix

When you open your prefab in unity, take note of the (local) position of the root transform - that value is used as an offset for the point in space where all replacement prefab instances spawn. After changing the prefab, you may need to reimport assets, or modify the object layer in Tiled to force a reimport

NDGarrett avatar Mar 31 '21 01:03 NDGarrett