Skip to main content
Version: 1.5.x

Class AssetOperationHandle

Assembly: YooAsset.dll
View Source
Declaration
public sealed class AssetOperationHandle : OperationHandleBase, IEnumerator, IDisposable

Properties

AssetObject

资源对象

View Source
Declaration
public Object AssetObject { get; }

Methods

WaitForAsyncComplete()

等待异步执行完毕

View Source
Declaration
public void WaitForAsyncComplete()

Release()

释放资源句柄

View Source
Declaration
public void Release()

Dispose()

释放资源句柄

View Source
Declaration
public void Dispose()

GetAssetObject<TAsset>()

获取资源对象

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

<TAsset>

Type Parameters
NameDescription
TAsset资源类型

InstantiateSync()

同步初始化游戏对象

View Source
Declaration
public GameObject InstantiateSync()
Returns

UnityEngine.GameObject

InstantiateSync(Transform)

View Source
Declaration
public GameObject InstantiateSync(Transform parent)
Returns

UnityEngine.GameObject

Parameters
TypeName
UnityEngine.Transformparent

InstantiateSync(Transform, bool)

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

UnityEngine.GameObject

Parameters
TypeName
UnityEngine.Transformparent
System.BooleanworldPositionStays

InstantiateSync(Vector3, Quaternion)

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

UnityEngine.GameObject

Parameters
TypeName
UnityEngine.Vector3position
UnityEngine.Quaternionrotation

InstantiateSync(Vector3, Quaternion, Transform)

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

UnityEngine.GameObject

Parameters
TypeName
UnityEngine.Vector3position
UnityEngine.Quaternionrotation
UnityEngine.Transformparent

InstantiateAsync()

异步初始化游戏对象

View Source
Declaration
public InstantiateOperation InstantiateAsync()
Returns

YooAsset.InstantiateOperation

InstantiateAsync(Transform)

View Source
Declaration
public InstantiateOperation InstantiateAsync(Transform parent)
Returns

YooAsset.InstantiateOperation

Parameters
TypeName
UnityEngine.Transformparent

InstantiateAsync(Transform, bool)

View Source
Declaration
public InstantiateOperation InstantiateAsync(Transform parent, bool worldPositionStays)
Returns

YooAsset.InstantiateOperation

Parameters
TypeName
UnityEngine.Transformparent
System.BooleanworldPositionStays

InstantiateAsync(Vector3, Quaternion)

View Source
Declaration
public InstantiateOperation InstantiateAsync(Vector3 position, Quaternion rotation)
Returns

YooAsset.InstantiateOperation

Parameters
TypeName
UnityEngine.Vector3position
UnityEngine.Quaternionrotation

InstantiateAsync(Vector3, Quaternion, Transform)

View Source
Declaration
public InstantiateOperation InstantiateAsync(Vector3 position, Quaternion rotation, Transform parent)
Returns

YooAsset.InstantiateOperation

Parameters
TypeName
UnityEngine.Vector3position
UnityEngine.Quaternionrotation
UnityEngine.Transformparent

Events

Completed

完成委托

View Source
Declaration
public event Action<AssetOperationHandle> Completed
Event Type

System.Action<YooAsset.AssetOperationHandle>

Implements

  • System.Collections.IEnumerator
  • System.IDisposable