docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GridBrushEditorBase

    Base class for Grid Brush Editor.

    Inheritance
    object
    Object
    ScriptableObject
    Editor
    GridBrushEditorBase
    GridBrushEditor
    Inherited Members
    Editor.SaveChanges()
    Editor.DiscardChanges()
    Editor.CreateEditorWithContext(Object[], Object, Type)
    Editor.CreateEditorWithContext(Object[], Object)
    Editor.CreateCachedEditorWithContext(Object, Object, Type, ref Editor)
    Editor.CreateCachedEditorWithContext(Object[], Object, Type, ref Editor)
    Editor.CreateCachedEditor(Object, Type, ref Editor)
    Editor.CreateCachedEditor(Object[], Type, ref Editor)
    Editor.CreateEditor(Object)
    Editor.CreateEditor(Object, Type)
    Editor.CreateEditor(Object[])
    Editor.CreateEditor(Object[], Type)
    Editor.DrawPropertiesExcluding(SerializedObject, params string[])
    Editor.DrawDefaultInspector()
    Editor.Repaint()
    Editor.OnInspectorGUI()
    Editor.CreateInspectorGUI()
    Editor.RequiresConstantRepaint()
    Editor.DrawHeader()
    Editor.OnHeaderGUI()
    Editor.ShouldHideOpenButton()
    Editor.DrawFoldoutInspector(Object, ref Editor)
    Editor.HasPreviewGUI()
    Editor.CreatePreview(VisualElement)
    Editor.GetPreviewTitle()
    Editor.RenderStaticPreview(string, Object[], int, int)
    Editor.OnPreviewGUI(Rect, GUIStyle)
    Editor.OnInteractivePreviewGUI(Rect, GUIStyle)
    Editor.OnPreviewSettings()
    Editor.GetInfoString()
    Editor.DrawPreview(Rect)
    Editor.ReloadPreviewInstances()
    Editor.UseDefaultMargins()
    Editor.MoveNextTarget()
    Editor.ResetTarget()
    Editor.hasUnsavedChanges
    Editor.saveChangesMessage
    Editor.target
    Editor.targets
    Editor.serializedObject
    Editor.finishedDefaultHeaderGUI
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetEntityId()
    Object.GetInstanceID()
    Object.GetHashCode()
    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.Editor.dll
    Syntax
    [MovedFrom(true, "UnityEditor", "UnityEditor", null)]
    [CustomEditor(typeof(GridBrushBase))]
    public class GridBrushEditorBase : Editor

    Properties

    canChangeZPosition

    Checks if the Brush allows the changing of Z Position.

    Declaration
    public virtual bool canChangeZPosition { get; set; }
    Property Value
    Type Description
    bool

    Whether the Brush can change Z Position.

    icon

    Returns a texture used as an icon to identify this brush.

    Declaration
    public virtual Texture2D icon { get; }
    Property Value
    Type Description
    Texture2D

    shouldSaveBrushForSelection

    Whether the Brush is in a state that should be saved for selection.

    Declaration
    public virtual bool shouldSaveBrushForSelection { get; }
    Property Value
    Type Description
    bool

    tooltip

    Returns a tooltip describing the usage of the brush and other helpful information.

    Declaration
    public virtual string tooltip { get; }
    Property Value
    Type Description
    string

    validTargets

    Returns all valid targets that the brush can edit.

    Declaration
    public virtual GameObject[] validTargets { get; }
    Property Value
    Type Description
    GameObject[]

    Methods

    OnMouseEnter()

    Callback when the mouse cursor enters a paintable region.

    Declaration
    public virtual void OnMouseEnter()
    Remarks

    Implement this for any custom behaviour when the mouse cursor enters a paintable region.

    OnMouseLeave()

    Callback when the mouse cursor leaves a paintable region.

    Declaration
    public virtual void OnMouseLeave()
    Remarks

    Implement this for any custom behaviour when the mouse cursor leaves a paintable region.

    OnPaintInspectorGUI()

    Callback for painting the inspector GUI for the GridBrush in the tilemap palette.

    Declaration
    public virtual void OnPaintInspectorGUI()
    Remarks

    Implement this to have a custom editor in the tilemap palette for the GridBrush.

    OnPaintSceneGUI(GridLayout, GameObject, BoundsInt, Tool, bool)

    Callback for painting the GUI for the GridBrush in the Scene view.

    Declaration
    public virtual void OnPaintSceneGUI(GridLayout gridLayout, GameObject brushTarget, BoundsInt position, GridBrushBase.Tool tool, bool executing)
    Parameters
    Type Name Description
    GridLayout gridLayout

    Grid that the brush is being used on.

    GameObject brushTarget

    Target of the GridBrushBase::ref::Tool operation. By default the currently selected GameObject.

    BoundsInt position

    Current selected location of the brush.

    GridBrushBase.Tool tool

    Current GridBrushBase::ref::Tool selected.

    bool executing

    Whether is brush is being used.

    Remarks

    Implement this for any special behaviours when the GridBrush is used on the Scene View.

    OnSceneGUI(GridLayout, GameObject)

    Callback for painting custom gizmos for the GridBrush for the brush target

    Declaration
    public virtual void OnSceneGUI(GridLayout gridLayout, GameObject brushTarget)
    Parameters
    Type Name Description
    GridLayout gridLayout

    Grid that the brush is being used on.

    GameObject brushTarget

    Target of the GridBrushBase::ref::Tool operation. By default the currently selected GameObject.

    Remarks

    Override this to show custom gizmos for the brush target.

    OnSelectionInspectorGUI()

    Callback for drawing the Inspector GUI when there is an active GridSelection made in a GridLayout.

    Declaration
    public virtual void OnSelectionInspectorGUI()
    Remarks

    Override this to show custom Inspector GUI for the current selection.

    OnSelectionSceneGUI(GridLayout, GameObject)

    Callback for painting custom gizmos when there is an active GridSelection made in a GridLayout.

    Declaration
    public virtual void OnSelectionSceneGUI(GridLayout gridLayout, GameObject brushTarget)
    Parameters
    Type Name Description
    GridLayout gridLayout

    Grid that the brush is being used on.

    GameObject brushTarget

    Target of the GridBrushBase::ref::Tool operation. By default the currently selected GameObject.

    Remarks

    Override this to show custom gizmos for the current selection.

    OnToolActivated(Tool)

    Callback when a GridBrushBase.Tool is activated.

    Declaration
    public virtual void OnToolActivated(GridBrushBase.Tool tool)
    Parameters
    Type Name Description
    GridBrushBase.Tool tool

    Tool that is activated.

    Remarks

    Implement this for any special behaviours when a Tool is activated.

    OnToolDeactivated(Tool)

    Callback when a GridBrushBase.Tool is deactivated.

    Declaration
    public virtual void OnToolDeactivated(GridBrushBase.Tool tool)
    Parameters
    Type Name Description
    GridBrushBase.Tool tool

    Tool that is deactivated.

    Remarks

    Implement this for any special behaviours when a Tool is deactivated.

    RegisterUndo(GameObject, Tool)

    Callback for registering an Undo action before the GridBrushBase does the current GridBrushBase::ref::Tool action.

    Declaration
    public virtual void RegisterUndo(GameObject brushTarget, GridBrushBase.Tool tool)
    Parameters
    Type Name Description
    GameObject brushTarget

    Target of the GridBrushBase::ref::Tool operation. By default the currently selected GameObject.

    GridBrushBase.Tool tool

    Current GridBrushBase::ref::Tool selected.

    Remarks

    Implement this for any special Undo behaviours when a brush is used.

    In This Article
    Back to top
    Copyright © 2025 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)