- Home /
Question by
Arisstephenson · Jun 09, 2018 at 10:18 PM ·
tilemaptile
Scriptable Tile Issues
I am using a scriptable tile in my tilemap that has the following code:
[CreateAssetMenu]
public class BreakableTile : TileBase {
public GameObject GameObject;
public override void GetTileData(Vector3Int position, ITilemap tilemap, ref TileData tileData)
{
tileData.gameObject = GameObject;
base.GetTileData(position, tilemap, ref tileData);
}
}
When I create this in the create asset menu and then drag it into my tile palette it does not show up, but I am still able to click on it and paint it onto my tilemap. Asides from that, the scriptable tile works just how I wanted it to, except whenever I run my game a random tile appears near the origin that disappears when I switch into edit mode.
How can I fix these problems?
Comment
Your answer
Follow this Question
Related Questions
Removing a Tile from a Tilemap 2 Answers
How do I make the Collider match the sprite? 2 Answers
How can I compare two tilemaps by color? 1 Answer