Class CreateInstanceOnInspectionAttribute | Properties UI | 1.4.4-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class CreateInstanceOnInspectionAttribute

    Tag a field or a property to try to create a new instance if it is null.

    Inheritance
    Object
    Attribute
    PropertyAttribute
    InspectorAttribute
    CreateInstanceOnInspectionAttribute
    Inherited Members
    PropertyAttribute.order
    Namespace: Unity.Properties.UI
    Syntax
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
    public class CreateInstanceOnInspectionAttribute : InspectorAttribute, _Attribute

    Constructors

    CreateInstanceOnInspectionAttribute()

    Constructs a new instance of CreateInstanceOnInspectionAttribute.

    Declaration
    public CreateInstanceOnInspectionAttribute()

    CreateInstanceOnInspectionAttribute(Type)

    Constructs a new instance of CreateInstanceOnInspectionAttribute with the specified Type.

    Declaration
    public CreateInstanceOnInspectionAttribute(Type type)
    Parameters
    Type Name Description
    Type type

    The targeted Type when creating a new instance.

    Properties

    Type

    Returns the type of the instance that should be instantiated.

    Declaration
    public Type Type { get; }
    Property Value
    Type Description
    Type
    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