Load()
Loads the object synchronously. Blocks until loading is complete.
阅读时间1 分钟最后更新于 1 个月前
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