Load()
Loads the object synchronously. Blocks until loading is complete.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: Unity.Loading
- Assembly: UnityEngine.ContentLoadModule
public T Load()
Returns
Type | Description |
|---|---|
| T | The loaded object, or |
Remarks
Load does not throw when the asset cannot be returned. Instead it returns , logs an error, and sets Loadable<T>.Status to LoadableStatus.Failed. This happens when the asset is not present in any registered content directory, when it has already been released, or when the loaded object cannot be cast to because the Loadable<T>.LoadableObjectId points at an object of an incompatible type.
nullT