Place RandomTile from script
Hello,
I am using the RuleTiles from the 2d extras package. In my current method of creating a procedural world, I am using: thisTilemap.SetTile(new Vector3Int(x, y, 0), regions[i].tile);
which basically sets tiles according to noise I create. The problem is since the RuleTiles are not exactly "Tile"s that go into the SetTile() method, I can't use them in my world. Is there a way I can convert the RuleTiles to Tiles?
Cheers
Answer by bertancoban · Apr 03, 2019 at 10:58 AM
I figured it out.
If you want to use RuleTile script from the 2d extras package as a tile in your methods but you can't, simply change the inheritance of the RuleTile script.
So instead of inheriting from RuleTile:TileBase, just replace TileBase with Tile and it works.
Your answer
Follow this Question
Related Questions
Obtain Sprite Data from Tile in a Grid Using Tile Coordinates 1 Answer
Solution for a Tiles Instantiated Object not appearing on Tile Palette? 0 Answers
Help with tile palette(Genuine Struggle) 0 Answers
I can't see tiles after Instantiate() a tilemap 1 Answer
How To Get Tile Cell Position 0 Answers