Editing a rule
Rules are grid patterns that will decide if a specific tile should be painted on your layer.
To open the rule editor:
![](https://ldtk.io/wp-content/uploads/2020/12/image-13.png)
![](https://ldtk.io/wp-content/uploads/2020/12/image-15.png)
Grass
Here is a simple rule:
![](https://ldtk.io/wp-content/uploads/2020/12/image-19.png)
It says “Paint the tile if” :
- in any given cell, there is a “walls” IntGrid value (white)
- AND there is no “walls” value above.
Dirt
And here is another one:
![](https://ldtk.io/wp-content/uploads/2020/12/image-17.png)
This second one means: “Paint the tile if any given grid cell contains a “walls” value“.
Testing the rules
We should now have the following rules:
![](https://ldtk.io/wp-content/uploads/2020/12/image-20.png)
If you paint “walls” values to your IntGrid layer, the tiles will be drawn automatically:
![](https://ldtk.io/wp-content/uploads/2020/12/AutoLayer-ExampleDemo.gif)
Seeing actual data
If you press SHIFT+R key (or uncheck the Render option) in the Rules panel, you will see the “pure” IntGrid layer, without the tiles:
![](https://ldtk.io/wp-content/uploads/2020/12/AutoLayer-RenderDemo.gif)