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.
Inherited Members
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>