docs.unity3d.com
    Show / Hide Table of Contents

    Class ObjectCreationButtonData

    (Obsolete) Used to create a game object in the editor and with a button

    Inheritance
    Object
    ObjectCreationButtonData
    ObjectCreationButtonDataGenericPrefab
    Namespace: Unity.MARS
    Syntax
    public abstract class ObjectCreationButtonData : ScriptableObject

    Fields

    m_ButtonName

    Name of the object being created

    Declaration
    protected string m_ButtonName
    Field Value
    Type Description
    String

    m_Icon

    Icon used for the object creation button

    Declaration
    protected DarkLightIconPair m_Icon
    Field Value
    Type Description
    DarkLightIconPair

    m_Tooltip

    Tooltip for the object creation button

    Declaration
    protected string m_Tooltip
    Field Value
    Type Description
    String

    Properties

    ButtonName

    Name of the object being created

    Declaration
    public string ButtonName { get; }
    Property Value
    Type Description
    String

    CreateInContextSelection

    Scene context that the object will be created in

    Declaration
    public ObjectCreationButtonData.CreateInContext CreateInContextSelection { get; }
    Property Value
    Type Description
    ObjectCreationButtonData.CreateInContext

    ObjectGUIContent

    Object creation button GUI content

    Declaration
    public GUIContent ObjectGUIContent { get; }
    Property Value
    Type Description
    GUIContent

    Methods

    CreateGameObject()

    Create a game object from the creation data

    Declaration
    public abstract bool CreateGameObject()
    Returns
    Type Description
    Boolean

    true if the object was created

    CreationButtonContent()

    Object creation button GUI content

    Declaration
    public GUIContent CreationButtonContent()
    Returns
    Type Description
    GUIContent

    Button GUI content

    GenerateInitialGameObject(String)

    Create an empty game object with a unique name at the parent transform with world scale applied

    Declaration
    protected static GameObject GenerateInitialGameObject(string objName)
    Parameters
    Type Name Description
    String objName

    Name of the object to apply unique version

    Returns
    Type Description
    GameObject

    Newly created game object

    Back to top
    Terms of use
    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