Hi!
I think I may’ve found a bug, but I wanted to write here just in case someone knows if there’s a fix for this. I’m using 2D Tilemaps in my project which plays/compiles fine in the Unity editor. However, when I try to build the project I get the following error:
Assets\Scripts\SetTiles.cs(111,28): error CS1061: 'Tilemap' does not contain a definition for 'SetEditorPreviewTile' and no accessible extension method 'SetEditorPreviewTile' accepting a first argument of type 'Tilemap' could be found (are you missing a using directive or an assembly reference?)
Since everything works fine up until I try to build the game (and the function SetEditorPreviewTile() does infact exist), I’m thinking this has to be a bug concerning Tilemap? I’m thinking I should send off a bug-report, but perhaps I’m wrong and there’s some easy fix to this? Does anyone what I can do to fix this? Thanks in advance!
Edit: If anyone encounters this problem, I didn’t find a solution that used preview-Tiles. To solve it I made another identical TileMap I call “PreviewTilemap” and paint on/off actual tiles on it. It’s a bit of a work-around but it works! I’ll go with that for now : ) Hope it helps someone!