docs.unity.cn
    Show / Hide Table of Contents

    Class Datum<T>

    ScriptableObject container class that holds a typed value. Can be referenced by multiple components in order to share the same set of data.

    Inheritance
    Object
    Object
    ScriptableObject
    Datum<T>
    AnimationCurveDatum
    FloatDatum
    IntDatum
    StringDatum
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils.Datums
    Syntax
    public abstract class Datum<T> : ScriptableObject
    Type Parameters
    Name Description
    T

    Value type held by this container.

    Properties

    BindableVariableReference

    Read-only bindable variable reference that can be used for subscribing to value changes when not set to read-only.

    Declaration
    public IReadOnlyBindableVariable<T> BindableVariableReference { get; }
    Property Value
    Type Description
    IReadOnlyBindableVariable<T>

    Comments

    Comment that shows up in the Inspector window. Useful for explaining the purpose of the datum.

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

    ReadOnly

    Controls whether the value in this datum is mutable or not.

    Declaration
    public bool ReadOnly { get; set; }
    Property Value
    Type Description
    Boolean

    Value

    Accessor for internal value. Setter only works if value is not read-only.

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

    Methods

    OnEnable()

    This function is called when the object is loaded. Updates the value of the bindable variable reference.

    Declaration
    protected void OnEnable()

    See Also

    DatumProperty<TValue, TDatum>
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Tuesday, July 18, 2023