docs.unity3d.com
    Show / Hide Table of Contents

    Class RandomBrushEditor

    The Brush Editor for a Random Brush.

    Inheritance
    Object
    GridBrushEditorBase
    GridBrushEditor
    RandomBrushEditor
    Inherited Members
    GridBrushEditor.OnEnable()
    GridBrushEditor.OnDisable()
    GridBrushEditor.OnPaintSceneGUI(GridLayout, GameObject, BoundsInt, GridBrushBase.Tool, Boolean)
    GridBrushEditor.OnSelectionInspectorGUI()
    GridBrushEditor.OnMouseLeave()
    GridBrushEditor.OnToolDeactivated(GridBrushBase.Tool)
    GridBrushEditor.RegisterUndo(GameObject, GridBrushBase.Tool)
    UnityEditor.Tilemaps.GridBrushEditor.ErasePreview(UnityEngine.GridLayout, UnityEngine.GameObject, UnityEngine.Vector3Int)
    GridBrushEditor.BoxFillPreview(GridLayout, GameObject, BoundsInt)
    GridBrushEditor.FloodFillPreview(GridLayout, GameObject, Vector3Int)
    GridBrushEditor.brush
    GridBrushEditor.tooltip
    GridBrushEditor.canChangeZPosition
    UnityEditor.Tilemaps.GridBrushEditor.shouldSaveBrushForSelection
    GridBrushEditor.validTargets
    GridBrushEditorBase.OnSelectionSceneGUI(GridLayout, GameObject)
    GridBrushEditorBase.OnSceneGUI(GridLayout, GameObject)
    GridBrushEditorBase.OnMouseEnter()
    GridBrushEditorBase.OnToolActivated(GridBrushBase.Tool)
    Namespace: UnityEditor.Tilemaps
    Syntax
    [CustomEditor(typeof(RandomBrush))]
    public class RandomBrushEditor : GridBrushEditor

    Properties

    icon

    Returns an icon identifying the Random Brush.

    Declaration
    public override Texture2D icon { get; }
    Property Value
    Type Description
    Texture2D
    Overrides
    GridBrushEditor.icon

    Methods

    ClearPreview()

    Clears all RandomTileSet previews.

    Declaration
    public override void ClearPreview()
    Overrides
    GridBrushEditor.ClearPreview()

    OnPaintInspectorGUI()

    Callback for painting the inspector GUI for the RandomBrush in the Tile Palette. The RandomBrush Editor overrides this to have a custom inspector for this Brush.

    Declaration
    public override void OnPaintInspectorGUI()
    Overrides
    GridBrushEditorBase.OnPaintInspectorGUI()

    PaintPreview(GridLayout, GameObject, Vector3Int)

    Paints preview data into a cell of a grid given the coordinates of the cell. The RandomBrush Editor overrides this to draw the preview of the brush for RandomTileSets

    Declaration
    public override void PaintPreview(GridLayout grid, GameObject brushTarget, Vector3Int position)
    Parameters
    Type Name Description
    GridLayout grid

    Grid to paint data to.

    GameObject brushTarget

    Target of the paint operation. By default the currently selected GameObject.

    Vector3Int position

    The coordinates of the cell to paint data to.

    RenderStaticPreview(String, Object[], Int32, Int32)

    Creates a static preview of the RandomBrush with its current selection.

    Declaration
    public override Texture2D RenderStaticPreview(string assetPath, Object[] subAssets, int width, int height)
    Parameters
    Type Name Description
    String assetPath

    The asset to operate on.

    Object[] subAssets

    An array of all Assets at assetPath.

    Int32 width

    Width of the created texture.

    Int32 height

    Height of the created texture.

    Returns
    Type Description
    Texture2D

    Generated texture or null.

    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