Class EmbeddeAssetEditor<T> | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class EmbeddeAssetEditor<T>

    Helper for drawing embedded asset editors

    Inheritance
    System.Object
    EmbeddeAssetEditor<T>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ToString()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Cinemachine.Editor
    Syntax
    public class EmbeddeAssetEditor<T>
        where T : ScriptableObject
    Type Parameters
    Name Description
    T

    Constructors

    EmbeddeAssetEditor(String, UnityEditor.Editor)

    Create in OnEnable()

    Declaration
    public EmbeddeAssetEditor(string propertyName, UnityEditor.Editor owner)
    Parameters
    Type Name Description
    System.String propertyName
    UnityEditor.Editor owner

    Fields

    m_CreateButtonGUIContent

    Customize this after creation if you want

    Declaration
    public GUIContent m_CreateButtonGUIContent
    Field Value
    Type Description
    GUIContent

    OnChanged

    Called when the asset being edited was changed by the user.

    Declaration
    public EmbeddeAssetEditor<T>.OnChangedDelegate OnChanged
    Field Value
    Type Description
    EmbeddeAssetEditor.OnChangedDelegate<>

    OnCreateEditor

    Called after the asset editor is created, in case it needs to be customized

    Declaration
    public EmbeddeAssetEditor<T>.OnCreateEditorDelegate OnCreateEditor
    Field Value
    Type Description
    EmbeddeAssetEditor.OnCreateEditorDelegate<>

    Methods

    DestroyEditor()

    Declaration
    public void DestroyEditor()

    DrawEditorCombo(String, String, String, String, String, Boolean)

    Call this from OnInspectorGUI. Will draw the asset reference field, and the embedded editor, or a Create Asset button, if no asset is set.

    Declaration
    public void DrawEditorCombo(string title, string defaultName, string extension, string message, string showLabel, bool indent)
    Parameters
    Type Name Description
    System.String title
    System.String defaultName
    System.String extension
    System.String message
    System.String showLabel
    System.Boolean indent

    OnDisable()

    Free the resources in OnDisable()

    Declaration
    public void OnDisable()

    UpdateEditor()

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