docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DatumProperty<TValue, TDatum>

    Class used as a serialized field in a component for containing a typed value that is either directly serialized as a constant value or a reference to a ScriptableObject container for that data.

    Inheritance
    object
    DatumProperty<TValue, TDatum>
    AnimationCurveDatumProperty
    FloatDatumProperty
    IntDatumProperty
    StringDatumProperty
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.XR.CoreUtils.Datums
    Assembly: Unity.XR.CoreUtils.dll
    Syntax
    [Serializable]
    public abstract class DatumProperty<TValue, TDatum> where TDatum : Datum<TValue>
    Type Parameters
    Name Description
    TValue

    Value type.

    TDatum

    Datum asset type.

    Constructors

    DatumProperty()

    Default constructor which creates an empty datum asset reference.

    Declaration
    protected DatumProperty()
    See Also
    Datum<T>

    DatumProperty(TValue)

    Constructor setting initial value for the embedded constant.

    Declaration
    protected DatumProperty(TValue value)
    Parameters
    Type Name Description
    TValue value

    Initial value.

    See Also
    Datum<T>

    DatumProperty(TDatum)

    Constructor setting initial datum asset reference.

    Declaration
    protected DatumProperty(TDatum datum)
    Parameters
    Type Name Description
    TDatum datum

    Datum asset reference.

    See Also
    Datum<T>

    Properties

    ConstantValue

    The current constant value used when this property is set to "Use Value".

    Declaration
    protected TValue ConstantValue { get; }
    Property Value
    Type Description
    TValue
    See Also
    Datum<T>

    Datum

    The current datum asset reference used when this property is set to "Use Asset".

    Declaration
    protected Datum<TValue> Datum { get; }
    Property Value
    Type Description
    Datum<TValue>
    See Also
    Datum<T>

    Value

    Accessor for internal value held by this container. Getter/Setter uses the constant value if this property is set to "Use Value" and the associated datum's value is referenced if this property is set to "Use Asset".

    Declaration
    public TValue Value { get; set; }
    Property Value
    Type Description
    TValue
    See Also
    Datum<T>

    Operators

    implicit operator TValue(DatumProperty<TValue, TDatum>)

    Operator making it easy to treat the container property as the underlying internal value.

    Declaration
    public static implicit operator TValue(DatumProperty<TValue, TDatum> datumProperty)
    Parameters
    Type Name Description
    DatumProperty<TValue, TDatum> datumProperty

    Property to get the internal value of.

    Returns
    Type Description
    TValue

    Returns internal value represented by the property.

    See Also
    Datum<T>

    See Also

    Datum<T>
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)