- Home /
Question by
Shpendicus · Jun 14, 2020 at 10:24 PM ·
tilemapbrush
brushtarget is not the same in CustomGridBrush
Hey guys,
I have recognized that when using :
[CustomGridBrush(false, true, false, "Candy Random Brush")]
public class MyRandomBrush : BasePrefabBrush
{
public override void Paint(GridLayout grid, GameObject brushTarget,
Vector3Int position)
{
var current = brushTarget.GetComponent<TileMap>();
}
IS DIFFERENT TO:
public override void Erase(GridLayout grid, GameObject brushTarget,
Vector3Int position)
{
var current = brushTarget.GetComponent<TileMap>();
}
even tho I checked if its the same tilemap they refer to and they do?
what is going on their, pls help, since I want the tilemap to "SetTile()" and"GetTile()"
Comment
Answer by Shpendicus · Jun 16, 2020 at 02:24 PM
Does really noone knows? I dont understand yet still why the brushtarget differs when I only use 1 tilemap to draw into ?
Your answer
![](https://koobas.hobune.stream/wayback/20220613000940im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
2D Tilemap increase custom Brush size 0 Answers
While in Editor, is there a way to know when a Tile is placed? 0 Answers
How can I use the GridBrush in Unity at runtime in the game? 3 Answers
2D Tilemap prefab brush doesn't paint the tile in the right place 0 Answers
Prefab Brush from 2d-extras not working in tilemap 7 Answers