Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

BlobAssetReference<T0>.TryRead

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static bool TryRead(U binaryReader, int version, out BlobAssetReference`1 result);

Parameters

Parameter Description
binaryReader The reader for the blob data path
version Expected version number of the blob data.
result The resulting BlobAssetReference if the data was read successful.

Returns

bool True if the data was successfully read, false otherwise

Description

Reads bytes from a binary reader, validates the expected serialized version, and deserializes them into a new blob asset.


Declaration

public static bool TryRead(string path, int version, out BlobAssetReference`1 result);

Parameters

Parameter Description
path The path of the blob data to read.
version Expected version number of the blob data.
result The resulting BlobAssetReference if the data was read successful.

Returns

bool A bool if the read was successful or not.

Description

Reads bytes from a fileName, validates the expected serialized version, and deserializes them into a new blob asset.