ドキュメント

Unity Engine

Download Unity

Unity Engine

TryGetUntypedBlobData(out ReadOnlySpan<byte>, out ulong, out int)

Gets the data stored in this object without checking its type or version, for example to migrate data written with an older layout.
読み終わるまでの所要時間 1 分最終更新 2日前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AnimationModule

TryGetUntypedBlobData(ReadOnlySpan<byte>, ulong, int)

public bool TryGetUntypedBlobData(out ReadOnlySpan<byte> data, out ulong typeHash, out int version)

Parameters

The root of the blob, without its header.

typeHash

The type hash of the stored data. Refer to BlobObjectReference<T>.TypeHash.

version

The version of the stored data. The value is 0 if the object is empty.

Returns

Type

Description

boolReturns
true
if the object stores data. Otherwise, returns
false
. In that case,
data
is empty, and
typeHash
and
version
are 0.

Remarks

The span is a view of the stored data, not a copy. The span becomes invalid when the data of the object is replaced or the object is destroyed. Copy the data if you need to keep it. Call this method from the main thread.