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.
Inheritance
Object
ScriptableObject
GridBrushBase
GridBrush
GroupBrush
Inherited Members
GridBrush.size
GridBrush.pivot
GridBrush.cells
GridBrush.cellCount
GridBrush.canChangeZPosition
GridBrush.Reset()
GridBrush.GetHashCode()
GridBrushBase.Select(GridLayout, GameObject, BoundsInt)
GridBrushBase.Move(GridLayout, GameObject, BoundsInt, BoundsInt)
GridBrushBase.ResetZPosition()
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetInstanceID()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.ToString()
Object.name
Object.hideFlags
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 |
GridLayout |
grid |
Grid to pick data from.
|
GameObject |
brushTarget |
Target of the picking operation. By default the currently selected GameObject.
|
BoundsInt |
position |
The coordinates of the cells to paint data from.
|
Vector3Int |
pickStart |
Pivot of the picking brush.
|
Overrides
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.