2d-extras icon indicating copy to clipboard operation
2d-extras copied to clipboard

Prefab brush bug.

Open RocketPrinter opened this issue 6 years ago • 1 comments

When calculating where to place the prefabs it doesn't take the tilemap position in consideration.

For example: you have a tilemap with the position set to x=50, y=0. You place a prefab at tile (100,0) but because it doesn't take the tilemap position in consideration, the prefab will appear at tile (50,0) not (100,0).

I have a link to a custom version of the script with the problem kinda fixed and some tweaks I made to be able to rotate the prefabs. https://paste.myst.rs/gfv

RocketPrinter avatar Aug 09 '19 10:08 RocketPrinter

The prefab brush does not take into consideration the position of the BrushTarget. Rather, it uses the position of the Grid but parents the instantiated Prefab to the BrushTarget.

I guess this can make it strange to use with your use case. Possibly a toggle can be added to determine which transform should take priority.

ChuanXin-Unity avatar Aug 21 '19 08:08 ChuanXin-Unity