docs.unity3d.com
Search Results for

    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
    Object
    ScriptableObject
    GridBrushBase
    GridBrush
    GroupBrush
    Inherited Members
    GridBrush.size
    GridBrush.pivot
    GridBrush.cells
    GridBrush.cellCount
    GridBrush.canChangeZPosition
    GridBrush.lastPickedCellLayout
    GridBrush.lastPickedCellSwizzle
    GridBrush.lastPickedCellSize
    GridBrush.lastPickedCellGap
    GridBrush.Init(Vector3Int)
    GridBrush.Init(Vector3Int, Vector3Int)
    GridBrush.Paint(GridLayout, GameObject, Vector3Int)
    GridBrush.Erase(GridLayout, GameObject, Vector3Int)
    GridBrush.BoxFill(GridLayout, GameObject, BoundsInt)
    GridBrush.BoxErase(GridLayout, GameObject, BoundsInt)
    GridBrush.FloodFill(GridLayout, GameObject, Vector3Int)
    GridBrush.Rotate(GridBrushBase.RotationDirection, GridLayout.CellLayout)
    GridBrush.Flip(GridBrushBase.FlipAxis, GridLayout.CellLayout)
    GridBrush.MoveStart(GridLayout, GameObject, BoundsInt)
    GridBrush.MoveEnd(GridLayout, GameObject, BoundsInt)
    GridBrush.Reset()
    GridBrush.UpdateSizeAndPivot(Vector3Int, Vector3Int)
    GridBrush.SetTile(Vector3Int, TileBase)
    GridBrush.SetMatrix(Vector3Int, Matrix4x4)
    GridBrush.SetColor(Vector3Int, Color)
    GridBrush.GetCellIndex(Vector3Int)
    GridBrush.GetCellIndex(int, int, int)
    GridBrush.GetCellIndex(int, int, int, int, int, int)
    GridBrush.GetCellIndexWrapAround(int, int, int)
    GridBrush.GetHashCode()
    GridBrushBase.Select(GridLayout, GameObject, BoundsInt)
    GridBrushBase.Move(GridLayout, GameObject, BoundsInt, BoundsInt)
    GridBrushBase.ChangeZPosition(int)
    GridBrushBase.ResetZPosition()
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    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
    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
    GridBrush.Pick(GridLayout, GameObject, BoundsInt, Vector3Int)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)