跳到主要内容
版本:2.3.x

Class AssetHandle

Assembly: YooAsset.dll
Declaration
public sealed class AssetHandle : HandleBase, IEnumerator, IDisposable

Properties

AssetObject

资源对象

Declaration
public Object AssetObject { get; }

Methods

WaitForAsyncComplete()

等待异步执行完毕

Declaration
public void WaitForAsyncComplete()

GetAssetObject<TAsset>()

获取资源对象

Declaration
public TAsset GetAssetObject<TAsset>() where TAsset : Object
Returns

<TAsset>

Type Parameters
NameDescription
TAsset资源类型

InstantiateSync()

同步初始化游戏对象

Declaration
public GameObject InstantiateSync()
Returns

UnityEngine.GameObject

InstantiateSync(Transform)

Declaration
public GameObject InstantiateSync(Transform parent)
Returns

UnityEngine.GameObject

Parameters
TypeName
UnityEngine.Transformparent

InstantiateSync(Transform, bool)

Declaration
public GameObject InstantiateSync(Transform parent, bool worldPositionStays)
Returns

UnityEngine.GameObject

Parameters
TypeName
UnityEngine.Transformparent
System.BooleanworldPositionStays

InstantiateSync(Vector3, Quaternion)

Declaration
public GameObject InstantiateSync(Vector3 position, Quaternion rotation)
Returns

UnityEngine.GameObject

Parameters
TypeName
UnityEngine.Vector3position
UnityEngine.Quaternionrotation

InstantiateSync(Vector3, Quaternion, Transform)

Declaration
public GameObject InstantiateSync(Vector3 position, Quaternion rotation, Transform parent)
Returns

UnityEngine.GameObject

Parameters
TypeName
UnityEngine.Vector3position
UnityEngine.Quaternionrotation
UnityEngine.Transformparent

InstantiateAsync(bool)

异步初始化游戏对象

Declaration
public InstantiateOperation InstantiateAsync(bool actived = true)
Returns

YooAsset.InstantiateOperation

Parameters
TypeName
System.Booleanactived

InstantiateAsync(Transform, bool)

Declaration
public InstantiateOperation InstantiateAsync(Transform parent, bool actived = true)
Returns

YooAsset.InstantiateOperation

Parameters
TypeName
UnityEngine.Transformparent
System.Booleanactived

InstantiateAsync(Transform, bool, bool)

Declaration
public InstantiateOperation InstantiateAsync(Transform parent, bool worldPositionStays, bool actived = true)
Returns

YooAsset.InstantiateOperation

Parameters
TypeName
UnityEngine.Transformparent
System.BooleanworldPositionStays
System.Booleanactived

InstantiateAsync(Vector3, Quaternion, bool)

Declaration
public InstantiateOperation InstantiateAsync(Vector3 position, Quaternion rotation, bool actived = true)
Returns

YooAsset.InstantiateOperation

Parameters
TypeName
UnityEngine.Vector3position
UnityEngine.Quaternionrotation
System.Booleanactived

InstantiateAsync(Vector3, Quaternion, Transform, bool)

Declaration
public InstantiateOperation InstantiateAsync(Vector3 position, Quaternion rotation, Transform parent, bool actived = true)
Returns

YooAsset.InstantiateOperation

Parameters
TypeName
UnityEngine.Vector3position
UnityEngine.Quaternionrotation
UnityEngine.Transformparent
System.Booleanactived

Events

Completed

完成委托

Declaration
public event Action<AssetHandle> Completed
Event Type

System.Action<YooAsset.AssetHandle>

Implements

  • System.Collections.IEnumerator
  • System.IDisposable