9655 lines
194 KiB
Markdown
9655 lines
194 KiB
Markdown
|
|
# YooAsset API Reference
|
|||
|
|
|
|||
|
|
> Auto-generated from https://www.yooasset.com/docs/api/YooAsset/
|
|||
|
|
> Generated on 2026-06-09 16:40:00
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class AllAssetsHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
全资源句柄,用于加载资源包内所有资源对象。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AllAssetsHandle.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class AllAssetsHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### AllAssetObjects
|
|||
|
|
|
|||
|
|
|
|||
|
|
所有资源对象集合
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AllAssetsHandle.cs#L56)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public IReadOnlyList<Object> AllAssetObjects { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AllAssetsHandle.cs#L46)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
当加载完成时触发
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AllAssetsHandle.cs#L24)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<AllAssetsHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.AllAssetsHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class AssetHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源句柄,用于管理单个资源对象的加载和访问。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AssetHandle.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class AssetHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### AssetObject
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AssetHandle.cs#L56)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Object AssetObject { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AssetHandle.cs#L45)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### GetAssetObject<TAsset>()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AssetHandle.cs#L71)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public TAsset GetAssetObject<TAsset>() where TAsset : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``<TAsset>``: 资源对象,如果句柄无效则返回 null。##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TAsset``资源类型
|
|||
|
|
|
|||
|
|
### InstantiateSync()
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步实例化游戏对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AssetHandle.cs#L82)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public GameObject InstantiateSync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``UnityEngine.GameObject``: 实例化的游戏对象### InstantiateSync(InstantiateOptions)
|
|||
|
|
同步实例化游戏对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AssetHandle.cs#L93)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public GameObject InstantiateSync(InstantiateOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``UnityEngine.GameObject``: 实例化的游戏对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.InstantiateOptions](/docs/api/YooAsset/InstantiateOptions)*options*实例化选项
|
|||
|
|
|
|||
|
|
### InstantiateAsync()
|
|||
|
|
|
|||
|
|
|
|||
|
|
实例化游戏对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AssetHandle.cs#L102)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public InstantiateOperation InstantiateAsync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.InstantiateOperation](/docs/api/YooAsset/InstantiateOperation): 实例化操作### InstantiateAsync(InstantiateOptions)
|
|||
|
|
实例化游戏对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AssetHandle.cs#L113)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public InstantiateOperation InstantiateAsync(InstantiateOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.InstantiateOperation](/docs/api/YooAsset/InstantiateOperation): 实例化操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.InstantiateOptions](/docs/api/YooAsset/InstantiateOptions)*options*实例化选项
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
当加载完成时触发
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/AssetHandle.cs#L23)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<AssetHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.AssetHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class AssetInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源信息类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/AssetInfo.cs#L43)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class AssetInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/AssetInfo.cs#L51)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetType
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源类型
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/AssetInfo.cs#L56)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Type AssetType { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Error
|
|||
|
|
|
|||
|
|
|
|||
|
|
错误信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/AssetInfo.cs#L61)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string Error { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsValid
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源信息是否有效
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/AssetInfo.cs#L94)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsValid { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Address
|
|||
|
|
|
|||
|
|
|
|||
|
|
可寻址地址
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/AssetInfo.cs#L105)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string Address { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetPath
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源路径
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/AssetInfo.cs#L118)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string AssetPath { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class AsyncOperationBase
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作基类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L11)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class AsyncOperationBase : IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### IsBusy
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前帧时间切片是否已用完
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L41)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected bool IsBusy { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Priority
|
|||
|
|
|
|||
|
|
|
|||
|
|
任务优先级(值越大越优先执行)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L55)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public uint Priority { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Progress
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作的处理进度(0f - 1f)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L73)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public float Progress { get; protected set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsDone
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作是否已结束
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L78)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsDone { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Error
|
|||
|
|
|
|||
|
|
|
|||
|
|
操作失败时的错误描述
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L89)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string Error { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Status
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作的当前状态
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L97)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public EOperationStatus Status { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForCompletion()
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步等待异步执行完毕
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L162)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForCompletion()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L285)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected abstract void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L290)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected abstract void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalAbort()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部中止方法(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L295)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected virtual void InternalAbort()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalDispose()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部释放方法(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L302)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected virtual void InternalDispose()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalGetDescription()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取操作的描述信息(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L310)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected virtual string InternalGetDescription()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 操作的描述字符串,默认返回空字符串。### InternalWaitForCompletion()
|
|||
|
|
内部同步等待方法(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L321)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected virtual void InternalWaitForCompletion()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### SetResult()
|
|||
|
|
|
|||
|
|
|
|||
|
|
将操作标记为成功完成
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L330)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected void SetResult()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### SetError(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
将操作标记为失败
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L342)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected void SetError(string error)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*error*错误描述
|
|||
|
|
|
|||
|
|
### CalculateMultiStageProgress(int, int, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算多阶段操作的整体进度
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L359)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected float CalculateMultiStageProgress(int stageIndex, int stageCount, int remaining, int total)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Single``: 返回归一化的整体进度值(0-1)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*stageIndex*当前阶段索引(从0开始)``System.Int32``*stageCount*阶段总数``System.Int32``*remaining*当前阶段剩余工作量``System.Int32``*total*当前阶段总工作量
|
|||
|
|
|
|||
|
|
### AddChildOperation(AsyncOperationBase)
|
|||
|
|
|
|||
|
|
|
|||
|
|
添加子任务
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L371)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected void AddChildOperation(AsyncOperationBase child)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AsyncOperationBase](/docs/api/YooAsset/AsyncOperationBase)*child*要添加的子任务
|
|||
|
|
|
|||
|
|
### RemoveChildOperation(AsyncOperationBase)
|
|||
|
|
|
|||
|
|
|
|||
|
|
移除子任务
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L398)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected void RemoveChildOperation(AsyncOperationBase child)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AsyncOperationBase](/docs/api/YooAsset/AsyncOperationBase)*child*要移除的子任务
|
|||
|
|
|
|||
|
|
### ExecuteOnce()
|
|||
|
|
|
|||
|
|
|
|||
|
|
执行一次更新逻辑
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L417)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected void ExecuteOnce()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ExecuteBatch(int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
批量执行一定次数的更新逻辑
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L432)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected void ExecuteBatch(int count = 1000)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*count*最大执行次数,默认1000次。
|
|||
|
|
|
|||
|
|
### ExecuteUntilComplete(int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
循环执行更新逻辑直到操作完成
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L457)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected void ExecuteUntilComplete(int sleepMilliseconds = 1)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*sleepMilliseconds*每次循环后的休眠时长(毫秒)
|
|||
|
|
|
|||
|
|
### CompareTo(AsyncOperationBase)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L672)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int CompareTo(AsyncOperationBase other)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Int32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.AsyncOperationBase](/docs/api/YooAsset/AsyncOperationBase)*other*
|
|||
|
|
|
|||
|
|
### GetAwaiter()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取用于 async/await 的等待器
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L683)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public OperationAwaiter GetAwaiter()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.OperationAwaiter](/docs/api/YooAsset/OperationAwaiter): 当前操作的等待器## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作的完成事件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/AsyncOperationBase.cs#L108)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<AsyncOperationBase> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.AsyncOperationBase>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct BundleDecryptArgs
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包解密操作的输入参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct BundleDecryptArgs
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileData
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包的二进制数据
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public byte[] FileData { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FilePath
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包的文件路径
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L27)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FilePath { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct BundleDownloaderOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
按资源信息创建下载器的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct BundleDownloaderOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### MaximumConcurrency
|
|||
|
|
|
|||
|
|
|
|||
|
|
最大并发数量
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int MaximumConcurrency { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RetryCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
失败后的重试次数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int RetryCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadBundleDependencies
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载资源对象所属资源包内所有资源对象依赖的资源包
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool DownloadBundleDependencies { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetInfos
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源信息列表
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L28)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo[] AssetInfos { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct BundleEncryptArgs
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包加密操作的输入参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleEncryptor.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct BundleEncryptArgs
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FilePath
|
|||
|
|
|
|||
|
|
|
|||
|
|
待加密的源文件路径
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleEncryptor.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FilePath { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct BundleEncryptResult
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包加密操作的返回结果
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleEncryptor.cs#L34)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct BundleEncryptResult
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### IsEncrypted
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件是否已加密
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleEncryptor.cs#L39)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsEncrypted { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### EncryptedFileData
|
|||
|
|
|
|||
|
|
|
|||
|
|
加密后的文件数据
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleEncryptor.cs#L44)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public byte[] EncryptedFileData { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class BundleFileHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包文件句柄,用于持有已加载的资源包引用。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/BundleFileHandle.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class BundleFileHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/BundleFileHandle.cs#L44)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
当加载完成时触发
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/BundleFileHandle.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<BundleFileHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.BundleFileHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct BundleImporterOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源导入的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L184)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct BundleImporterOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### MaximumConcurrency
|
|||
|
|
|
|||
|
|
|
|||
|
|
最大并发数量
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L189)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int MaximumConcurrency { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RetryCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
失败后的重试次数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L194)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int RetryCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleInfos
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包信息列表
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L199)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ImportBundleInfo[] BundleInfos { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct BundleUnpackInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包解包判定信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct BundleUnpackInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L14)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包文件名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L19)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleType
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包类型
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L24)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int BundleType { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsEncrypted
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否为加密资源包
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L29)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsEncrypted { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### TagCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
分类标签数量
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L34)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int TagCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetTag(int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取指定索引的分类标签
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L50)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string GetTag(int index)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Int32``*index*
|
|||
|
|
|
|||
|
|
### HasTag(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否包含指定的单个标签
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L58)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool HasTag(string tag)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*tag*
|
|||
|
|
|
|||
|
|
### HasAnyTag(string[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否包含指定标签数组中的任意一个
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L66)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool HasAnyTag(string[] tags)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String[]``*tags*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ClearCacheMethods
|
|||
|
|
|
|||
|
|
|
|||
|
|
缓存清理方式标识符
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheMethods.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class ClearCacheMethods
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ClearAllBundleFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有资源包文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheMethods.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string ClearAllBundleFiles = "ClearAllBundleFiles"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearUnusedBundleFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理未在使用的资源包文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheMethods.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string ClearUnusedBundleFiles = "ClearUnusedBundleFiles"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearBundleFilesByLocations
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理指定地址的资源包文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheMethods.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string ClearBundleFilesByLocations = "ClearBundleFilesByLocations"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearBundleFilesByTags
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理指定标签的资源包文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheMethods.cs#L27)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string ClearBundleFilesByTags = "ClearBundleFilesByTags"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearAllManifestFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有清单文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheMethods.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string ClearAllManifestFiles = "ClearAllManifestFiles"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearUnusedManifestFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理未在使用的清单文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheMethods.cs#L37)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string ClearUnusedManifestFiles = "ClearUnusedManifestFiles"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ClearCacheOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理缓存操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheOperation.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class ClearCacheOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheOperation.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheOperation.cs#L37)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalGetDescription()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取操作的描述信息(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheOperation.cs#L104)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override string InternalGetDescription()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 操作的描述字符串,默认返回空字符串。
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct ClearCacheOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理缓存的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheOptions.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct ClearCacheOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ClearMethod
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理方式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheOptions.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string ClearMethod { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearParameter
|
|||
|
|
|
|||
|
|
|
|||
|
|
附加参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/ClearCacheOptions.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public object ClearParameter { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class CustomPlayModeOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
自定义运行模式的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L83)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class CustomPlayModeOptions : InitializePackageOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileSystemParameterList
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件系统初始化参数列表
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L89)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly List<FileSystemParameters> FileSystemParameterList
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class DefaultDownloadRetryPolicy
|
|||
|
|
|
|||
|
|
|
|||
|
|
默认的下载重试策略
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/Policies/DefaultDownloadRetryPolicy.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class DefaultDownloadRetryPolicy : IDownloadRetryPolicy
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### IsRetryableError(string, long, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
判断本次下载失败是否属于可重试的错误
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/Policies/DefaultDownloadRetryPolicy.cs#L20)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsRetryableError(string url, long httpCode, string httpError)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``: 如果该错误可以重试则返回 true,否则返回 false。
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*url*失败请求的 URL``System.Int64``*httpCode*HTTP 响应状态码``System.String``*httpError*HTTP 错误信息
|
|||
|
|
|
|||
|
|
### CalculateRetryDelay(int, float)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算重试等待时长(秒)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/Policies/DefaultDownloadRetryPolicy.cs#L57)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public float CalculateRetryDelay(int retryCount, float previousDelay)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Single``: 本次重试前的等待时长(秒)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*retryCount*当前已重试次数``System.Single``*previousDelay*上一次的等待时长(秒)
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- [YooAsset.IDownloadRetryPolicy](/docs/api/YooAsset/IDownloadRetryPolicy)
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class DefaultDownloadUrlPolicy
|
|||
|
|
|
|||
|
|
|
|||
|
|
默认的 URL 选择策略
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/Policies/DefaultDownloadUrlPolicy.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class DefaultDownloadUrlPolicy : IDownloadUrlPolicy
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### SelectUrl(IReadOnlyList<string>)
|
|||
|
|
|
|||
|
|
|
|||
|
|
基于内部失败计数轮转选择 URL
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/Policies/DefaultDownloadUrlPolicy.cs#L21)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string SelectUrl(IReadOnlyList<string> candidateUrls)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 选中的 URL
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Collections.Generic.IReadOnlyList<System.String>``*candidateUrls*候选 URL 列表
|
|||
|
|
|
|||
|
|
### OnRequestSucceeded(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
请求成功反馈,保持当前 URL 不变。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/Policies/DefaultDownloadUrlPolicy.cs#L34)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void OnRequestSucceeded(string url)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*url*成功请求的 URL
|
|||
|
|
|
|||
|
|
### OnRequestFailed(string, long, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
请求失败反馈,递增失败计数以切换 URL。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/Policies/DefaultDownloadUrlPolicy.cs#L44)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void OnRequestFailed(string url, long httpCode, string httpError)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*url*失败请求的 URL``System.Int64``*httpCode*HTTP 响应状态码``System.String``*httpError*HTTP 错误信息
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- [YooAsset.IDownloadUrlPolicy](/docs/api/YooAsset/IDownloadUrlPolicy)
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class DestroyPackageOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
销毁资源包裹操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DestroyPackageOperation.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class DestroyPackageOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DestroyPackageOperation.cs#L33)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DestroyPackageOperation.cs#L38)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalGetDescription()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取操作的描述信息(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DestroyPackageOperation.cs#L111)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override string InternalGetDescription()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 操作的描述字符串,默认返回空字符串。
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloadCompletedEventArgs
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载完成事件参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct DownloadCompletedEventArgs
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Succeeded
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否成功
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool Succeeded { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Error
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载失败时的错误信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string Error { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class DownloaderOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载操作基类,提供资源下载、暂停、恢复和取消功能。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class DownloaderOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### TotalDownloadCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
统计的下载文件总数量
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L41)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int TotalDownloadCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### TotalDownloadBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
统计的下载文件的总大小
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L46)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long TotalDownloadBytes { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CurrentDownloadCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前已经完成的下载总数量
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L51)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int CurrentDownloadCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CurrentDownloadBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前已经完成的下载总大小
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L59)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long CurrentDownloadBytes { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L103)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L109)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Combine(DownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
合并其它下载器
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L317)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void Combine(DownloaderOperation downloader)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.DownloaderOperation](/docs/api/YooAsset/DownloaderOperation)*downloader*合并的下载器
|
|||
|
|
|
|||
|
|
### StartDownload()
|
|||
|
|
|
|||
|
|
|
|||
|
|
开始下载
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L358)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void StartDownload()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PauseDownload()
|
|||
|
|
|
|||
|
|
|
|||
|
|
暂停下载
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L369)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void PauseDownload()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ResumeDownload()
|
|||
|
|
|
|||
|
|
|
|||
|
|
恢复下载
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L377)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void ResumeDownload()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CancelDownload()
|
|||
|
|
|
|||
|
|
|
|||
|
|
取消下载
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L385)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void CancelDownload()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### DownloadCompleted
|
|||
|
|
|
|||
|
|
|
|||
|
|
当下载完成时触发(无论成功或失败)。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L67)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<DownloadCompletedEventArgs> DownloadCompleted
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.DownloadCompletedEventArgs>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### DownloadProgressChanged
|
|||
|
|
|
|||
|
|
|
|||
|
|
当下载进度更新时触发
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L72)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<DownloadProgressChangedEventArgs> DownloadProgressChanged
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.DownloadProgressChangedEventArgs>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### DownloadError
|
|||
|
|
|
|||
|
|
|
|||
|
|
当发生下载错误时触发
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L77)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<DownloadErrorEventArgs> DownloadError
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.DownloadErrorEventArgs>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### DownloadFileStarted
|
|||
|
|
|
|||
|
|
|
|||
|
|
当开始下载单个文件时触发
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L82)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<DownloadFileStartedEventArgs> DownloadFileStarted
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.DownloadFileStartedEventArgs>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloadErrorEventArgs
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载错误事件参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L120)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct DownloadErrorEventArgs
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L125)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileName
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载失败的文件名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L130)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ErrorInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
错误信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L135)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string ErrorInfo { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloadFileStartedEventArgs
|
|||
|
|
|
|||
|
|
|
|||
|
|
开始下载单个文件事件参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L154)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct DownloadFileStartedEventArgs
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L159)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L164)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileName
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L169)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileSize
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件大小
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L174)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long FileSize { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloadProgressChangedEventArgs
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载进度更新事件参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L63)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct DownloadProgressChangedEventArgs
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L68)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Progress
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载进度 (0-1f)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L73)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public float Progress { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### TotalDownloadCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载文件总数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L78)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int TotalDownloadCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### TotalDownloadBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载数据总大小(单位:字节)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L83)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long TotalDownloadBytes { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CurrentDownloadCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前完成的下载文件数量
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L88)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int CurrentDownloadCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CurrentDownloadBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前完成的下载数据大小(单位:字节)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderEventArgs.cs#L93)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long CurrentDownloadBytes { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloadReport
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载状态报告
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/DownloadReport.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct DownloadReport
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### HttpCode
|
|||
|
|
|
|||
|
|
|
|||
|
|
HTTP 响应状态码
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/DownloadReport.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long HttpCode { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### HttpError
|
|||
|
|
|
|||
|
|
|
|||
|
|
HTTP 错误信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/DownloadReport.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string HttpError { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadedBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前下载的字节数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/DownloadReport.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long DownloadedBytes { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadProgress
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前下载进度(0f - 1f)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/DownloadReport.cs#L27)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public float DownloadProgress { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Empty
|
|||
|
|
|
|||
|
|
|
|||
|
|
空的下载报告实例(所有字段为默认值)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/DownloadReport.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static readonly DownloadReport Empty
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### CreateProgress(long, float)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建下载进度报告
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/DownloadReport.cs#L55)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static DownloadReport CreateProgress(long downloadedBytes, float downloadProgress)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.DownloadReport](/docs/api/YooAsset/DownloadReport): 不含 HTTP 状态信息的进度报告
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int64``*downloadedBytes*已下载的字节数``System.Single``*downloadProgress*下载进度,取值范围 0f ~ 1f
|
|||
|
|
|
|||
|
|
### CreateFinished(long, string, long, float)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建包含 HTTP 状态的最终报告(成功或失败)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/DownloadReport.cs#L72)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static DownloadReport CreateFinished(long httpCode, string httpError, long downloadedBytes, float downloadProgress)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.DownloadReport](/docs/api/YooAsset/DownloadReport): 包含完整 HTTP 状态信息的最终报告
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int64``*httpCode*HTTP 响应状态码``System.String``*httpError*HTTP 错误信息,成功时为 null。``System.Int64``*downloadedBytes*已下载的字节数``System.Single``*downloadProgress*下载进度,取值范围 0f ~ 1f
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EBundleType
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包的类型
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/EBundleType.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EBundleType
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### None
|
|||
|
|
|
|||
|
|
|
|||
|
|
未指定类型
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/EBundleType.cs#L13)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
None = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
Unity引擎资源包
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/EBundleType.cs#L18)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
AssetBundle = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RawBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
原生文件资源包
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/EBundleType.cs#L23)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
RawBundle = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ArchiveBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
归档文件资源包
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/EBundleType.cs#L28)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ArchiveBundle = 4
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InstantBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
团结引擎资源包
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/EBundleType.cs#L33)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
InstantBundle = 5
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VirtualAssetBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
虚拟 Unity 引擎资源包(编辑器模拟 AssetBundle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/EBundleType.cs#L39)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
VirtualAssetBundle = 12
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VirtualRawBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
虚拟原生文件资源包(编辑器模拟 RawBundle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/EBundleType.cs#L44)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
VirtualRawBundle = 13
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VirtualArchiveBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
虚拟归档文件资源包(编辑器模拟 ArchiveBundle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/EBundleType.cs#L49)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
VirtualArchiveBundle = 14
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class EditorSimulateBuildInvoker
|
|||
|
|
|
|||
|
|
|
|||
|
|
编辑器模拟构建的调用入口
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/EditorSimulateBuildInvoker.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class EditorSimulateBuildInvoker
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Build(string, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
执行编辑器模拟构建
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/EditorSimulateBuildInvoker.cs#L19)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static PackageBuildResult Build(string packageName, int buildBundleType)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.PackageBuildResult](/docs/api/YooAsset/PackageBuildResult): 构建结果
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称``System.Int32``*buildBundleType*构建资源包类型
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class EditorSimulateModeOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
编辑器下模拟运行模式的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L29)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class EditorSimulateModeOptions : InitializePackageOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### EditorFileSystemParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
编辑器文件系统初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L34)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters EditorFileSystemParameters { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EFileNameStyle
|
|||
|
|
|
|||
|
|
|
|||
|
|
远端资源文件命名风格
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EFileNameStyle.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EFileNameStyle
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### HashName
|
|||
|
|
|
|||
|
|
|
|||
|
|
哈希值名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EFileNameStyle.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
HashName = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称(不推荐)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EFileNameStyle.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
BundleName = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleName_HashName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称 + 哈希值名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EFileNameStyle.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
BundleName_HashName = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EFileSystemParameter
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件系统参数类型定义
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EFileSystemParameter
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileVerifyLevel
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化的时候缓存文件校验级别 [YooAsset.EFileVerifyLevel](/docs/api/YooAsset/EFileVerifyLevel)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
FileVerifyLevel = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileVerifyMaxConcurrency
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化的时候缓存文件校验最大并发数 ``System.Int32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
FileVerifyMaxConcurrency = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InstallCleanupMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
覆盖安装缓存清理模式 [YooAsset.EInstallCleanupMode](/docs/api/YooAsset/EInstallCleanupMode)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
InstallCleanupMode = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DisableUnityWebCache
|
|||
|
|
|
|||
|
|
|
|||
|
|
禁用Unity的网络缓存 ``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L27)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DisableUnityWebCache = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### UnityWebRequestCreator
|
|||
|
|
|
|||
|
|
|
|||
|
|
UnityWebRequest 创建委托 [YooAsset.EFileSystemParameter.UnityWebRequestCreator](/docs/api/YooAsset/EFileSystemParameter#unitywebrequestcreator)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
UnityWebRequestCreator = 4
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadDisableOndemand
|
|||
|
|
|
|||
|
|
|
|||
|
|
禁用边玩边下机制 ``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L37)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DownloadDisableOndemand = 5
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadBackend
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载后台接口 ``YooAsset.IDownloadBackend``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L42)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DownloadBackend = 6
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadMaxConcurrency
|
|||
|
|
|
|||
|
|
|
|||
|
|
最大并发连接数 默认值:10(推荐范围 1-32) ``System.Int32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L47)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DownloadMaxConcurrency = 7
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadMaxRequestPerFrame
|
|||
|
|
|
|||
|
|
|
|||
|
|
每帧发起的最大请求数 默认值:5(推荐范围 1-10)``System.Int32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L52)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DownloadMaxRequestPerFrame = 8
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadWatchdogTimeout
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载任务的看门狗机制超时时间 ``System.Int32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L57)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DownloadWatchdogTimeout = 9
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadResumeMinimumSize
|
|||
|
|
|
|||
|
|
|
|||
|
|
启用断点续传的最小尺寸 ``System.Int64``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L62)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DownloadResumeMinimumSize = 10
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VirtualWebglMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
模拟WebGL平台模式 ``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L67)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
VirtualWebglMode = 11
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VirtualDownloadMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
模拟虚拟下载模式 ``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L72)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
VirtualDownloadMode = 12
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VirtualDownloadSpeed
|
|||
|
|
|
|||
|
|
|
|||
|
|
模拟虚拟下载的网速(单位:字节) ``System.Int32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L77)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
VirtualDownloadSpeed = 13
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AsyncSimulateMinFrame
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步模拟加载最小帧数 ``System.Int32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L82)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
AsyncSimulateMinFrame = 14
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AsyncSimulateMaxFrame
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步模拟加载最大帧数 ``System.Int32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L87)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
AsyncSimulateMaxFrame = 15
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CopyBuiltinPackageManifest
|
|||
|
|
|
|||
|
|
|
|||
|
|
拷贝内置清单 ``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L92)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
CopyBuiltinPackageManifest = 16
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CopyBuiltinPackageManifestDestRoot
|
|||
|
|
|
|||
|
|
|
|||
|
|
拷贝内置清单的目标目录 ``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L97)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
CopyBuiltinPackageManifestDestRoot = 17
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### UnpackFileSystemRoot
|
|||
|
|
|
|||
|
|
|
|||
|
|
解压文件系统的根目录 ``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L102)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
UnpackFileSystemRoot = 18
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RemoteService
|
|||
|
|
|
|||
|
|
|
|||
|
|
远端资源地址查询服务类 [YooAsset.IRemoteService](/docs/api/YooAsset/IRemoteService)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L107)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
RemoteService = 19
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetBundleDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
AssetBundle 解密器 [YooAsset.IBundleDecryptor](/docs/api/YooAsset/IBundleDecryptor)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L112)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
AssetBundleDecryptor = 20
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RawBundleDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
RawBundle 解密器 [YooAsset.IBundleDecryptor](/docs/api/YooAsset/IBundleDecryptor)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L117)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
RawBundleDecryptor = 21
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ArchiveBundleDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
ArchiveBundle 解密器 [YooAsset.IBundleDecryptor](/docs/api/YooAsset/IBundleDecryptor)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L122)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ArchiveBundleDecryptor = 22
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetBundleFallbackDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
AssetBundle 备用解密器 [YooAsset.IBundleMemoryDecryptor](/docs/api/YooAsset/IBundleMemoryDecryptor)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L127)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
AssetBundleFallbackDecryptor = 23
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ManifestDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源清单解密器 [YooAsset.IManifestDecryptor](/docs/api/YooAsset/IManifestDecryptor)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L132)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ManifestDecryptor = 24
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadRetryPolicy
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载重试判定策略 [YooAsset.IDownloadRetryPolicy](/docs/api/YooAsset/IDownloadRetryPolicy)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L137)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DownloadRetryPolicy = 25
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadUrlPolicy
|
|||
|
|
|
|||
|
|
|
|||
|
|
URL 选择策略 [YooAsset.IDownloadUrlPolicy](/docs/api/YooAsset/IDownloadUrlPolicy)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L142)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DownloadUrlPolicy = 26
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### WebPlatformStrategy
|
|||
|
|
|
|||
|
|
|
|||
|
|
WebGL 平台策略 ``YooAsset.IWebPlatformStrategy``
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L147)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
WebPlatformStrategy = 27
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleUnpackPolicy
|
|||
|
|
|
|||
|
|
|
|||
|
|
内置资源包解包策略 [YooAsset.IBundleUnpackPolicy](/docs/api/YooAsset/IBundleUnpackPolicy)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L152)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
BundleUnpackPolicy = 28
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BuiltinFileAccessor
|
|||
|
|
|
|||
|
|
|
|||
|
|
内置文件访问器 [YooAsset.IBuiltinFileAccessor](/docs/api/YooAsset/IBuiltinFileAccessor)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/EFileSystemParameter.cs#L157)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
BuiltinFileAccessor = 29
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EFileVerifyLevel
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件校验等级
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleCache/Services/SandboxBundleCache/EFileVerifyLevel.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EFileVerifyLevel
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Low
|
|||
|
|
|
|||
|
|
|
|||
|
|
验证文件存在
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleCache/Services/SandboxBundleCache/EFileVerifyLevel.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Low = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Middle
|
|||
|
|
|
|||
|
|
|
|||
|
|
验证文件大小
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleCache/Services/SandboxBundleCache/EFileVerifyLevel.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Middle = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### High
|
|||
|
|
|
|||
|
|
|
|||
|
|
验证文件CRC
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleCache/Services/SandboxBundleCache/EFileVerifyLevel.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
High = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EInstallCleanupMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
覆盖安装清理模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/Services/SandboxFileSystem/EInstallCleanupMode.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EInstallCleanupMode
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### None
|
|||
|
|
|
|||
|
|
|
|||
|
|
不做任何处理
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/Services/SandboxFileSystem/EInstallCleanupMode.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
None = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearAllCacheFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有缓存文件(包含资源文件和清单文件)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/Services/SandboxFileSystem/EInstallCleanupMode.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearAllCacheFiles = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearAllBundleFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有缓存的资源文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/Services/SandboxFileSystem/EInstallCleanupMode.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearAllBundleFiles = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearAllManifestFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有缓存的清单文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/Services/SandboxFileSystem/EInstallCleanupMode.cs#L27)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearAllManifestFiles = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class EnsureBundleFileOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
确保资源包已就绪的异步操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOperation.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class EnsureBundleFileOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Detail
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包文件详情
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOperation.cs#L60)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public EnsureBundleFileOperation.BundleDetail Detail { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOperation.cs#L68)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOperation.cs#L72)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct EnsureBundleFileOperation.BundleDetail
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包文件详情
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOperation.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct EnsureBundleFileOperation.BundleDetail
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOperation.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly string BundleName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleFilePath
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包文件的本地路径
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOperation.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly string BundleFilePath
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleType
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包类型
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOperation.cs#L27)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly int BundleType
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsEncrypted
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件是否加密
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOperation.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly bool IsEncrypted
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct EnsureBundleFileOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
确保资源包文件已就绪的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOptions.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct EnsureBundleFileOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Location
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源定位地址
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOptions.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string Location { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/EnsureBundleFileOptions.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo AssetInfo { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EOperationStatus
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作状态枚举
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/EOperationStatus.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EOperationStatus
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### None
|
|||
|
|
|
|||
|
|
|
|||
|
|
未开始
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/EOperationStatus.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
None = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Processing
|
|||
|
|
|
|||
|
|
|
|||
|
|
处理中
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/EOperationStatus.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Processing = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Succeeded
|
|||
|
|
|
|||
|
|
|
|||
|
|
已成功
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/EOperationStatus.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Succeeded = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Failed
|
|||
|
|
|
|||
|
|
|
|||
|
|
已失败
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/EOperationStatus.cs#L27)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Failed = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EPlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
运行模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EPlayMode.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EPlayMode
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### None
|
|||
|
|
|
|||
|
|
|
|||
|
|
未指定运行模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EPlayMode.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
None = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### EditorSimulateMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
编辑器下的模拟模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EPlayMode.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
EditorSimulateMode = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### OfflinePlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
离线运行模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EPlayMode.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
OfflinePlayMode = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### HostPlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
联机运行模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EPlayMode.cs#L27)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
HostPlayMode = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### WebPlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
WebGL运行模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EPlayMode.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
WebPlayMode = 4
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CustomPlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
自定义运行模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/EPlayMode.cs#L37)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
CustomPlayMode = 5
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class FileSystemParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
提供文件系统的创建参数与工厂方法
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class FileSystemParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileSystemTypeName
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件系统的完整类型名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L19)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileSystemTypeName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageRoot
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件系统的根目录
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L24)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageRoot { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### AddParameter(string, object)
|
|||
|
|
|
|||
|
|
|
|||
|
|
添加自定义参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L42)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void AddParameter(string paramName, object value)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*paramName*参数名称``System.Object``*value*参数值
|
|||
|
|
|
|||
|
|
### AddParameter(Enum, object)
|
|||
|
|
|
|||
|
|
|
|||
|
|
添加自定义参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L52)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void AddParameter(Enum paramType, object value)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Enum``*paramType*参数类型``System.Object``*value*参数值
|
|||
|
|
|
|||
|
|
### CreateDefaultEditorFileSystemParameters(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的编辑器文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L93)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultEditorFileSystemParameters(string packageRoot)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/api/YooAsset/FileSystemParameters): 配置好的文件系统参数实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageRoot*文件系统的根目录
|
|||
|
|
|
|||
|
|
### CreateDefaultBuiltinFileSystemParameters(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的内置文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L105)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultBuiltinFileSystemParameters(string packageRoot)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/api/YooAsset/FileSystemParameters): 配置好的文件系统参数实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageRoot*文件系统的根目录
|
|||
|
|
|
|||
|
|
### CreateDefaultBuiltinFileSystemParameters()
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的内置文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L116)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultBuiltinFileSystemParameters()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/api/YooAsset/FileSystemParameters): 配置好的文件系统参数实例### CreateDefaultSandboxFileSystemParameters(IRemoteService, string)
|
|||
|
|
创建默认的沙盒文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L129)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultSandboxFileSystemParameters(IRemoteService remoteService, string packageRoot)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/api/YooAsset/FileSystemParameters): 配置好的文件系统参数实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.IRemoteService](/docs/api/YooAsset/IRemoteService)*remoteService*远端资源地址查询服务类``System.String``*packageRoot*文件系统的根目录
|
|||
|
|
|
|||
|
|
### CreateDefaultSandboxFileSystemParameters(IRemoteService)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的沙盒文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L142)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultSandboxFileSystemParameters(IRemoteService remoteService)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/api/YooAsset/FileSystemParameters): 配置好的文件系统参数实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.IRemoteService](/docs/api/YooAsset/IRemoteService)*remoteService*远端资源地址查询服务类
|
|||
|
|
|
|||
|
|
### CreateDefaultWebServerFileSystemParameters(bool)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的WebGL 服务器文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L155)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultWebServerFileSystemParameters(bool disableUnityWebCache)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/api/YooAsset/FileSystemParameters): 配置好的文件系统参数实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Boolean``*disableUnityWebCache*禁用Unity的网络缓存
|
|||
|
|
|
|||
|
|
### CreateDefaultWebServerFileSystemParameters()
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的WebGL 服务器文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L167)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultWebServerFileSystemParameters()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/api/YooAsset/FileSystemParameters): 配置好的文件系统参数实例### CreateDefaultWebNetworkFileSystemParameters(IRemoteService, bool)
|
|||
|
|
创建默认的 WebGL 网络文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L181)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultWebNetworkFileSystemParameters(IRemoteService remoteService, bool disableUnityWebCache)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/api/YooAsset/FileSystemParameters): 配置好的文件系统参数实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.IRemoteService](/docs/api/YooAsset/IRemoteService)*remoteService*远端资源地址查询服务类``System.Boolean``*disableUnityWebCache*禁用Unity的网络缓存
|
|||
|
|
|
|||
|
|
### CreateDefaultWebNetworkFileSystemParameters(IRemoteService)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的 WebGL 网络文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/FileSystem/FileSystemParameters.cs#L195)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultWebNetworkFileSystemParameters(IRemoteService remoteService)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/api/YooAsset/FileSystemParameters): 配置好的文件系统参数实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.IRemoteService](/docs/api/YooAsset/IRemoteService)*remoteService*远端资源地址查询服务类
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class HandleBase
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源句柄基类,提供资源加载状态查询和释放功能。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class HandleBase : IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Status
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前状态
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L59)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public EOperationStatus Status { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Error
|
|||
|
|
|
|||
|
|
|
|||
|
|
错误信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L72)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string Error { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Progress
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载进度
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L85)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public float Progress { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsDone
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否加载完毕
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L98)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsDone { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsValid
|
|||
|
|
|
|||
|
|
|
|||
|
|
句柄是否有效
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L111)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsValid { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Release()
|
|||
|
|
|
|||
|
|
|
|||
|
|
释放资源句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L28)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void Release()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Dispose()
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L42)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void Dispose()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### GetAssetInfo()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L51)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfo()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo): 资源信息### GetAwaiter()
|
|||
|
|
获取用于 async/await 的 Awaiter
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/HandleBase.cs#L146)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public OperationAwaiter GetAwaiter()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.OperationAwaiter](/docs/api/YooAsset/OperationAwaiter): 用于 async/await 的 Awaiter 对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class HashUtility
|
|||
|
|
|
|||
|
|
|
|||
|
|
哈希工具类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L11)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class HashUtility
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ComputeMD5(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算字符串的MD5哈希值
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L33)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string ComputeMD5(string value)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*value*
|
|||
|
|
|
|||
|
|
### ComputeFileMD5(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算文件的MD5哈希值
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L45)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string ComputeFileMD5(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### ComputeMD5(Stream)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算数据流的MD5哈希值
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L59)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string ComputeMD5(Stream stream)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.IO.Stream``*stream*
|
|||
|
|
|
|||
|
|
### ComputeMD5(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算字节数组的MD5哈希值
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L74)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string ComputeMD5(byte[] buffer)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Byte[]``*buffer*
|
|||
|
|
|
|||
|
|
### ComputeCrc32(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算字符串的CRC32哈希值
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L91)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string ComputeCrc32(string value)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*value*
|
|||
|
|
|
|||
|
|
### ComputeCrc32AsUInt(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算字符串的CRC32值(返回无符号整数)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L103)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static uint ComputeCrc32AsUInt(string value)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.UInt32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*value*
|
|||
|
|
|
|||
|
|
### ComputeFileCrc32(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算文件的CRC32哈希值
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L115)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string ComputeFileCrc32(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### ComputeFileCrc32AsUInt(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算文件的CRC32值(返回无符号整数)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L129)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static uint ComputeFileCrc32AsUInt(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.UInt32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### ComputeCrc32(Stream)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算数据流的CRC32哈希值
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L143)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string ComputeCrc32(Stream stream)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.IO.Stream``*stream*
|
|||
|
|
|
|||
|
|
### ComputeCrc32AsUInt(Stream)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算数据流的CRC32值(返回无符号整数)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L158)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static uint ComputeCrc32AsUInt(Stream stream)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.UInt32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.IO.Stream``*stream*
|
|||
|
|
|
|||
|
|
### ComputeCrc32(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算字节数组的CRC32哈希值
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L173)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string ComputeCrc32(byte[] buffer)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Byte[]``*buffer*
|
|||
|
|
|
|||
|
|
### ComputeCrc32AsUInt(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算字节数组的CRC32值(返回无符号整数)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/Utilities/HashUtility.cs#L188)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static uint ComputeCrc32AsUInt(byte[] buffer)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.UInt32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Byte[]``*buffer*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class HostPlayModeOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
联机运行模式的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L51)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class HostPlayModeOptions : InitializePackageOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BuiltinFileSystemParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
内置文件系统初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L56)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters BuiltinFileSystemParameters { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CacheFileSystemParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
缓存文件系统初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L61)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters CacheFileSystemParameters { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IBuiltinFileAccessor
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBuiltinFileAccessor.cs#L10)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IBuiltinFileAccessor
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileExists(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
检查内置文件是否存在
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBuiltinFileAccessor.cs#L16)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
bool FileExists(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*filePath*内置文件路径
|
|||
|
|
|
|||
|
|
### ReadAllBytes(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
读取内置文件的所有字节
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBuiltinFileAccessor.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
byte[] ReadAllBytes(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Byte[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*filePath*内置文件路径
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IBundleDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包解密器的基接口,本身不包含成员。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L52)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IBundleDecryptor
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IBundleEncryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
定义资源包的加密行为
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleEncryptor.cs#L61)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IBundleEncryptor
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Encrypt(BundleEncryptArgs)
|
|||
|
|
|
|||
|
|
|
|||
|
|
对指定的资源包文件执行加密
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleEncryptor.cs#L68)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
BundleEncryptResult Encrypt(BundleEncryptArgs args)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.BundleEncryptResult](/docs/api/YooAsset/BundleEncryptResult): 包含加密状态和加密后数据的结果
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.BundleEncryptArgs](/docs/api/YooAsset/BundleEncryptArgs)*args*加密操作的输入参数
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IBundleMemoryDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
基于内存的资源包解密器。
|
|||
|
|
将整个加密数据解密为字节数组后加载。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L74)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IBundleMemoryDecryptor : IBundleDecryptor
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetDecryptedData(BundleDecryptArgs)
|
|||
|
|
|
|||
|
|
|
|||
|
|
将资源包数据解密并返回解密后的字节数组
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L81)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
byte[] GetDecryptedData(BundleDecryptArgs args)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Byte[]``: 解密后的资源包数据
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.BundleDecryptArgs](/docs/api/YooAsset/BundleDecryptArgs)*args*解密操作的输入参数
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IBundleOffsetDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
基于偏移量的资源包解密器。
|
|||
|
|
用于跳过文件头部加密区域后直接加载 AssetBundle。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L60)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IBundleOffsetDecryptor : IBundleDecryptor
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetFileOffset(BundleDecryptArgs)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取解密数据的起始偏移量(字节)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L67)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
long GetFileOffset(BundleDecryptArgs args)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Int64``: AssetBundle 有效数据在文件中的起始偏移量
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.BundleDecryptArgs](/docs/api/YooAsset/BundleDecryptArgs)*args*解密操作的输入参数
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IBundleStreamDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
基于流的资源包解密器。
|
|||
|
|
通过提供解密流实现流式加载,适用于大文件场景。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L88)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IBundleStreamDecryptor : IBundleDecryptor
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetBufferSize(BundleDecryptArgs)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取流式读取时使用的缓冲区大小(字节)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L95)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
int GetBufferSize(BundleDecryptArgs args)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Int32``: 建议的缓冲区字节数
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.BundleDecryptArgs](/docs/api/YooAsset/BundleDecryptArgs)*args*解密操作的输入参数
|
|||
|
|
|
|||
|
|
### CreateDecryptionStream(BundleDecryptArgs)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建用于解密读取的流实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleDecryptor.cs#L105)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Stream CreateDecryptionStream(BundleDecryptArgs args)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.IO.Stream``: 可供 AssetBundle 加载使用的解密流
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.BundleDecryptArgs](/docs/api/YooAsset/BundleDecryptArgs)*args*解密操作的输入参数
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IBundleUnpackPolicy
|
|||
|
|
|
|||
|
|
|
|||
|
|
内置资源包解包策略接口
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L75)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IBundleUnpackPolicy
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### IsUnpackBundle(BundleUnpackInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
判定指定资源包是否为需要解包的类型
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IBundleUnpackPolicy.cs#L80)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
bool IsUnpackBundle(BundleUnpackInfo unpackInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.BundleUnpackInfo](/docs/api/YooAsset/BundleUnpackInfo)*unpackInfo*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IDownloadRetryPolicy
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载重试策略
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IDownloadRetryPolicy.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IDownloadRetryPolicy
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### IsRetryableError(string, long, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
判断本次下载失败是否属于可重试的错误
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IDownloadRetryPolicy.cs#L16)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
bool IsRetryableError(string url, long httpCode, string httpError)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``: true 允许重试;false 应立即失败。
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*url*请求地址``System.Int64``*httpCode*HTTP 状态码(0 表示网络中断或非 HTTP 错误)``System.String``*httpError*服务器返回的错误描述文本
|
|||
|
|
|
|||
|
|
### CalculateRetryDelay(int, float)
|
|||
|
|
|
|||
|
|
|
|||
|
|
计算本次重试应等待的时长(秒)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IDownloadRetryPolicy.cs#L24)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
float CalculateRetryDelay(int retryCount, float previousDelay)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Single``: 本次应等待的秒数
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*retryCount*即将进入的重试次数(从 1 开始)``System.Single``*previousDelay*上一次等待时长(首次时为 0)
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IDownloadUrlPolicy
|
|||
|
|
|
|||
|
|
|
|||
|
|
URL 选择策略
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IDownloadUrlPolicy.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IDownloadUrlPolicy
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### SelectUrl(IReadOnlyList<string>)
|
|||
|
|
|
|||
|
|
|
|||
|
|
选择本次请求应使用的 URL
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IDownloadUrlPolicy.cs#L15)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
string SelectUrl(IReadOnlyList<string> candidateUrls)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 选中的 URL
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Collections.Generic.IReadOnlyList<System.String>``*candidateUrls*候选 URL 列表(至少包含一个)
|
|||
|
|
|
|||
|
|
### OnRequestSucceeded(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
反馈请求成功,策略可据此更新内部状态。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IDownloadUrlPolicy.cs#L21)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void OnRequestSucceeded(string url)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*url*实际使用的 URL
|
|||
|
|
|
|||
|
|
### OnRequestFailed(string, long, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
反馈请求失败,策略可据此更新内部状态。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IDownloadUrlPolicy.cs#L29)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void OnRequestFailed(string url, long httpCode, string httpError)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*url*实际使用的 URL``System.Int64``*httpCode*HTTP 状态码(0 表示网络中断或非 HTTP 错误)``System.String``*httpError*服务器返回的错误描述文本
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface ILogger
|
|||
|
|
|
|||
|
|
|
|||
|
|
自定义日志处理接口
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooLogger.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface ILogger
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Log(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
输出普通日志
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooLogger.cs#L13)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void Log(string message)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*message*
|
|||
|
|
|
|||
|
|
### LogWarning(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
输出警告日志
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooLogger.cs#L18)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void LogWarning(string message)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*message*
|
|||
|
|
|
|||
|
|
### LogError(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
输出错误日志
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooLogger.cs#L23)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void LogError(string message)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*message*
|
|||
|
|
|
|||
|
|
### LogException(Exception)
|
|||
|
|
|
|||
|
|
|
|||
|
|
输出异常日志
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooLogger.cs#L28)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void LogException(Exception exception)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Exception``*exception*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IManifestDecryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源清单解密器
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IManifestDecryptor.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IManifestDecryptor
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Decrypt(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
对加密的资源清单数据执行解密
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IManifestDecryptor.cs#L14)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
byte[] Decrypt(byte[] fileData)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Byte[]``: 解密后的字节数组
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Byte[]``*fileData*已加密的清单数据
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IManifestEncryptor
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源清单加密器
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IManifestEncryptor.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IManifestEncryptor
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Encrypt(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
对资源清单的原始数据执行加密
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IManifestEncryptor.cs#L14)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
byte[] Encrypt(byte[] fileData)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Byte[]``: 加密后的字节数组
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Byte[]``*fileData*待加密的清单数据
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct ImportBundleInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
导入的资源包信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L218)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct ImportBundleInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FilePath
|
|||
|
|
|
|||
|
|
|
|||
|
|
本地文件路径
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L223)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FilePath { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L228)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleGuid
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包GUID
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L233)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleGuid { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class InitializeFileSystemOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化文件系统操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/Internal/InitializeFileSystemOperation.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class InitializeFileSystemOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/Internal/InitializeFileSystemOperation.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/Internal/InitializeFileSystemOperation.cs#L37)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class InitializePackageOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化资源包裹操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOperation.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class InitializePackageOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOperation.cs#L33)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOperation.cs#L38)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalGetDescription()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取操作的描述信息(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOperation.cs#L143)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override string InternalGetDescription()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 操作的描述字符串,默认返回空字符串。
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class InitializePackageOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化资源包的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class InitializePackageOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BundleLoadingMaxConcurrency
|
|||
|
|
|
|||
|
|
|
|||
|
|
同时加载Bundle文件的最大并发数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L13)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int BundleLoadingMaxConcurrency { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AutoUnloadBundleWhenUnused
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否在资源引用计数为零时自动释放资源包
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L18)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool AutoUnloadBundleWhenUnused { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### WebGLForceSyncLoadAsset
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否在WebGL平台强制同步加载资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L23)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool WebGLForceSyncLoadAsset { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class InstantiateOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
游戏对象实例化操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOperation.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class InstantiateOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Result
|
|||
|
|
|
|||
|
|
|
|||
|
|
实例化的游戏对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOperation.cs#L30)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public GameObject Result { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOperation.cs#L39)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOperation.cs#L44)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalWaitForCompletion()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部同步等待方法(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOperation.cs#L146)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalWaitForCompletion()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalGetDescription()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取操作的描述信息(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOperation.cs#L151)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override string InternalGetDescription()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 操作的描述字符串,默认返回空字符串。### Cancel()
|
|||
|
|
取消实例化对象操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOperation.cs#L160)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void Cancel()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct InstantiateOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
游戏对象实例化的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOptions.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct InstantiateOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### IsActive
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否激活实例化对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOptions.cs#L13)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsActive { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Parent
|
|||
|
|
|
|||
|
|
|
|||
|
|
将指定给新对象的父对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOptions.cs#L18)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Transform Parent { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InWorldSpace
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否在世界空间中定位新对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOptions.cs#L26)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool InWorldSpace { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Position
|
|||
|
|
|
|||
|
|
|
|||
|
|
新对象的位置
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOptions.cs#L31)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Vector3 Position { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Rotation
|
|||
|
|
|
|||
|
|
|
|||
|
|
新对象的旋转
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/InstantiateOptions.cs#L36)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Quaternion Rotation { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IRemoteService
|
|||
|
|
|
|||
|
|
|
|||
|
|
远端资源服务
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IRemoteService.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IRemoteService
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetRemoteUrls(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取指定文件的所有远端候选地址,按优先级排序。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Interfaces/IRemoteService.cs#L15)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
IReadOnlyList<string> GetRemoteUrls(string fileName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Collections.Generic.IReadOnlyList<System.String>``: 按优先级排序的远端候选地址列表,至少包含一个 URL。
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*fileName*请求的文件名称
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class LoadPackageManifestOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载资源清单操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/LoadPackageManifestOperation.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class LoadPackageManifestOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/LoadPackageManifestOperation.cs#L29)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/LoadPackageManifestOperation.cs#L34)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalGetDescription()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取操作的描述信息(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/LoadPackageManifestOperation.cs#L101)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override string InternalGetDescription()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 操作的描述字符串,默认返回空字符串。
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct LoadPackageManifestOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载清单的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/LoadPackageManifestOptions.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct LoadPackageManifestOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageVersion
|
|||
|
|
|
|||
|
|
|
|||
|
|
包裹版本
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/LoadPackageManifestOptions.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageVersion { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Timeout
|
|||
|
|
|
|||
|
|
|
|||
|
|
超时时间
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/LoadPackageManifestOptions.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int Timeout { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class OfflinePlayModeOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
离线运行模式的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L40)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class OfflinePlayModeOptions : InitializePackageOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BuiltinFileSystemParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
内置文件系统初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L45)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters BuiltinFileSystemParameters { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct OperationAwaiter
|
|||
|
|
|
|||
|
|
|
|||
|
|
支持异步编程的自定义 Awaiter
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/OperationAwaiter.cs#L10)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct OperationAwaiter : ICriticalNotifyCompletion, INotifyCompletion
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### IsCompleted
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/OperationAwaiter.cs#L24)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsCompleted { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetResult()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取操作结果
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/OperationAwaiter.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void GetResult()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### OnCompleted(Action)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/OperationAwaiter.cs#L37)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void OnCompleted(Action continuation)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Action``*continuation*
|
|||
|
|
|
|||
|
|
### UnsafeOnCompleted(Action)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/AsyncOperation/OperationAwaiter.cs#L43)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void UnsafeOnCompleted(Action continuation)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Action``*continuation*
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Runtime.CompilerServices.ICriticalNotifyCompletion``
|
|||
|
|
|
|||
|
|
- ``System.Runtime.CompilerServices.INotifyCompletion``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PackageBuildParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹构建的调用参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildParameters.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class PackageBuildParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
包裹名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildParameters.cs#L13)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BuildPipelineName
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建管线名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildParameters.cs#L18)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BuildPipelineName { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BuildBundleType
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建资源包类型
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildParameters.cs#L23)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int BuildBundleType { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### UserData
|
|||
|
|
|
|||
|
|
|
|||
|
|
用户自定义数据
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildParameters.cs#L31)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public object UserData { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssemblyName
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建类所属的程序集名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildParameters.cs#L36)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string AssemblyName { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### TypeFullName
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建执行的类型全称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildParameters.cs#L44)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string TypeFullName { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### MethodName
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建执行的方法名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildParameters.cs#L52)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string MethodName { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PackageBuildResult
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹构建的返回结果
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildResult.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class PackageBuildResult
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageRootDirectory
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建输出的资源包裹根目录路径
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/PackageBuilder/PackageBuildResult.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageRootDirectory { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PackageDetails
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹的详细信息,用于外部查询包裹配置。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class PackageDetails
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileVersion
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件版本
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int FileVersion { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### EnableAddressable
|
|||
|
|
|
|||
|
|
|
|||
|
|
启用可寻址资源定位
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool EnableAddressable { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### SupportExtensionless
|
|||
|
|
|
|||
|
|
|
|||
|
|
支持无后缀名的资源定位地址
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool SupportExtensionless { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### LocationToLower
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源定位地址大小写不敏感
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L27)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool LocationToLower { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IncludeAssetGuid
|
|||
|
|
|
|||
|
|
|
|||
|
|
包含资源GUID数据
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IncludeAssetGuid { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ReplaceAssetPathWithAddress
|
|||
|
|
|
|||
|
|
|
|||
|
|
使用可寻址地址代替资源路径
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L37)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool ReplaceAssetPathWithAddress { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### OutputNameStyle
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件名称样式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L42)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int OutputNameStyle { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BuildBundleType
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建资源包类型
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L47)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int BuildBundleType { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BuildPipeline
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建管线名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L52)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BuildPipeline { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L57)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageVersion
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹的版本信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L62)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageVersion { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageNote
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹的备注信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L67)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageNote { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetTotalCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
主资源文件总数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L72)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int AssetTotalCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleTotalCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包文件总数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/PackageDetails.cs#L77)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int BundleTotalCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PrefetchManifestOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
预取清单操作,用于提前加载指定版本的资源清单。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/PrefetchManifestOperation.cs#L10)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class PrefetchManifestOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/PrefetchManifestOperation.cs#L34)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/PrefetchManifestOperation.cs#L39)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(ResourceDownloaderOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源标签列表关联的资源包文件。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/PrefetchManifestOperation.cs#L113)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateResourceDownloader(ResourceDownloaderOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/api/YooAsset/ResourceDownloaderOperation): 资源下载操作实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.ResourceDownloaderOptions](/docs/api/YooAsset/ResourceDownloaderOptions)*options*资源下载选项
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(BundleDownloaderOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源信息列表依赖的资源包文件。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/PrefetchManifestOperation.cs#L129)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(BundleDownloaderOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/api/YooAsset/ResourceDownloaderOperation): 资源下载操作实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.BundleDownloaderOptions](/docs/api/YooAsset/BundleDownloaderOptions)*options*资源包下载选项
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct PrefetchManifestOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
预取清单的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/PrefetchManifestOptions.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct PrefetchManifestOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageVersion
|
|||
|
|
|
|||
|
|
|
|||
|
|
预取的包裹版本
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/PrefetchManifestOptions.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageVersion { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Timeout
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源清单请求超时时间
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/PrefetchManifestOptions.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int Timeout { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class RawFileHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
原生文件句柄,用于访问未经 Unity 处理的原始文件。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/RawFileHandle.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class RawFileHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/RawFileHandle.cs#L44)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### GetRawFilePath()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取原生文件的路径
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/RawFileHandle.cs#L55)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string GetRawFilePath()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 原生文件的磁盘路径## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
当加载完成时触发
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/RawFileHandle.cs#L22)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<RawFileHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.RawFileHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class RawFileObject
|
|||
|
|
|
|||
|
|
|
|||
|
|
原生文件对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/Services/RawBundleHandle/RawFileObject.cs#L10)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class RawFileObject : ScriptableObject
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetBytes()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取原生文件的字节数据
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/Services/RawBundleHandle/RawFileObject.cs#L19)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public byte[] GetBytes()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Byte[]``: 原生文件字节数据的副本### GetText()
|
|||
|
|
获取以 UTF-8 编码解析的文本内容
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/BundleHandle/Services/RawBundleHandle/RawFileObject.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string GetText()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 解析后的文本字符串
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class RequestPackageVersionOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
请求包裹版本操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/RequestPackageVersionOperation.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class RequestPackageVersionOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageVersion
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前最新的包裹版本
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/RequestPackageVersionOperation.cs#L24)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageVersion { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/RequestPackageVersionOperation.cs#L33)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/RequestPackageVersionOperation.cs#L38)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct RequestPackageVersionOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
请求版本的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/RequestPackageVersionOptions.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct RequestPackageVersionOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### AppendTimeTicks
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否在URL末尾添加时间戳
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/RequestPackageVersionOptions.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool AppendTimeTicks { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Timeout
|
|||
|
|
|
|||
|
|
|
|||
|
|
超时时间
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/RequestPackageVersionOptions.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int Timeout { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ResourceDownloaderOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源下载操作类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L409)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class ResourceDownloaderOperation : DownloaderOperation, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct ResourceDownloaderOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
按资源标签创建下载器的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L64)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct ResourceDownloaderOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### MaximumConcurrency
|
|||
|
|
|
|||
|
|
|
|||
|
|
最大并发数量
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L69)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int MaximumConcurrency { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RetryCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
失败后的重试次数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L74)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int RetryCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Tags
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源标签列表
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L80)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string[] Tags { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ResourceImporterOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源导入操作类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L449)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class ResourceImporterOperation : DownloaderOperation, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ResourcePackage
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class ResourcePackage
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
包裹名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L21)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageValid
|
|||
|
|
|
|||
|
|
|
|||
|
|
包裹是否有效
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L26)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool PackageValid { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackagePriority
|
|||
|
|
|
|||
|
|
|
|||
|
|
包裹优先级(值越大越优先更新)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L39)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public uint PackagePriority { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InitializeStatus
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化状态
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L48)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public EOperationStatus InitializeStatus { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InitializePackageAsync(InitializePackageOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化包裹
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L91)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public InitializePackageOperation InitializePackageAsync(InitializePackageOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.InitializePackageOperation](/docs/api/YooAsset/InitializePackageOperation): 返回初始化操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.InitializePackageOptions](/docs/api/YooAsset/InitializePackageOptions)*options*初始化参数
|
|||
|
|
|
|||
|
|
### DestroyPackageAsync()
|
|||
|
|
|
|||
|
|
|
|||
|
|
销毁包裹
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L120)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public DestroyPackageOperation DestroyPackageAsync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.DestroyPackageOperation](/docs/api/YooAsset/DestroyPackageOperation): 返回销毁包裹操作对象### RequestPackageVersionAsync()
|
|||
|
|
请求最新的资源版本
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L133)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public RequestPackageVersionOperation RequestPackageVersionAsync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RequestPackageVersionOperation](/docs/api/YooAsset/RequestPackageVersionOperation): 返回请求版本操作对象### RequestPackageVersionAsync(RequestPackageVersionOptions)
|
|||
|
|
请求最新的资源版本
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L145)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public RequestPackageVersionOperation RequestPackageVersionAsync(RequestPackageVersionOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RequestPackageVersionOperation](/docs/api/YooAsset/RequestPackageVersionOperation): 返回请求版本操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.RequestPackageVersionOptions](/docs/api/YooAsset/RequestPackageVersionOptions)*options*请求版本选项
|
|||
|
|
|
|||
|
|
### LoadPackageManifestAsync(LoadPackageManifestOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载指定版本的资源清单
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L158)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public LoadPackageManifestOperation LoadPackageManifestAsync(LoadPackageManifestOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.LoadPackageManifestOperation](/docs/api/YooAsset/LoadPackageManifestOperation): 返回加载清单操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.LoadPackageManifestOptions](/docs/api/YooAsset/LoadPackageManifestOptions)*options*加载清单选项
|
|||
|
|
|
|||
|
|
### PrefetchManifestAsync(PrefetchManifestOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
预取指定版本的包裹资源清单
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L178)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public PrefetchManifestOperation PrefetchManifestAsync(PrefetchManifestOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.PrefetchManifestOperation](/docs/api/YooAsset/PrefetchManifestOperation): 返回预取清单操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.PrefetchManifestOptions](/docs/api/YooAsset/PrefetchManifestOptions)*options*预取清单选项
|
|||
|
|
|
|||
|
|
### ClearCacheAsync(ClearCacheOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理缓存文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L191)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ClearCacheOperation ClearCacheAsync(ClearCacheOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ClearCacheOperation](/docs/api/YooAsset/ClearCacheOperation): 返回清理缓存操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.ClearCacheOptions](/docs/api/YooAsset/ClearCacheOptions)*options*清理缓存选项
|
|||
|
|
|
|||
|
|
### GetPackageVersion()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取当前加载包裹的版本信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L205)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string GetPackageVersion()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 返回当前包裹版本字符串### GetPackageNote()
|
|||
|
|
获取当前加载包裹的备注信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L215)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string GetPackageNote()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 返回当前包裹备注字符串### GetPackageDetails()
|
|||
|
|
获取当前加载包裹的详细信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L225)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public PackageDetails GetPackageDetails()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.PackageDetails](/docs/api/YooAsset/PackageDetails): 返回包含包裹配置的详细信息对象### UnloadAllAssetsAsync()
|
|||
|
|
强制回收所有资源
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L237)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UnloadAllAssetsOperation UnloadAllAssetsAsync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UnloadAllAssetsOperation](/docs/api/YooAsset/UnloadAllAssetsOperation): 返回卸载资源操作对象### UnloadAllAssetsAsync(UnloadAllAssetsOptions)
|
|||
|
|
强制回收所有资源
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L248)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UnloadAllAssetsOperation UnloadAllAssetsAsync(UnloadAllAssetsOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UnloadAllAssetsOperation](/docs/api/YooAsset/UnloadAllAssetsOperation): 返回卸载资源操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.UnloadAllAssetsOptions](/docs/api/YooAsset/UnloadAllAssetsOptions)*options*卸载选项
|
|||
|
|
|
|||
|
|
### UnloadUnusedAssetsAsync()
|
|||
|
|
|
|||
|
|
|
|||
|
|
回收不再使用的资源
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L261)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UnloadUnusedAssetsOperation UnloadUnusedAssetsAsync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UnloadUnusedAssetsOperation](/docs/api/YooAsset/UnloadUnusedAssetsOperation): 返回卸载未使用资源操作对象### UnloadUnusedAssetsAsync(UnloadUnusedAssetsOptions)
|
|||
|
|
回收不再使用的资源
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L274)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UnloadUnusedAssetsOperation UnloadUnusedAssetsAsync(UnloadUnusedAssetsOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UnloadUnusedAssetsOperation](/docs/api/YooAsset/UnloadUnusedAssetsOperation): 返回卸载未使用资源操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.UnloadUnusedAssetsOptions](/docs/api/YooAsset/UnloadUnusedAssetsOptions)*options*卸载选项
|
|||
|
|
|
|||
|
|
### TryUnloadUnusedAsset(string, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
尝试卸载指定的未使用资源
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L287)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void TryUnloadUnusedAsset(string location, int loopCount = 10)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Int32``*loopCount*最大循环卸载次数
|
|||
|
|
|
|||
|
|
### TryUnloadUnusedAsset(AssetInfo, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
尝试卸载指定的未使用资源
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L299)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void TryUnloadUnusedAsset(AssetInfo assetInfo, int loopCount = 10)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.Int32``*loopCount*最大循环卸载次数
|
|||
|
|
|
|||
|
|
### GetDownloadSize(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取指定资源需要下载的文件总大小
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L312)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long GetDownloadSize(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Int64``: 返回需要下载的字节数,0 表示不需要下载。
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### GetDownloadSize(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取指定资源需要下载的文件总大小
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L324)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long GetDownloadSize(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Int64``: 返回需要下载的字节数,0 表示不需要下载。
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### GetAllAssetInfos()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取所有的资源信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L334)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo[] GetAllAssetInfos()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``YooAsset.AssetInfo[]``: 返回包含所有资源信息的数组### GetAssetInfos(string)
|
|||
|
|
获取资源信息列表
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L345)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo[] GetAssetInfos(string tag)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``YooAsset.AssetInfo[]``: 返回匹配标签的资源信息数组
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*tag*资源标签
|
|||
|
|
|
|||
|
|
### GetAssetInfos(string[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息列表
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L357)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo[] GetAssetInfos(string[] tags)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``YooAsset.AssetInfo[]``: 返回匹配标签的资源信息数组
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*tags*资源标签列表
|
|||
|
|
|
|||
|
|
### GetAssetInfo(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L368)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfo(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo): 返回资源信息对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### GetAssetInfo(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L380)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfo(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo): 返回资源信息对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*资源类型
|
|||
|
|
|
|||
|
|
### GetAssetInfoByGuid(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L391)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfoByGuid(string assetGuid)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo): 返回资源信息对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*assetGuid*资源GUID
|
|||
|
|
|
|||
|
|
### GetAssetInfoByGuid(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L403)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfoByGuid(string assetGuid, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo): 返回资源信息对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*assetGuid*资源GUID``System.Type``*type*资源类型
|
|||
|
|
|
|||
|
|
### IsLocationValid(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源定位地址是否有效
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L414)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsLocationValid(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``: 如果地址有效返回true,否则返回false。
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadSceneSync(string, LoadSceneMode, LocalPhysicsMode)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载场景
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L430)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SceneHandle LoadSceneSync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/api/YooAsset/SceneHandle): 返回场景操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*场景的定位地址``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式
|
|||
|
|
|
|||
|
|
### LoadSceneSync(AssetInfo, LoadSceneMode, LocalPhysicsMode)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载场景
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L444)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SceneHandle LoadSceneSync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/api/YooAsset/SceneHandle): 返回场景操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*场景的资源信息``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式
|
|||
|
|
|
|||
|
|
### LoadSceneAsync(string, LoadSceneMode, LocalPhysicsMode, bool, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载场景
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L459)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SceneHandle LoadSceneAsync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None, bool allowSceneActivation = true, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/api/YooAsset/SceneHandle): 返回场景操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*场景的定位地址``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式``System.Boolean``*allowSceneActivation*是否允许场景激活``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadSceneAsync(AssetInfo, LoadSceneMode, LocalPhysicsMode, bool, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载场景
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L475)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SceneHandle LoadSceneAsync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None, bool allowSceneActivation = true, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/api/YooAsset/SceneHandle): 返回场景操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*场景的资源信息``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式``System.Boolean``*allowSceneActivation*是否允许场景激活``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAssetSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L499)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/api/YooAsset/AssetHandle): 返回资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadAssetSync<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L511)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetSync<TObject>(string location) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/api/YooAsset/AssetHandle): 返回资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAssetSync(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L524)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetSync(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/api/YooAsset/AssetHandle): 返回资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*资源类型
|
|||
|
|
|
|||
|
|
### LoadAssetSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L536)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/api/YooAsset/AssetHandle): 返回资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadAssetAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L550)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/api/YooAsset/AssetHandle): 返回资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAssetAsync<TObject>(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L563)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetAsync<TObject>(string location, uint priority = 0) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/api/YooAsset/AssetHandle): 返回资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAssetAsync(string, Type, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L577)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetAsync(string location, Type type, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/api/YooAsset/AssetHandle): 返回资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*资源类型``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAssetAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L590)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/api/YooAsset/AssetHandle): 返回资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L615)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/api/YooAsset/SubAssetsHandle): 返回子资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L627)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsSync<TObject>(string location) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/api/YooAsset/SubAssetsHandle): 返回子资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L640)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsSync(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/api/YooAsset/SubAssetsHandle): 返回子资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L652)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/api/YooAsset/SubAssetsHandle): 返回子资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载子资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L666)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/api/YooAsset/SubAssetsHandle): 返回子资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync<TObject>(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载子资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L679)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsAsync<TObject>(string location, uint priority = 0) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/api/YooAsset/SubAssetsHandle): 返回子资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync(string, Type, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载子资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L693)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsAsync(string location, Type type, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/api/YooAsset/SubAssetsHandle): 返回子资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载子资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L706)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/api/YooAsset/SubAssetsHandle): 返回子资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L731)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/api/YooAsset/AllAssetsHandle): 返回全资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L743)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsSync<TObject>(string location) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/api/YooAsset/AllAssetsHandle): 返回全资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L756)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsSync(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/api/YooAsset/AllAssetsHandle): 返回全资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L768)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/api/YooAsset/AllAssetsHandle): 返回全资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L782)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/api/YooAsset/AllAssetsHandle): 返回全资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync<TObject>(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L795)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsAsync<TObject>(string location, uint priority = 0) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/api/YooAsset/AllAssetsHandle): 返回全资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync(string, Type, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L809)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsAsync(string location, Type type, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/api/YooAsset/AllAssetsHandle): 返回全资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L822)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/api/YooAsset/AllAssetsHandle): 返回全资源操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### EnsureBundleFileAsync(EnsureBundleFileOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
确保资源包文件已就绪
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L847)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public EnsureBundleFileOperation EnsureBundleFileAsync(EnsureBundleFileOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.EnsureBundleFileOperation](/docs/api/YooAsset/EnsureBundleFileOperation): 返回确保资源包文件就绪的操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.EnsureBundleFileOptions](/docs/api/YooAsset/EnsureBundleFileOptions)*options*确保资源包文件已就绪的选项
|
|||
|
|
|
|||
|
|
### LoadBundleFileSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L866)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public BundleFileHandle LoadBundleFileSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.BundleFileHandle](/docs/api/YooAsset/BundleFileHandle): 返回资源包文件操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadBundleFileSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L877)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public BundleFileHandle LoadBundleFileSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.BundleFileHandle](/docs/api/YooAsset/BundleFileHandle): 返回资源包文件操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadBundleFileAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L890)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public BundleFileHandle LoadBundleFileAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.BundleFileHandle](/docs/api/YooAsset/BundleFileHandle): 返回资源包文件操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadBundleFileAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L902)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public BundleFileHandle LoadBundleFileAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.BundleFileHandle](/docs/api/YooAsset/BundleFileHandle): 返回资源包文件操作句柄
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(ResourceDownloaderOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源标签关联的资源包文件。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L925)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateResourceDownloader(ResourceDownloaderOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/api/YooAsset/ResourceDownloaderOperation): 返回资源下载操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.ResourceDownloaderOptions](/docs/api/YooAsset/ResourceDownloaderOptions)*options*资源下载选项
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(BundleDownloaderOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源信息列表依赖的资源包文件。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L936)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateResourceDownloader(BundleDownloaderOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/api/YooAsset/ResourceDownloaderOperation): 返回资源下载操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.BundleDownloaderOptions](/docs/api/YooAsset/BundleDownloaderOptions)*options*资源下载选项
|
|||
|
|
|
|||
|
|
### CreateResourceUnpacker(ResourceUnpackerOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建内置资源解压器,用于解压指定的资源标签关联的资源包文件。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L949)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceUnpackerOperation CreateResourceUnpacker(ResourceUnpackerOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceUnpackerOperation](/docs/api/YooAsset/ResourceUnpackerOperation): 返回资源解压操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.ResourceUnpackerOptions](/docs/api/YooAsset/ResourceUnpackerOptions)*options*资源解压选项
|
|||
|
|
|
|||
|
|
### CreateResourceImporter(BundleImporterOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源导入器
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs#L962)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceImporterOperation CreateResourceImporter(BundleImporterOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceImporterOperation](/docs/api/YooAsset/ResourceImporterOperation): 返回资源导入操作对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.BundleImporterOptions](/docs/api/YooAsset/BundleImporterOptions)*options*资源导入选项
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ResourceUnpackerOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源解压操作类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOperation.cs#L429)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class ResourceUnpackerOperation : DownloaderOperation, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct ResourceUnpackerOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源解压的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L124)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct ResourceUnpackerOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### MaximumConcurrency
|
|||
|
|
|
|||
|
|
|
|||
|
|
最大并发数量
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L129)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int MaximumConcurrency { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RetryCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
失败后的重试次数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L134)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int RetryCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Tags
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源标签列表
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/DownloaderOptions.cs#L140)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string[] Tags { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class SceneHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
场景句柄,用于管理场景的加载、激活和卸载。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SceneHandle.cs#L8)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class SceneHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### SceneName
|
|||
|
|
|
|||
|
|
|
|||
|
|
场景名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SceneHandle.cs#L61)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string SceneName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### SceneObject
|
|||
|
|
|
|||
|
|
|
|||
|
|
场景对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SceneHandle.cs#L74)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Scene SceneObject { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ActivateScene()
|
|||
|
|
|
|||
|
|
|
|||
|
|
激活场景(当同时存在多个场景时用于切换激活场景)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SceneHandle.cs#L88)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool ActivateScene()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``: 是否成功激活场景### AllowSceneActivation()
|
|||
|
|
允许场景激活
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SceneHandle.cs#L108)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool AllowSceneActivation()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``: 是否成功执行### UnloadSceneAsync()
|
|||
|
|
卸载场景对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SceneHandle.cs#L132)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UnloadSceneOperation UnloadSceneAsync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UnloadSceneOperation](/docs/api/YooAsset/UnloadSceneOperation): 卸载场景操作## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
当加载完成时触发
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SceneHandle.cs#L28)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<SceneHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.SceneHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class SubAssetsHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
子资源句柄,用于管理资源包内子资源对象的加载和访问。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SubAssetsHandle.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class SubAssetsHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### SubAssetObjects
|
|||
|
|
|
|||
|
|
|
|||
|
|
子资源对象集合
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SubAssetsHandle.cs#L57)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public IReadOnlyList<Object> SubAssetObjects { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SubAssetsHandle.cs#L46)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### GetSubAssetObject<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取子资源对象
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SubAssetsHandle.cs#L73)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public TObject GetSubAssetObject<TObject>(string assetName) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``<TObject>``: 匹配的子资源对象,未找到则返回 null。
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*assetName*子资源对象名称
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``子资源对象类型
|
|||
|
|
|
|||
|
|
### GetSubAssetObjects<TObject>()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取所有的子资源对象集合
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SubAssetsHandle.cs#L95)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public IReadOnlyList<TObject> GetSubAssetObjects<TObject>() where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Collections.Generic.IReadOnlyList<<TObject>>``: 匹配类型的子资源对象集合##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``子资源对象类型
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
当加载完成时触发
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Handles/SubAssetsHandle.cs#L24)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<SubAssetsHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.SubAssetsHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Delegate UnityWebRequestCreator
|
|||
|
|
|
|||
|
|
|
|||
|
|
自定义 UnityWebRequest 创建委托
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/DownloadSystem/Services/UnityWebBackend/UnityWebRequestCreator.cs#L15)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public delegate UnityWebRequest UnityWebRequestCreator(string url, string method)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class UnloadAllAssetsOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
卸载所有资源的异步操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadAllAssetsOperation.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class UnloadAllAssetsOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadAllAssetsOperation.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadAllAssetsOperation.cs#L37)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct UnloadAllAssetsOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
卸载所有资源的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadAllAssetsOptions.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct UnloadAllAssetsOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ShouldReleaseHandles
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否释放所有资源句柄,防止卸载过程中触发完成回调。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadAllAssetsOptions.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool ShouldReleaseHandles { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ShouldLockLoading
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否在卸载过程中锁定加载操作,防止新的任务请求。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadAllAssetsOptions.cs#L17)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool ShouldLockLoading { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class UnloadSceneOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
场景卸载异步操作类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadSceneOperation.cs#L9)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class UnloadSceneOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadSceneOperation.cs#L46)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadSceneOperation.cs#L51)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalGetDescription()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取操作的描述信息(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadSceneOperation.cs#L112)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override string InternalGetDescription()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 操作的描述字符串,默认返回空字符串。
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class UnloadUnusedAssetsOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
卸载未使用资源的异步操作
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadUnusedAssetsOperation.cs#L6)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class UnloadUnusedAssetsOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InternalStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部启动方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadUnusedAssetsOperation.cs#L26)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部更新方法(子类必须实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadUnusedAssetsOperation.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalWaitForCompletion()
|
|||
|
|
|
|||
|
|
|
|||
|
|
内部同步等待方法(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadUnusedAssetsOperation.cs#L57)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override void InternalWaitForCompletion()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InternalGetDescription()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取操作的描述信息(子类可选实现)
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadUnusedAssetsOperation.cs#L62)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected override string InternalGetDescription()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 操作的描述字符串,默认返回空字符串。
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct UnloadUnusedAssetsOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
卸载未使用资源的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadUnusedAssetsOptions.cs#L7)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly struct UnloadUnusedAssetsOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### MaxLoopCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
最大循环迭代次数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourceManager/Operations/UnloadUnusedAssetsOptions.cs#L12)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int MaxLoopCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class WebPlayModeOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
WebGL运行模式的操作选项
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L67)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class WebPlayModeOptions : InitializePackageOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WebServerFileSystemParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
Web 服务器文件系统初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L72)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters WebServerFileSystemParameters { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### WebNetworkFileSystemParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
Web 网络文件系统初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/ResourcePackage/Operations/InitializePackageOptions.cs#L77)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters WebNetworkFileSystemParameters { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class YooAssetConfiguration
|
|||
|
|
|
|||
|
|
|
|||
|
|
提供 YooAsset 全局配置的访问入口
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Settings/YooAssetConfiguration.cs#L10)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class YooAssetConfiguration
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetYooFolderName()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源包裹的根文件夹名称
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Settings/YooAssetConfiguration.cs#L55)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetYooFolderName()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 文件夹名称。如果未配置则返回默认值 "yoo"。### GetBuildReportFileName(string, string)
|
|||
|
|
获取构建报告的文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Settings/YooAssetConfiguration.cs#L66)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetBuildReportFileName(string packageName, string packageVersion)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 包含 .report 扩展名的文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称``System.String``*packageVersion*包裹版本号
|
|||
|
|
|
|||
|
|
### GetManifestBinaryFileName(string, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取清单二进制文件的文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Settings/YooAssetConfiguration.cs#L86)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetManifestBinaryFileName(string packageName, string packageVersion)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 包含 .bytes 扩展名的文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称``System.String``*packageVersion*包裹版本号
|
|||
|
|
|
|||
|
|
### GetManifestJsonFileName(string, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取清单 JSON 文件的文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Settings/YooAssetConfiguration.cs#L106)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetManifestJsonFileName(string packageName, string packageVersion)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 包含 .json 扩展名的文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称``System.String``*packageVersion*包裹版本号
|
|||
|
|
|
|||
|
|
### GetPackageHashFileName(string, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取包裹的哈希校验文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Settings/YooAssetConfiguration.cs#L126)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetPackageHashFileName(string packageName, string packageVersion)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 包含 .hash 扩展名的文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称``System.String``*packageVersion*包裹版本号
|
|||
|
|
|
|||
|
|
### GetPackageVersionFileName(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取包裹的版本记录文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Settings/YooAssetConfiguration.cs#L145)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetPackageVersionFileName(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``: 包含 .version 扩展名的文件名
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class YooAssets
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源系统的主入口
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L13)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class YooAssets
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### IsInitialized
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否已经初始化
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L32)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool IsInitialized { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Initialize()
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化资源系统
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L40)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void Initialize()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Initialize(ILogger)
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化资源系统
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L49)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void Initialize(ILogger logger)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.ILogger](/docs/api/YooAsset/ILogger)*logger*自定义日志处理
|
|||
|
|
|
|||
|
|
### Destroy()
|
|||
|
|
|
|||
|
|
|
|||
|
|
销毁资源系统
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L75)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void Destroy()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CreatePackage(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源包裹
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L116)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourcePackage CreatePackage(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourcePackage](/docs/api/YooAsset/ResourcePackage): 新创建的资源包裹实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
|
|||
|
|
### CreatePackage(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源包裹
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L127)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourcePackage CreatePackage(string packageName, uint packagePriority)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourcePackage](/docs/api/YooAsset/ResourcePackage): 新创建的资源包裹实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称``System.UInt32``*packagePriority*包裹优先级(值越大越优先更新)
|
|||
|
|
|
|||
|
|
### GetPackage(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源包裹
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L147)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourcePackage GetPackage(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourcePackage](/docs/api/YooAsset/ResourcePackage): 指定名称的资源包裹实例
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
|
|||
|
|
### TryGetPackage(string, out ResourcePackage)
|
|||
|
|
|
|||
|
|
|
|||
|
|
尝试获取资源包裹
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L162)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool TryGetPackage(string packageName, out ResourcePackage package)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``: 如果资源包裹存在返回true,否则返回false。
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称[YooAsset.ResourcePackage](/docs/api/YooAsset/ResourcePackage)*package*获取到的资源包裹,如果不存在则为null。
|
|||
|
|
|
|||
|
|
### GetPackages()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取所有资源包裹
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L173)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static IReadOnlyList<ResourcePackage> GetPackages()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Collections.Generic.IReadOnlyList<YooAsset.ResourcePackage>``: 当前已注册的所有资源包裹的只读列表### RemovePackage(string)
|
|||
|
|
移除资源包裹
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L183)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void RemovePackage(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
|
|||
|
|
### ContainsPackage(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
检测资源包裹是否存在
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L203)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool ContainsPackage(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``: 如果资源包裹存在返回true,否则返回false。
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
|
|||
|
|
### SetAsyncOperationMaxTimeSlice(long)
|
|||
|
|
|
|||
|
|
|
|||
|
|
设置异步系统参数,每帧执行消耗的最大时间切片。
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/YooAssets.cs#L214)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void SetAsyncOperationMaxTimeSlice(long milliseconds)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int64``*milliseconds*最大时间切片(单位:毫秒),不能为负数。
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class YooException
|
|||
|
|
|
|||
|
|
|
|||
|
|
Base exception for all YooAsset custom exceptions.
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooException.cs#L11)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
[Serializable]
|
|||
|
|
public class YooException : Exception, ISerializable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Runtime.Serialization.ISerializable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class YooHandleInvalidException
|
|||
|
|
|
|||
|
|
|
|||
|
|
The exception that is thrown when a resource handle is invalid.
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooException.cs#L89)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
[Serializable]
|
|||
|
|
public class YooHandleInvalidException : YooException, ISerializable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Runtime.Serialization.ISerializable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class YooInternalException
|
|||
|
|
|
|||
|
|
|
|||
|
|
The exception that is thrown when an internal logic error occurs in YooAsset.
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooException.cs#L31)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
[Serializable]
|
|||
|
|
public class YooInternalException : YooException, ISerializable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Runtime.Serialization.ISerializable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class YooManifestInvalidException
|
|||
|
|
|
|||
|
|
|
|||
|
|
The exception that is thrown when the resource manifest data is invalid.
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooException.cs#L75)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
[Serializable]
|
|||
|
|
public class YooManifestInvalidException : YooException, ISerializable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Runtime.Serialization.ISerializable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class YooPackageInvalidException
|
|||
|
|
|
|||
|
|
|
|||
|
|
The exception that is thrown when a resource package is in an invalid state.
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooException.cs#L47)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
[Serializable]
|
|||
|
|
public class YooPackageInvalidException : YooException, ISerializable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
Gets the name of the package that caused the exception.
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### [View Source](https://github.com/tuyoogame/YooAsset/blob/yoo3/Assets/YooAsset/Runtime/Utility/YooException.cs#L53)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Runtime.Serialization.ISerializable``
|