docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GameObjectBrushEditor

    The Brush Editor for a GameObject Brush.

    Inheritance
    object
    Object
    ScriptableObject
    Editor
    GridBrushEditorBase
    GameObjectBrushEditor
    Inherited Members
    GridBrushEditorBase.tooltip
    GridBrushEditorBase.OnSelectionInspectorGUI()
    GridBrushEditorBase.OnSelectionSceneGUI(GridLayout, GameObject)
    GridBrushEditorBase.OnSceneGUI(GridLayout, GameObject)
    GridBrushEditorBase.OnMouseLeave()
    GridBrushEditorBase.OnMouseEnter()
    GridBrushEditorBase.OnToolActivated(GridBrushBase.Tool)
    GridBrushEditorBase.OnToolDeactivated(GridBrushBase.Tool)
    GridBrushEditorBase.RegisterUndo(GameObject, GridBrushBase.Tool)
    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.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.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.Extras.Editor.dll
    Syntax
    [CustomEditor(typeof(GameObjectBrush))]
    public class GameObjectBrushEditor : GridBrushEditorBase

    Properties

    brush

    The GameObjectBrush for this Editor

    Declaration
    public GameObjectBrush brush { get; }
    Property Value
    Type Description
    GameObjectBrush

    canChangeZPosition

    Whether the GridBrush can change Z Position.

    Declaration
    public override bool canChangeZPosition { get; set; }
    Property Value
    Type Description
    bool
    Overrides
    UnityEditor.Tilemaps.GridBrushEditorBase.canChangeZPosition

    icon

    Returns an icon identifying the GameObject Brush.

    Declaration
    public override Texture2D icon { get; }
    Property Value
    Type Description
    Texture2D
    Overrides
    UnityEditor.Tilemaps.GridBrushEditorBase.icon

    shouldSaveBrushForSelection

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

    Declaration
    public override bool shouldSaveBrushForSelection { get; }
    Property Value
    Type Description
    bool
    Overrides
    UnityEditor.Tilemaps.GridBrushEditorBase.shouldSaveBrushForSelection

    validTargets

    The targets that the GameObjectBrush can paint on

    Declaration
    public override GameObject[] validTargets { get; }
    Property Value
    Type Description
    GameObject[]
    Overrides
    UnityEditor.Tilemaps.GridBrushEditorBase.validTargets

    Methods

    OnPaintInspectorGUI()

    Callback for painting the inspector GUI for the GameObjectBrush in the tilemap palette. The GameObjectBrush Editor overrides this to show the usage of this Brush.

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

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

    Callback for painting the GUI for the GridBrush in the Scene View. The GameObjectBrush Editor overrides this to draw the preview of the brush when drawing lines.

    Declaration
    public override 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 GameObjectBrush::ref::Tool operation. By default the currently selected GameObject.

    BoundsInt position

    Current selected location of the brush.

    GridBrushBase.Tool tool

    Current GameObjectBrush::ref::Tool selected.

    bool executing

    Whether brush is being used.

    Overrides
    GridBrushEditorBase.OnPaintSceneGUI(GridLayout, GameObject, BoundsInt, GridBrushBase.Tool, bool)

    RenderStaticPreview(string, Object[], int, int)

    Creates a static preview of the GameObjectBrush 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.

    int width

    Width of the created texture.

    int height

    Height of the created texture.

    Returns
    Type Description
    Texture2D

    Generated texture or null.

    Overrides
    Editor.RenderStaticPreview(string, Object[], int, int)
    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)