You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Now, what's very strange is that both snippets work correctly if someTile is a regular Tile, rather than a RuleTile. )In practice, the type of someTile is TileBase, 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.
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.
aroman
changed the title
RuleTile graphical rendering bug with SetTilesBlock()
RuleTile graphical rendering bug with SetTilesBlock() in Unity 2021+
Nov 24, 2021
aroman
added a commit
to aroman/2d-extras
that referenced
this issue
Nov 24, 2021
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
The text was updated successfully, but these errors were encountered: