Open aroman opened 2 years ago
As an update, I've confirmed that this issue is only present in Unity 2021 and 2022, but NOT on 2020. Latest versions of all of those release trains.
Thanks! I posted an update on this issue at https://forum.unity.com/threads/2021-2-0f1-tilemap-settiles-not-working-as-previous.1190572/#post-7682245, and hopefully will be able to confirm a fixed version for 2021.2 soon.
Hi,
There seems to be a rendering bug with 2d-extras, such that depending on the API used to programmatically set TileMap data from a script, the RuleTiles may appear "invisible".
In short, this code results in the tiles which are visible:
This code, however, does not:
Now, what's very strange is that both snippets work correctly if
someTile
is a regularTile
, rather than aRuleTile
. )In practice, the type ofsomeTile
isTileBase
, and I provide it from the inspector.)To be clear: in BOTH cases, the Tile data is being set in the TileMap. In fact, this can be confirmed graphically with the palette editor, which will change the brush preview correctly based on the underlying Tilemap data (see 1:48 in the video demonstration I linked below). The issue is, those tiles do not appear in either the game view, scene view, or built projects.
I made a brief video to demonstrate the bug: https://www.youtube.com/watch?v=uarGP83B5hQ