docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RuleOverrideTileEditor

    The Editor for a RuleOverrideTileEditor.

    Inheritance
    object
    Object
    ScriptableObject
    Editor
    RuleOverrideTileEditor
    AdvancedRuleOverrideTileEditor
    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.CreateInspectorGUI()
    Editor.RequiresConstantRepaint()
    Editor.DrawHeader()
    Editor.OnHeaderGUI()
    Editor.ShouldHideOpenButton()
    Editor.DrawFoldoutInspector(Object, ref Editor)
    Editor.CreatePreview(VisualElement)
    Editor.GetPreviewTitle()
    Editor.OnInteractivePreviewGUI(Rect, GUIStyle)
    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
    Assembly: Unity.2D.Tilemap.Extras.Editor.dll
    Syntax
    [CustomEditor(typeof(RuleOverrideTile))]
    public class RuleOverrideTileEditor : Editor

    Fields

    k_GameObjectElementHeight

    Height for a GameObject Element

    Declaration
    public static float k_GameObjectElementHeight
    Field Value
    Type Description
    float

    k_PaddingBetweenRules

    Padding between Rule Elements

    Declaration
    public static float k_PaddingBetweenRules
    Field Value
    Type Description
    float

    k_SpriteElementHeight

    Height for a Sprite Element

    Declaration
    public static float k_SpriteElementHeight
    Field Value
    Type Description
    float

    m_GameObjects

    List of GameObjects and overriding GameObjects

    Declaration
    public List<KeyValuePair<GameObject, GameObject>> m_GameObjects
    Field Value
    Type Description
    List<KeyValuePair<GameObject, GameObject>>

    m_Sprites

    List of Sprites and overriding Sprites

    Declaration
    public List<KeyValuePair<Sprite, Sprite>> m_Sprites
    Field Value
    Type Description
    List<KeyValuePair<Sprite, Sprite>>

    Properties

    overrideTile

    The RuleOverrideTile being edited

    Declaration
    public RuleOverrideTile overrideTile { get; }
    Property Value
    Type Description
    RuleOverrideTile

    ruleTileEditor

    The RuleTileEditor for the overridden instance of the RuleTile

    Declaration
    public RuleTileEditor ruleTileEditor { get; }
    Property Value
    Type Description
    RuleTileEditor

    Methods

    DrawCustomFields()

    Draw editor fields for custom properties for the RuleOverrideTile

    Declaration
    public void DrawCustomFields()

    DrawGameObjectElement(Rect, int, bool, bool)

    Draws the GameObject element for the RuleOverride list

    Declaration
    public void DrawGameObjectElement(Rect rect, int index, bool active, bool focused)
    Parameters
    Type Name Description
    Rect rect

    Rect to draw the GameObject Element in

    int index

    Index of the GameObject Element to draw

    bool active

    Whether the GameObject Element is active

    bool focused

    Whether the GameObject Element is focused

    DrawGameObjectListHeader(Rect)

    Draws the header for the GameObject list

    Declaration
    public void DrawGameObjectListHeader(Rect rect)
    Parameters
    Type Name Description
    Rect rect

    GUI Rect to draw the header at

    DrawSpriteElement(Rect, int, bool, bool)

    Draws the Sprite element for the RuleOverride list

    Declaration
    public void DrawSpriteElement(Rect rect, int index, bool active, bool focused)
    Parameters
    Type Name Description
    Rect rect

    Rect to draw the Sprite Element in

    int index

    Index of the Sprite Element to draw

    bool active

    Whether the Sprite Element is active

    bool focused

    Whether the Sprite Element is focused

    DrawSpriteListHeader(Rect)

    Draws the header for the Sprite list

    Declaration
    public void DrawSpriteListHeader(Rect rect)
    Parameters
    Type Name Description
    Rect rect

    GUI Rect to draw the header at

    DrawTileField()

    Draws a field for the RuleTile be overridden

    Declaration
    public void DrawTileField()

    GetGameObjectElementHeight(int)

    Gets the GUI element height for a GameObject element with the given index

    Declaration
    public float GetGameObjectElementHeight(int index)
    Parameters
    Type Name Description
    int index

    Index of the GameObject element

    Returns
    Type Description
    float

    GUI element height for the GameObject element

    GetSpriteElementHeight(int)

    Gets the GUI element height for a Sprite element with the given index

    Declaration
    public float GetSpriteElementHeight(int index)
    Parameters
    Type Name Description
    int index

    Index of the Sprite element

    Returns
    Type Description
    float

    GUI element height for the Sprite element

    HasPreviewGUI()

    Whether the RuleOverrideTile has a preview GUI

    Declaration
    public override bool HasPreviewGUI()
    Returns
    Type Description
    bool

    True if RuleOverrideTile has a preview GUI. False if not.

    Overrides
    Editor.HasPreviewGUI()

    OnDisable()

    OnDisable for the RuleOverrideTileEditor

    Declaration
    public virtual void OnDisable()

    OnEnable()

    OnEnable for the RuleOverrideTileEditor

    Declaration
    public virtual void OnEnable()

    OnInspectorGUI()

    Draws the Inspector GUI for the RuleOverrideTileEditor

    Declaration
    public override void OnInspectorGUI()
    Overrides
    Editor.OnInspectorGUI()

    OnPreviewGUI(Rect, GUIStyle)

    Draws the preview GUI for the RuleTile

    Declaration
    public override void OnPreviewGUI(Rect rect, GUIStyle background)
    Parameters
    Type Name Description
    Rect rect

    Rect to draw the preview GUI

    GUIStyle background

    The GUIStyle of the background for the preview

    Overrides
    Editor.OnPreviewGUI(Rect, GUIStyle)

    OnPreviewSettings()

    Updates preview settings for the RuleOverrideTile.

    Declaration
    public override void OnPreviewSettings()
    Overrides
    Editor.OnPreviewSettings()

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

    Renders a static preview Texture2D for a RuleOverrideTile asset

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

    Asset path of the RuleOverrideTile

    Object[] subAssets

    Arrays of assets from the given Asset path

    int width

    Width of the static preview

    int height

    Height of the static preview

    Returns
    Type Description
    Texture2D

    Texture2D containing static preview for the RuleOverrideTile asset

    Overrides
    Editor.RenderStaticPreview(string, Object[], int, int)

    SaveTile()

    Saves any changes to the RuleOverrideTile

    Declaration
    public void SaveTile()
    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)