Method TryRead
TryRead<U>(U, int, out BlobAssetReference<T>)
Reads bytes from a binary reader, validates the expected serialized version, and deserializes them into a new blob asset.
Declaration
public static bool TryRead<U>(U binaryReader, int version, out BlobAssetReference<T> result) where U : BinaryReader
Parameters
| Type | Name | Description | 
|---|---|---|
| U | binaryReader | The reader for the blob data path  | 
    
| int | version | Expected version number of the blob data.  | 
    
| BlobAssetReference<T> | result | The resulting BlobAssetReference if the data was read successful.  | 
    
Returns
| Type | Description | 
|---|---|
| bool | True if the data was successfully read, false otherwise  | 
    
Type Parameters
| Name | Description | 
|---|---|
| U | The type of binary reader  | 
    
TryRead(string, int, out BlobAssetReference<T>)
Reads bytes from a fileName, validates the expected serialized version, and deserializes them into a new blob asset.
Declaration
public static bool TryRead(string path, int version, out BlobAssetReference<T> result)
Parameters
| Type | Name | Description | 
|---|---|---|
| string | path | The path of the blob data to read.  | 
    
| int | version | Expected version number of the blob data.  | 
    
| BlobAssetReference<T> | result | The resulting BlobAssetReference if the data was read successful.  | 
    
Returns
| Type | Description | 
|---|---|
| bool | A bool if the read was successful or not.  |