docs.unity3d.com
    Show / Hide Table of Contents

    Class SerializedPropertyData

    Container class that holds a SerializedProperty together with its Attribute(s). Used to easily get and modify the attribute in an editor.

    Inheritance
    Object
    SerializedPropertyData
    Namespace: UnityEditor.MARS
    Syntax
    [MovedFrom("Unity.MARS")]
    public sealed class SerializedPropertyData

    Constructors

    SerializedPropertyData(SerializedProperty, Type, Attribute[])

    Creates a Serialized Parameter with the Serialized property at it's current iterator state.

    Declaration
    public SerializedPropertyData(SerializedProperty property, Type type, Attribute[] attributes)
    Parameters
    Type Name Description
    SerializedProperty property

    SerializedProperty value to store.

    Type type

    Value type of serialized property.

    Attribute[] attributes

    The attributes of the property being stored.

    Properties

    Attributes

    The attributes of the property.

    Declaration
    public Attribute[] Attributes { get; }
    Property Value
    Type Description
    Attribute[]

    DisplayName

    The display name of the serialized property value.

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

    Type

    Value type of serialized property.

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

    Value

    The serialized property stored in the parameter.

    Declaration
    public SerializedProperty Value { get; }
    Property Value
    Type Description
    SerializedProperty

    Methods

    AddAttribute<TAttribute>(TAttribute)

    Adds an attribute to the Attributes array.

    Declaration
    public void AddAttribute<TAttribute>(TAttribute attribute)
        where TAttribute : Attribute
    Parameters
    Type Name Description
    TAttribute attribute

    Attribute to add to the Attributes array.

    Type Parameters
    Name Description
    TAttribute

    Type of attribute to be added

    Copy()

    Returns a copy of the SerializedParameter with the SerializedProperty in it's current iterator state.

    Declaration
    public SerializedPropertyData Copy()
    Returns
    Type Description
    SerializedPropertyData

    GetAttribute<TAttribute>()

    Returns the first instance of the attribute type in the Attributes array.

    Declaration
    public TAttribute GetAttribute<TAttribute>()
        where TAttribute : Attribute
    Returns
    Type Description
    TAttribute

    First attribute of type in the Attributes array, null if no attribute.

    Type Parameters
    Name Description
    TAttribute
    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