Documentation

Unity Engine

Download Unity

Unity Engine

Value

A reference to the root of the blob data.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AnimationModule
public readonly ref T Value { get; }

Remarks

The returned reference points into the blob data, it isn't a copy. It stays valid only until you dispose this reference, so don't keep it after you call BlobObjectReference<T>.Dispose. To read the data from a job, store the
BlobObjectReference
in the job, not the value.
The data is shared with the object it comes from and with the other references to it, so don't modify it.
Keep the value in a
ref
local, and pass it by reference to the methods that take the blob. Don't copy the value into a local variable, and don't pass it as an
in
argument or store it in a
ref readonly
variable. The arrays of a blob are stored at offsets that are relative to the blob memory, so they are invalid in a copy.