docs.unity3d.com
    Show / Hide Table of Contents

    Class RuleOverrideTileEditor

    The Editor for a RuleOverrideTileEditor.

    Inheritance
    Object
    Object
    ScriptableObject
    Editor
    RuleOverrideTileEditor
    AdvancedRuleOverrideTileEditor
    Inherited Members
    Editor.CreateEditorWithContext(Object[], Object, Type)
    Editor.CreateEditorWithContext(Object[], Object)
    Editor.CreateCachedEditorWithContext(Object, Object, Type, Editor)
    Editor.CreateCachedEditorWithContext(Object[], Object, Type, Editor)
    Editor.CreateCachedEditor(Object, Type, Editor)
    Editor.CreateCachedEditor(Object[], Type, Editor)
    Editor.CreateEditor(Object)
    Editor.CreateEditor(Object, Type)
    Editor.CreateEditor(Object[])
    Editor.CreateEditor(Object[], Type)
    Editor.DrawPropertiesExcluding(SerializedObject, String[])
    Editor.DrawDefaultInspector()
    Editor.Repaint()
    Editor.CreateInspectorGUI()
    Editor.RequiresConstantRepaint()
    Editor.DrawHeader()
    Editor.OnHeaderGUI()
    Editor.ShouldHideOpenButton()
    Editor.DrawFoldoutInspector(Object, Editor)
    Editor.GetPreviewTitle()
    Editor.OnInteractivePreviewGUI(Rect, GUIStyle)
    Editor.GetInfoString()
    Editor.DrawPreview(Rect)
    Editor.ReloadPreviewInstances()
    Editor.UseDefaultMargins()
    Editor.Initialize(Object[])
    Editor.MoveNextTarget()
    Editor.ResetTarget()
    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.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    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, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    UnityEngine.Object.FindObjectsOfType(System.Type, System.Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    UnityEngine.Object.FindObjectOfType(System.Type, System.Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEditor
    Syntax
    [CustomEditor(typeof(RuleOverrideTile))]
    public class RuleOverrideTileEditor : Editor, IPreviewable, IToolModeOwner

    Fields

    k_GameObjectElementHeight

    Height for a GameObject Element

    Declaration
    public static float k_GameObjectElementHeight
    Field Value
    Type Description
    Single

    k_PaddingBetweenRules

    Padding between Rule Elements

    Declaration
    public static float k_PaddingBetweenRules
    Field Value
    Type Description
    Single

    k_SpriteElementHeight

    Height for a Sprite Element

    Declaration
    public static float k_SpriteElementHeight
    Field Value
    Type Description
    Single

    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, Int32, Boolean, Boolean)

    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

    Int32 index

    Index of the GameObject Element to draw

    Boolean active

    Whether the GameObject Element is active

    Boolean 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, Int32, Boolean, Boolean)

    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

    Int32 index

    Index of the Sprite Element to draw

    Boolean active

    Whether the Sprite Element is active

    Boolean 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(Int32)

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

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

    Index of the GameObject element

    Returns
    Type Description
    Single

    GUI element height for the GameObject element

    GetSpriteElementHeight(Int32)

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

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

    Index of the Sprite element

    Returns
    Type Description
    Single

    GUI element height for the Sprite element

    HasPreviewGUI()

    Whether the RuleOverrideTile has a preview GUI

    Declaration
    public override bool HasPreviewGUI()
    Returns
    Type Description
    Boolean

    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[], Int32, Int32)

    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

    Int32 width

    Width of the static preview

    Int32 height

    Height of the static preview

    Returns
    Type Description
    Texture2D

    Texture2D containing static preview for the RuleOverrideTile asset

    Overrides
    Editor.RenderStaticPreview(String, Object[], Int32, Int32)

    SaveTile()

    Saves any changes to the RuleOverrideTile

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