docs.unity3d.com
    Show / Hide Table of Contents

    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
    GridBrush
    GroupBrush
    Inherited Members
    UnityEditor.Tilemaps.GridBrush.Init(UnityEngine.Vector3Int)
    UnityEditor.Tilemaps.GridBrush.Init(UnityEngine.Vector3Int, UnityEngine.Vector3Int)
    UnityEditor.Tilemaps.GridBrush.Paint(UnityEngine.GridLayout, UnityEngine.GameObject, UnityEngine.Vector3Int)
    UnityEditor.Tilemaps.GridBrush.Erase(UnityEngine.GridLayout, UnityEngine.GameObject, UnityEngine.Vector3Int)
    UnityEditor.Tilemaps.GridBrush.BoxFill(UnityEngine.GridLayout, UnityEngine.GameObject, UnityEngine.BoundsInt)
    UnityEditor.Tilemaps.GridBrush.BoxErase(UnityEngine.GridLayout, UnityEngine.GameObject, UnityEngine.BoundsInt)
    UnityEditor.Tilemaps.GridBrush.FloodFill(UnityEngine.GridLayout, UnityEngine.GameObject, UnityEngine.Vector3Int)
    UnityEditor.Tilemaps.GridBrush.Rotate(UnityEngine.GridBrushBase.RotationDirection, UnityEngine.GridLayout.CellLayout)
    UnityEditor.Tilemaps.GridBrush.Flip(UnityEngine.GridBrushBase.FlipAxis, UnityEngine.GridLayout.CellLayout)
    UnityEditor.Tilemaps.GridBrush.MoveStart(UnityEngine.GridLayout, UnityEngine.GameObject, UnityEngine.BoundsInt)
    UnityEditor.Tilemaps.GridBrush.MoveEnd(UnityEngine.GridLayout, UnityEngine.GameObject, UnityEngine.BoundsInt)
    GridBrush.Reset()
    UnityEditor.Tilemaps.GridBrush.UpdateSizeAndPivot(UnityEngine.Vector3Int, UnityEngine.Vector3Int)
    UnityEditor.Tilemaps.GridBrush.SetTile(UnityEngine.Vector3Int, UnityEngine.Tilemaps.TileBase)
    UnityEditor.Tilemaps.GridBrush.SetMatrix(UnityEngine.Vector3Int, UnityEngine.Matrix4x4)
    UnityEditor.Tilemaps.GridBrush.SetColor(UnityEngine.Vector3Int, UnityEngine.Color)
    UnityEditor.Tilemaps.GridBrush.GetCellIndex(UnityEngine.Vector3Int)
    GridBrush.GetCellIndex(Int32, Int32, Int32)
    GridBrush.GetCellIndex(Int32, Int32, Int32, Int32, Int32, Int32)
    GridBrush.GetCellIndexWrapAround(Int32, Int32, Int32)
    GridBrush.GetHashCode()
    GridBrush.size
    GridBrush.pivot
    GridBrush.cells
    GridBrush.cellCount
    UnityEditor.Tilemaps.GridBrush.canChangeZPosition
    Namespace: UnityEditor.Tilemaps
    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023