Class GroupBrush
This Brush helps to pick Tiles which are grouped together by position. Gaps can be set to identify if Tiles belong to a Group. Limits can be set to ensure that an over-sized Group will not be picked. Use this as an example to create brushes that have the ability to choose and pick whichever Tiles it is interested in.
Inherited Members
Namespace: UnityEditor .Tilemaps
Assembly: Unity.2D.Tilemap.Extras.Editor.dll
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.2d.tilemap.extras@latest/index.html?subfolder=/manual/GroupBrush.html")]
[CustomGridBrush(true, false, false, "Group Brush")]
public class GroupBrush : GridBrush
Properties
gap
The gap in cell count before stopping to consider a Tile in a Group
Declaration
public Vector3Int gap { get; set; }
Property Value
Type | Description |
---|---|
Vector3Int |
limit
The count in cells beyond the initial position before stopping to consider a Tile in a Group
Declaration
public Vector3Int limit { get; set; }
Property Value
Type | Description |
---|---|
Vector3Int |
Methods
Pick(GridLayout, GameObject, BoundsInt, Vector3Int)
Picks tiles from selected Tilemaps and child GameObjects, given the coordinates of the cells. The GroupBrush overrides this to locate groups of Tiles from the picking position.
Declaration
public override void Pick(GridLayout grid, GameObject brushTarget, BoundsInt position, Vector3Int pickStart)
Parameters
Type | Name | Description |
---|---|---|
Grid |
grid | Grid to pick data from. |
Game |
brushTarget | Target of the picking operation. By default the currently selected GameObject. |
Bounds |
position | The coordinates of the cells to paint data from. |
Vector3Int | pickStart | Pivot of the picking brush. |