DataReference#
A typed reference to a project datablock. Expose this on a Script to choose data in the Inspector, then resolve it with Scene.Data.Get(reference) in OnAttach or later.
public readonly record struct DataReference<T>(string Id)
where T : DataBlockUsage and examples
Record properties#
| Property | Type | Access | Constructor default |
|---|---|---|---|
Id | string | get; init; | required |
Id: The stable datablock ID.
Members: IsSet
IsSet#
public bool IsSet { get; }Whether data has been assigned. An unset reference cannot be resolved.
Related types#
Source#
- DataBlock.cs