7813 lines
124 KiB
Markdown
7813 lines
124 KiB
Markdown
|
|
# YooAsset 2.3.x API Reference
|
|||
|
|
|
|||
|
|
> Auto-generated from https://www.yooasset.com/docs/2.3.x/api/YooAsset/
|
|||
|
|
> Generated on 2026-06-09 16:49:39
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class AllAssetsHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class AllAssetsHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### AllAssetObjects
|
|||
|
|
|
|||
|
|
|
|||
|
|
子资源对象集合
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public IReadOnlyList<Object> AllAssetObjects { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
完成委托
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<AllAssetsHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.AllAssetsHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class AssetHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class AssetHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### AssetObject
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Object AssetObject { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### GetAssetObject<TAsset>()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public TAsset GetAssetObject<TAsset>() where TAsset : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``<TAsset>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TAsset``资源类型
|
|||
|
|
|
|||
|
|
### InstantiateSync()
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步初始化游戏对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public GameObject InstantiateSync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``UnityEngine.GameObject``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InstantiateSync(Transform)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public GameObject InstantiateSync(Transform parent)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``UnityEngine.GameObject``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``UnityEngine.Transform``*parent*
|
|||
|
|
|
|||
|
|
### InstantiateSync(Transform, bool)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public GameObject InstantiateSync(Transform parent, bool worldPositionStays)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``UnityEngine.GameObject``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``UnityEngine.Transform``*parent*``System.Boolean``*worldPositionStays*
|
|||
|
|
|
|||
|
|
### InstantiateSync(Vector3, Quaternion)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public GameObject InstantiateSync(Vector3 position, Quaternion rotation)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``UnityEngine.GameObject``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``UnityEngine.Vector3``*position*``UnityEngine.Quaternion``*rotation*
|
|||
|
|
|
|||
|
|
### InstantiateSync(Vector3, Quaternion, Transform)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public GameObject InstantiateSync(Vector3 position, Quaternion rotation, Transform parent)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``UnityEngine.GameObject``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``UnityEngine.Vector3``*position*``UnityEngine.Quaternion``*rotation*``UnityEngine.Transform``*parent*
|
|||
|
|
|
|||
|
|
### InstantiateAsync(bool)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步初始化游戏对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public InstantiateOperation InstantiateAsync(bool actived = true)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.InstantiateOperation](/docs/2.3.x/api/YooAsset/InstantiateOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Boolean``*actived*
|
|||
|
|
|
|||
|
|
### InstantiateAsync(Transform, bool)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public InstantiateOperation InstantiateAsync(Transform parent, bool actived = true)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.InstantiateOperation](/docs/2.3.x/api/YooAsset/InstantiateOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``UnityEngine.Transform``*parent*``System.Boolean``*actived*
|
|||
|
|
|
|||
|
|
### InstantiateAsync(Transform, bool, bool)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public InstantiateOperation InstantiateAsync(Transform parent, bool worldPositionStays, bool actived = true)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.InstantiateOperation](/docs/2.3.x/api/YooAsset/InstantiateOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``UnityEngine.Transform``*parent*``System.Boolean``*worldPositionStays*``System.Boolean``*actived*
|
|||
|
|
|
|||
|
|
### InstantiateAsync(Vector3, Quaternion, bool)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public InstantiateOperation InstantiateAsync(Vector3 position, Quaternion rotation, bool actived = true)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.InstantiateOperation](/docs/2.3.x/api/YooAsset/InstantiateOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``UnityEngine.Vector3``*position*``UnityEngine.Quaternion``*rotation*``System.Boolean``*actived*
|
|||
|
|
|
|||
|
|
### InstantiateAsync(Vector3, Quaternion, Transform, bool)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public InstantiateOperation InstantiateAsync(Vector3 position, Quaternion rotation, Transform parent, bool actived = true)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.InstantiateOperation](/docs/2.3.x/api/YooAsset/InstantiateOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``UnityEngine.Vector3``*position*``UnityEngine.Quaternion``*rotation*``UnityEngine.Transform``*parent*``System.Boolean``*actived*
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
完成委托
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<AssetHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.AssetHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class AssetInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class AssetInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetType
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源类型
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Type AssetType { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Error
|
|||
|
|
|
|||
|
|
|
|||
|
|
错误信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string Error { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsInvalid
|
|||
|
|
|
|||
|
|
|
|||
|
|
身份是否无效
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsInvalid { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Address
|
|||
|
|
|
|||
|
|
|
|||
|
|
可寻址地址
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string Address { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetPath
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源路径
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string AssetPath { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class AsyncOperationBase
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class AsyncOperationBase : IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Priority
|
|||
|
|
|
|||
|
|
|
|||
|
|
任务优先级
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public uint Priority { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Status
|
|||
|
|
|
|||
|
|
|
|||
|
|
任务状态
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public EOperationStatus Status { get; protected set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Error
|
|||
|
|
|
|||
|
|
|
|||
|
|
错误信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string Error { get; protected set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Progress
|
|||
|
|
|
|||
|
|
|
|||
|
|
处理进度
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public float Progress { get; protected set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsDone
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否已经完成
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsDone { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Task
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作任务
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Task Task { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ProcessTime
|
|||
|
|
|
|||
|
|
|
|||
|
|
处理耗时(单位:毫秒)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long ProcessTime { get; protected set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BeginTime
|
|||
|
|
|
|||
|
|
|
|||
|
|
开始的时间
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BeginTime
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ExecuteWhileDone()
|
|||
|
|
|
|||
|
|
|
|||
|
|
执行While循环
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected bool ExecuteWhileDone()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ClearCompletedCallback()
|
|||
|
|
|
|||
|
|
|
|||
|
|
清空完成回调
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected void ClearCompletedCallback()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CompareTo(AsyncOperationBase)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int CompareTo(AsyncOperationBase other)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Int32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.AsyncOperationBase](/docs/2.3.x/api/YooAsset/AsyncOperationBase)*other*
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
完成事件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<AsyncOperationBase> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.AsyncOperationBase>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ClearCacheFilesOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class ClearCacheFilesOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class CustomPlayModeParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
自定义运行模式的初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class CustomPlayModeParameters : InitializeParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileSystemParameterList
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件系统初始化参数列表
|
|||
|
|
注意:列表最后一个元素作为主文件系统!
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly List<FileSystemParameters> FileSystemParameterList
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DecryptFileInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct DecryptFileInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileLoadPath
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件加载路径
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileLoadPath
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileLoadCRC
|
|||
|
|
|
|||
|
|
|
|||
|
|
Unity引擎用于内容校验的CRC
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public uint FileLoadCRC
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DecryptResult
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct DecryptResult
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Result
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetBundle Result
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CreateRequest
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步请求句柄
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetBundleCreateRequest CreateRequest
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ManagedStream
|
|||
|
|
|
|||
|
|
|
|||
|
|
托管流对象
|
|||
|
|
注意:流对象在资源包对象释放的时候会自动释放
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Stream ManagedStream
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class DestroyOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class DestroyOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloaderFinishData
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载器结束
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct DownloaderFinishData
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Succeed
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否成功
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool Succeed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class DownloaderOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class DownloaderOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### TotalDownloadCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
统计的下载文件总数量
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int TotalDownloadCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### TotalDownloadBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
统计的下载文件的总大小
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long TotalDownloadBytes { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CurrentDownloadCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前已经完成的下载总数量
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int CurrentDownloadCount { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CurrentDownloadBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前已经完成的下载总大小
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long CurrentDownloadBytes { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadFinishCallback
|
|||
|
|
|
|||
|
|
|
|||
|
|
当下载器结束(无论成功或失败)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public DownloaderOperation.DownloaderFinish DownloadFinishCallback { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadUpdateCallback
|
|||
|
|
|
|||
|
|
|
|||
|
|
当下载进度发生变化
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public DownloaderOperation.DownloadUpdate DownloadUpdateCallback { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadErrorCallback
|
|||
|
|
|
|||
|
|
|
|||
|
|
当下载器发生错误
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public DownloaderOperation.DownloadError DownloadErrorCallback { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadFileBeginCallback
|
|||
|
|
|
|||
|
|
|
|||
|
|
当开始下载某个文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public DownloaderOperation.DownloadFileBegin DownloadFileBeginCallback { get; set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Combine(DownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
合并其它下载器
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void Combine(DownloaderOperation downloader)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.DownloaderOperation](/docs/2.3.x/api/YooAsset/DownloaderOperation)*downloader*合并的下载器
|
|||
|
|
|
|||
|
|
### BeginDownload()
|
|||
|
|
|
|||
|
|
|
|||
|
|
开始下载
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void BeginDownload()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PauseDownload()
|
|||
|
|
|
|||
|
|
|
|||
|
|
暂停下载
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void PauseDownload()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ResumeDownload()
|
|||
|
|
|
|||
|
|
|
|||
|
|
恢复下载
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void ResumeDownload()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CancelDownload()
|
|||
|
|
|
|||
|
|
|
|||
|
|
取消下载
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void CancelDownload()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Delegate DownloaderOperation.DownloaderFinish
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载器结束
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public delegate void DownloaderOperation.DownloaderFinish(DownloaderFinishData data)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Delegate DownloaderOperation.DownloadError
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载发生错误
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public delegate void DownloaderOperation.DownloadError(DownloadErrorData data)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Delegate DownloaderOperation.DownloadFileBegin
|
|||
|
|
|
|||
|
|
|
|||
|
|
开始下载某个文件
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public delegate void DownloaderOperation.DownloadFileBegin(DownloadFileData data)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Delegate DownloaderOperation.DownloadUpdate
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载进度更新
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public delegate void DownloaderOperation.DownloadUpdate(DownloadUpdateData data)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloadErrorData
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载器相关的错误数据
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct DownloadErrorData
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileName
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载失败的文件名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ErrorInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
错误信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string ErrorInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloadFileData
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载器相关的文件数据
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct DownloadFileData
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileName
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载的文件名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileSize
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载的文件大小
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long FileSize
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloadStatus
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct DownloadStatus
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### IsDone
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载是否已经完成
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsDone
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Progress
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载进度(0-1f)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public float Progress
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### TotalBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载文件的总大小
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long TotalBytes
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DownloadedBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
已经下载的文件大小
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long DownloadedBytes
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### CreateDefaultStatus()
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static DownloadStatus CreateDefaultStatus()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.DownloadStatus](/docs/2.3.x/api/YooAsset/DownloadStatus)
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct DownloadUpdateData
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载器相关的更新数据
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct DownloadUpdateData
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
所属包裹名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Progress
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载进度 (0-1f)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public float Progress
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### TotalDownloadCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载文件总数
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int TotalDownloadCount
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CurrentDownloadCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前完成的下载文件数量
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int CurrentDownloadCount
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### TotalDownloadBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
下载数据总大小(单位:字节)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long TotalDownloadBytes
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CurrentDownloadBytes
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前完成的下载数据大小(单位:字节)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public long CurrentDownloadBytes
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EBuildBundleType
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EBuildBundleType
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Unknown
|
|||
|
|
|
|||
|
|
|
|||
|
|
未知类型
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Unknown = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VirtualBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
虚拟资源包
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
VirtualBundle = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
AssetBundle
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
AssetBundle = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RawBundle
|
|||
|
|
|
|||
|
|
|
|||
|
|
原生文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
RawBundle = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class EditorSimulateModeHelper
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class EditorSimulateModeHelper
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### SimulateBuild(string)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static PackageInvokeBuildResult SimulateBuild(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.PackageInvokeBuildResult](/docs/2.3.x/api/YooAsset/PackageInvokeBuildResult)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*packageName*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class EditorSimulateModeParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
编辑器下模拟运行模式的初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class EditorSimulateModeParameters : InitializeParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### EditorFileSystemParameters
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters EditorFileSystemParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EFileClearMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件清理方式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EFileClearMode
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ClearAllBundleFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearAllBundleFiles = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearUnusedBundleFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理未在使用的文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearUnusedBundleFiles = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearBundleFilesByTags
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearBundleFilesByTags = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearAllManifestFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有清单
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearAllManifestFiles = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearUnusedManifestFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理未在使用的清单
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearUnusedManifestFiles = 4
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EFileNameStyle
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EFileNameStyle
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### HashName
|
|||
|
|
|
|||
|
|
|
|||
|
|
哈希值名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
HashName = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称(不推荐)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
BundleName = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleName_HashName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称 + 哈希值名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
BundleName_HashName = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EFileVerifyLevel
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件校验等级
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EFileVerifyLevel
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Low
|
|||
|
|
|
|||
|
|
|
|||
|
|
验证文件存在
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Low = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Middle
|
|||
|
|
|
|||
|
|
|
|||
|
|
验证文件大小
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Middle = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### High
|
|||
|
|
|
|||
|
|
|
|||
|
|
验证文件大小和CRC
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
High = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct EncryptFileInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct EncryptFileInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileLoadPath
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件路径
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileLoadPath
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct EncryptResult
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct EncryptResult
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Encrypted
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件是否加密
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool Encrypted
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### EncryptedData
|
|||
|
|
|
|||
|
|
|
|||
|
|
加密后的文件数据
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public byte[] EncryptedData
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EOperationStatus
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EOperationStatus
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### None
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
None = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Processing
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Processing = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Succeed
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Succeed = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Failed
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
Failed = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EOverwriteInstallClearMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
覆盖安装清理模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EOverwriteInstallClearMode
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### None
|
|||
|
|
|
|||
|
|
|
|||
|
|
不做任何处理
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
None = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearAllCacheFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有缓存文件(包含资源文件和清单文件)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearAllCacheFiles = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearAllBundleFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有缓存的资源文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearAllBundleFiles = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ClearAllManifestFiles
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理所有缓存的清单文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
ClearAllManifestFiles = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Enum EPlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
运行模式
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public enum EPlayMode
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### EditorSimulateMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
编辑器下的模拟模式
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
EditorSimulateMode = 0
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### OfflinePlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
离线运行模式
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
OfflinePlayMode = 1
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### HostPlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
联机运行模式
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
HostPlayMode = 2
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### WebPlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
WebGL运行模式
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
WebPlayMode = 3
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CustomPlayMode
|
|||
|
|
|
|||
|
|
|
|||
|
|
自定义运行模式
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
CustomPlayMode = 4
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class FileSystemParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件系统参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class FileSystemParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileSystemClass
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件系统类
|
|||
|
|
格式: "namespace.class,assembly"
|
|||
|
|
格式: "命名空间.类型名,程序集"
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileSystemClass { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageRoot
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件系统的根目录
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageRoot { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### AddParameter(string, object)
|
|||
|
|
|
|||
|
|
|
|||
|
|
添加自定义参数
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void AddParameter(string name, object value)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*name*``System.Object``*value*
|
|||
|
|
|
|||
|
|
### CreateDefaultEditorFileSystemParameters(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的编辑器文件系统参数
|
|||
|
|
<param name="packageRoot">文件系统的根目录</param>
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultEditorFileSystemParameters(string packageRoot)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/2.3.x/api/YooAsset/FileSystemParameters)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*packageRoot*
|
|||
|
|
|
|||
|
|
### CreateDefaultBuildinFileSystemParameters(IDecryptionServices, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的内置文件系统参数
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultBuildinFileSystemParameters(IDecryptionServices decryptionServices = null, string packageRoot = null)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/2.3.x/api/YooAsset/FileSystemParameters)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.IDecryptionServices](/docs/2.3.x/api/YooAsset/IDecryptionServices)*decryptionServices*加密文件解密服务类``System.String``*packageRoot*文件系统的根目录
|
|||
|
|
|
|||
|
|
### CreateDefaultCacheFileSystemParameters(IRemoteServices, IDecryptionServices, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的缓存文件系统参数
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultCacheFileSystemParameters(IRemoteServices remoteServices, IDecryptionServices decryptionServices = null, string packageRoot = null)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/2.3.x/api/YooAsset/FileSystemParameters)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.IRemoteServices](/docs/2.3.x/api/YooAsset/IRemoteServices)*remoteServices*远端资源地址查询服务类[YooAsset.IDecryptionServices](/docs/2.3.x/api/YooAsset/IDecryptionServices)*decryptionServices*加密文件解密服务类``System.String``*packageRoot*文件系统的根目录
|
|||
|
|
|
|||
|
|
### CreateDefaultWebServerFileSystemParameters(IWebDecryptionServices, bool)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的WebServer文件系统参数
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultWebServerFileSystemParameters(IWebDecryptionServices decryptionServices = null, bool disableUnityWebCache = false)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/2.3.x/api/YooAsset/FileSystemParameters)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.IWebDecryptionServices](/docs/2.3.x/api/YooAsset/IWebDecryptionServices)*decryptionServices*加密文件解密服务类``System.Boolean``*disableUnityWebCache*禁用Unity的网络缓存
|
|||
|
|
|
|||
|
|
### CreateDefaultWebRemoteFileSystemParameters(IRemoteServices, IWebDecryptionServices, bool)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建默认的WebRemote文件系统参数
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static FileSystemParameters CreateDefaultWebRemoteFileSystemParameters(IRemoteServices remoteServices, IWebDecryptionServices decryptionServices = null, bool disableUnityWebCache = false)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.FileSystemParameters](/docs/2.3.x/api/YooAsset/FileSystemParameters)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.IRemoteServices](/docs/2.3.x/api/YooAsset/IRemoteServices)*remoteServices*远端资源地址查询服务类[YooAsset.IWebDecryptionServices](/docs/2.3.x/api/YooAsset/IWebDecryptionServices)*decryptionServices*加密文件解密服务类``System.Boolean``*disableUnityWebCache*禁用Unity的网络缓存
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class FileSystemParametersDefine
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class FileSystemParametersDefine
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FILE_VERIFY_LEVEL
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string FILE_VERIFY_LEVEL = "FILE_VERIFY_LEVEL"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FILE_VERIFY_MAX_CONCURRENCY
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string FILE_VERIFY_MAX_CONCURRENCY = "FILE_VERIFY_MAX_CONCURRENCY"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### INSTALL_CLEAR_MODE
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string INSTALL_CLEAR_MODE = "INSTALL_CLEAR_MODE"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### REMOTE_SERVICES
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string REMOTE_SERVICES = "REMOTE_SERVICES"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DECRYPTION_SERVICES
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string DECRYPTION_SERVICES = "DECRYPTION_SERVICES"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### MANIFEST_SERVICES
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string MANIFEST_SERVICES = "MANIFEST_SERVICES"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### APPEND_FILE_EXTENSION
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string APPEND_FILE_EXTENSION = "APPEND_FILE_EXTENSION"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DISABLE_CATALOG_FILE
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string DISABLE_CATALOG_FILE = "DISABLE_CATALOG_FILE"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DISABLE_UNITY_WEB_CACHE
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string DISABLE_UNITY_WEB_CACHE = "DISABLE_UNITY_WEB_CACHE"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DISABLE_ONDEMAND_DOWNLOAD
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string DISABLE_ONDEMAND_DOWNLOAD = "DISABLE_ONDEMAND_DOWNLOAD"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DOWNLOAD_MAX_CONCURRENCY
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string DOWNLOAD_MAX_CONCURRENCY = "DOWNLOAD_MAX_CONCURRENCY"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DOWNLOAD_MAX_REQUEST_PER_FRAME
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string DOWNLOAD_MAX_REQUEST_PER_FRAME = "DOWNLOAD_MAX_REQUEST_PER_FRAME"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### DOWNLOAD_WATCH_DOG_TIME
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string DOWNLOAD_WATCH_DOG_TIME = "DOWNLOAD_WATCH_DOG_TIME"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RESUME_DOWNLOAD_MINMUM_SIZE
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string RESUME_DOWNLOAD_MINMUM_SIZE = "RESUME_DOWNLOAD_MINMUM_SIZE"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### RESUME_DOWNLOAD_RESPONSE_CODES
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string RESUME_DOWNLOAD_RESPONSE_CODES = "RESUME_DOWNLOAD_RESPONSE_CODES"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VIRTUAL_WEBGL_MODE
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string VIRTUAL_WEBGL_MODE = "VIRTUAL_WEBGL_MODE"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VIRTUAL_DOWNLOAD_MODE
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string VIRTUAL_DOWNLOAD_MODE = "VIRTUAL_DOWNLOAD_MODE"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### VIRTUAL_DOWNLOAD_SPEED
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string VIRTUAL_DOWNLOAD_SPEED = "VIRTUAL_DOWNLOAD_SPEED"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ASYNC_SIMULATE_MIN_FRAME
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string ASYNC_SIMULATE_MIN_FRAME = "ASYNC_SIMULATE_MIN_FRAME"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### ASYNC_SIMULATE_MAX_FRAME
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string ASYNC_SIMULATE_MAX_FRAME = "ASYNC_SIMULATE_MAX_FRAME"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### COPY_BUILDIN_PACKAGE_MANIFEST
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string COPY_BUILDIN_PACKAGE_MANIFEST = "COPY_BUILDIN_PACKAGE_MANIFEST"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### COPY_BUILDIN_PACKAGE_MANIFEST_DEST_ROOT
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string COPY_BUILDIN_PACKAGE_MANIFEST_DEST_ROOT = "COPY_BUILDIN_PACKAGE_MANIFEST_DEST_ROOT"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### COPY_LOCAL_FILE_SERVICES
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string COPY_LOCAL_FILE_SERVICES = "COPY_LOCAL_FILE_SERVICES"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class GameAsyncOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class GameAsyncOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### OnStart()
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作开始
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected abstract void OnStart()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### OnUpdate()
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作更新
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected abstract void OnUpdate()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### OnAbort()
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作终止
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected abstract void OnAbort()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### OnWaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步等待完成
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected virtual void OnWaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsBusy()
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作系统是否繁忙
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected bool IsBusy()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Abort()
|
|||
|
|
|
|||
|
|
|
|||
|
|
终止异步操作
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
protected void Abort()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class HandleBase
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class HandleBase : IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Status
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前状态
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public EOperationStatus Status { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### LastError
|
|||
|
|
|
|||
|
|
|
|||
|
|
最近的错误信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string LastError { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Progress
|
|||
|
|
|
|||
|
|
|
|||
|
|
加载进度
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public float Progress { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsDone
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否加载完毕
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsDone { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IsValid
|
|||
|
|
|
|||
|
|
|
|||
|
|
句柄是否有效
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsValid { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Task
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步操作任务
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Task Task { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Release()
|
|||
|
|
|
|||
|
|
|
|||
|
|
释放资源句柄
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void Release()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### Dispose()
|
|||
|
|
|
|||
|
|
|
|||
|
|
释放资源句柄
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void Dispose()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### GetAssetInfo()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfo()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetDownloadStatus()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取下载报告
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public DownloadStatus GetDownloadStatus()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.DownloadStatus](/docs/2.3.x/api/YooAsset/DownloadStatus)
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class HashUtility
|
|||
|
|
|
|||
|
|
|
|||
|
|
哈希工具类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class HashUtility
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### StringSHA1(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取字符串的Hash值
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string StringSHA1(string str)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*str*
|
|||
|
|
|
|||
|
|
### FileSHA1(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取文件的Hash值
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string FileSHA1(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### FileSHA1Safely(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取文件的Hash值
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string FileSHA1Safely(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### StreamSHA1(Stream)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取数据流的Hash值
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string StreamSHA1(Stream stream)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.IO.Stream``*stream*
|
|||
|
|
|
|||
|
|
### BytesSHA1(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取字节数组的Hash值
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string BytesSHA1(byte[] buffer)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Byte[]``*buffer*
|
|||
|
|
|
|||
|
|
### StringMD5(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取字符串的MD5
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string StringMD5(string str)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*str*
|
|||
|
|
|
|||
|
|
### FileMD5(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取文件的MD5
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string FileMD5(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### FileMD5Safely(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取文件的MD5
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string FileMD5Safely(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### StreamMD5(Stream)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取数据流的MD5
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string StreamMD5(Stream stream)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.IO.Stream``*stream*
|
|||
|
|
|
|||
|
|
### BytesMD5(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取字节数组的MD5
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string BytesMD5(byte[] buffer)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Byte[]``*buffer*
|
|||
|
|
|
|||
|
|
### StringCRC32(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取字符串的CRC32
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string StringCRC32(string str)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*str*
|
|||
|
|
|
|||
|
|
### StringCRC32Value(string)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static uint StringCRC32Value(string str)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.UInt32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*str*
|
|||
|
|
|
|||
|
|
### FileCRC32(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取文件的CRC32
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string FileCRC32(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### FileCRC32Value(string)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static uint FileCRC32Value(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.UInt32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### FileCRC32Safely(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取文件的CRC32
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string FileCRC32Safely(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### FileCRC32ValueSafely(string)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static uint FileCRC32ValueSafely(string filePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.UInt32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*filePath*
|
|||
|
|
|
|||
|
|
### StreamCRC32(Stream)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取数据流的CRC32
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string StreamCRC32(Stream stream)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.IO.Stream``*stream*
|
|||
|
|
|
|||
|
|
### StreamCRC32Value(Stream)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static uint StreamCRC32Value(Stream stream)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.UInt32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.IO.Stream``*stream*
|
|||
|
|
|
|||
|
|
### BytesCRC32(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取字节数组的CRC32
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string BytesCRC32(byte[] buffer)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Byte[]``*buffer*
|
|||
|
|
|
|||
|
|
### BytesCRC32Value(byte[])
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static uint BytesCRC32Value(byte[] buffer)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.UInt32``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Byte[]``*buffer*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class HostPlayModeParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
联机运行模式的初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class HostPlayModeParameters : InitializeParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BuildinFileSystemParameters
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters BuildinFileSystemParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CacheFileSystemParameters
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters CacheFileSystemParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface ICopyLocalFileServices
|
|||
|
|
|
|||
|
|
|
|||
|
|
本地文件拷贝服务类
|
|||
|
|
备注:包体内文件拷贝,沙盒内文件导入都会触发该服务!
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface ICopyLocalFileServices
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### CopyFile(LocalFileInfo, string)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void CopyFile(LocalFileInfo sourceFileInfo, string destFilePath)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.LocalFileInfo](/docs/2.3.x/api/YooAsset/LocalFileInfo)*sourceFileInfo*``System.String``*destFilePath*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IDecryptionServices
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IDecryptionServices
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### LoadAssetBundle(DecryptFileInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步方式获取解密的资源包
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DecryptResult LoadAssetBundle(DecryptFileInfo fileInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.DecryptResult](/docs/2.3.x/api/YooAsset/DecryptResult)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.DecryptFileInfo](/docs/2.3.x/api/YooAsset/DecryptFileInfo)*fileInfo*
|
|||
|
|
|
|||
|
|
### LoadAssetBundleAsync(DecryptFileInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步方式获取解密的资源包
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DecryptResult LoadAssetBundleAsync(DecryptFileInfo fileInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.DecryptResult](/docs/2.3.x/api/YooAsset/DecryptResult)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.DecryptFileInfo](/docs/2.3.x/api/YooAsset/DecryptFileInfo)*fileInfo*
|
|||
|
|
|
|||
|
|
### LoadAssetBundleFallback(DecryptFileInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
后备方式获取解密的资源包
|
|||
|
|
注意:当正常解密方法失败后,会触发后备加载!
|
|||
|
|
说明:建议通过LoadFromMemory()方法加载资源包作为保底机制。
|
|||
|
|
issues : [https://github.com/tuyoogame/YooAsset/issues/562](https://github.com/tuyoogame/YooAsset/issues/562)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
DecryptResult LoadAssetBundleFallback(DecryptFileInfo fileInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.DecryptResult](/docs/2.3.x/api/YooAsset/DecryptResult)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.DecryptFileInfo](/docs/2.3.x/api/YooAsset/DecryptFileInfo)*fileInfo*
|
|||
|
|
|
|||
|
|
### ReadFileData(DecryptFileInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取解密的字节数据
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
byte[] ReadFileData(DecryptFileInfo fileInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Byte[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.DecryptFileInfo](/docs/2.3.x/api/YooAsset/DecryptFileInfo)*fileInfo*
|
|||
|
|
|
|||
|
|
### ReadFileText(DecryptFileInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取解密的文本数据
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
string ReadFileText(DecryptFileInfo fileInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.DecryptFileInfo](/docs/2.3.x/api/YooAsset/DecryptFileInfo)*fileInfo*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IEncryptionServices
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IEncryptionServices
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Encrypt(EncryptFileInfo)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
EncryptResult Encrypt(EncryptFileInfo fileInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.EncryptResult](/docs/2.3.x/api/YooAsset/EncryptResult)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.EncryptFileInfo](/docs/2.3.x/api/YooAsset/EncryptFileInfo)*fileInfo*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface ILogger
|
|||
|
|
|
|||
|
|
|
|||
|
|
自定义日志处理
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface ILogger
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Log(string)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void Log(string message)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*message*
|
|||
|
|
|
|||
|
|
### Warning(string)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void Warning(string message)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*message*
|
|||
|
|
|
|||
|
|
### Error(string)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void Error(string message)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*message*
|
|||
|
|
|
|||
|
|
### Exception(Exception)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
void Exception(Exception exception)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Exception``*exception*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IManifestProcessServices
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源清单文件处理服务接口
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IManifestProcessServices
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ProcessManifest(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
处理资源清单(压缩或加密)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
byte[] ProcessManifest(byte[] fileData)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Byte[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Byte[]``*fileData*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IManifestRestoreServices
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源清单文件处理服务接口
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IManifestRestoreServices
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### RestoreManifest(byte[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
还原资源清单(解压或解密)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
byte[] RestoreManifest(byte[] fileData)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Byte[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Byte[]``*fileData*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct ImportFileInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
导入文件的信息
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct ImportFileInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FilePath
|
|||
|
|
|
|||
|
|
|
|||
|
|
本地文件路径
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FilePath
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleGUID
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包GUID
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleGUID
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class InitializationOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class InitializationOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class InitializeParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class InitializeParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BundleLoadingMaxConcurrency
|
|||
|
|
|
|||
|
|
|
|||
|
|
同时加载Bundle文件的最大并发数
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int BundleLoadingMaxConcurrency
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### WebGLForceSyncLoadAsset
|
|||
|
|
|
|||
|
|
|
|||
|
|
WebGL平台强制同步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool WebGLForceSyncLoadAsset
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class InstantiateOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class InstantiateOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Result
|
|||
|
|
|
|||
|
|
|
|||
|
|
实例化的游戏对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public GameObject Result
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Cancel()
|
|||
|
|
|
|||
|
|
|
|||
|
|
取消实例化对象操作
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void Cancel()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IRemoteServices
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IRemoteServices
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetRemoteMainURL(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取主资源站的资源地址
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
string GetRemoteMainURL(string fileName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*fileName*请求的文件名称
|
|||
|
|
|
|||
|
|
### GetRemoteFallbackURL(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取备用资源站的资源地址
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
string GetRemoteFallbackURL(string fileName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*fileName*请求的文件名称
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Interface IWebDecryptionServices
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public interface IWebDecryptionServices
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### LoadAssetBundle(WebDecryptFileInfo)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
WebDecryptResult LoadAssetBundle(WebDecryptFileInfo fileInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.WebDecryptResult](/docs/2.3.x/api/YooAsset/WebDecryptResult)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.WebDecryptFileInfo](/docs/2.3.x/api/YooAsset/WebDecryptFileInfo)*fileInfo*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct LocalFileInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct LocalFileInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
包裹名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### SourceFileURL
|
|||
|
|
|
|||
|
|
|
|||
|
|
源文件请求地址
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string SourceFileURL
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ManifestDefine
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class ManifestDefine
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileMaxSize
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件极限大小(100MB)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const int FileMaxSize = 104857600
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileSign
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件头标记
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const uint FileSign = 5853007
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileVersion
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件格式版本
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public const string FileVersion = "2025.8.28"
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class OfflinePlayModeParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
离线运行模式的初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class OfflinePlayModeParameters : InitializeParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BuildinFileSystemParameters
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters BuildinFileSystemParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PackageDetails
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class PackageDetails
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### FileVersion
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件版本
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string FileVersion
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### EnableAddressable
|
|||
|
|
|
|||
|
|
|
|||
|
|
启用可寻址资源定位
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool EnableAddressable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### SupportExtensionless
|
|||
|
|
|
|||
|
|
|
|||
|
|
支持无后缀名的资源定位地址
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool SupportExtensionless
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### LocationToLower
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源定位地址大小写不敏感
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool LocationToLower
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### IncludeAssetGUID
|
|||
|
|
|
|||
|
|
|
|||
|
|
包含资源GUID数据
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IncludeAssetGUID
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### OutputNameStyle
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件名称样式
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int OutputNameStyle
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BuildBundleType
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建资源包类型
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int BuildBundleType
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BuildPipeline
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建管线名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BuildPipeline
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageVersion
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹的版本信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageVersion
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageNote
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包裹的备注信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageNote
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### AssetTotalCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
主资源文件总数
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int AssetTotalCount
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BundleTotalCount
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包文件总数
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public int BundleTotalCount
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PackageInvokeBuilder
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class PackageInvokeBuilder
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InvokeBuilder(PackageInvokeBuildParam)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static PackageInvokeBuildResult InvokeBuilder(PackageInvokeBuildParam buildParam)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.PackageInvokeBuildResult](/docs/2.3.x/api/YooAsset/PackageInvokeBuildResult)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.PackageInvokeBuildParam](/docs/2.3.x/api/YooAsset/PackageInvokeBuildParam)*buildParam*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PackageInvokeBuildParam
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class PackageInvokeBuildParam
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
包裹名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly string PackageName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BuildPipelineName
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建管线名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BuildPipelineName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### BuildUserData
|
|||
|
|
|
|||
|
|
|
|||
|
|
用户数据
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public object BuildUserData
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InvokeAssmeblyName
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建类所属程序集名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string InvokeAssmeblyName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InvokeClassFullName
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建执行的类名全称
|
|||
|
|
注意:类名必须包含命名空间!
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string InvokeClassFullName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### InvokeMethodName
|
|||
|
|
|
|||
|
|
|
|||
|
|
构建执行的方法名称
|
|||
|
|
注意:执行方法必须满足 BindingFlags.Public | BindingFlags.Static
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string InvokeMethodName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PackageInvokeBuildResult
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class PackageInvokeBuildResult
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageRootDirectory
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageRootDirectory
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PakcageInvokeBuilder
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class PakcageInvokeBuilder
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InvokeBuilder(PackageInvokeBuildParam)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static PackageInvokeBuildResult InvokeBuilder(PackageInvokeBuildParam buildParam)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.PackageInvokeBuildResult](/docs/2.3.x/api/YooAsset/PackageInvokeBuildResult)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.PackageInvokeBuildParam](/docs/2.3.x/api/YooAsset/PackageInvokeBuildParam)*buildParam*
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class PreDownloadContentOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class PreDownloadContentOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载当前资源版本所有的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateResourceDownloader(int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(string, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源标签关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*tag*资源标签``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(string[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源标签列表关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*tags*资源标签列表``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(string, bool, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(string location, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源定位地址``System.Boolean``*recursiveDownload*``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(string[], bool, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源列表依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(string[] locations, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*locations*资源定位地址列表``System.Boolean``*recursiveDownload*``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class RawFileHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class RawFileHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### GetRawFileData()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取原生文件的二进制数据
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public byte[] GetRawFileData()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Byte[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetRawFileText()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取原生文件的文本数据
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string GetRawFileText()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetRawFilePath()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取原生文件的路径
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string GetRawFilePath()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
完成委托
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<RawFileHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.RawFileHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class RequestPackageVersionOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public abstract class RequestPackageVersionOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageVersion
|
|||
|
|
|
|||
|
|
|
|||
|
|
当前最新的包裹版本
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string PackageVersion { get; protected set; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ResourceDownloaderOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class ResourceDownloaderOperation : DownloaderOperation, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ResourceImporterOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class ResourceImporterOperation : DownloaderOperation, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ResourcePackage
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class ResourcePackage
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InitializeStatus
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化状态
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public EOperationStatus InitializeStatus { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### PackageValid
|
|||
|
|
|
|||
|
|
|
|||
|
|
包裹是否有效
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool PackageValid { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### PackageName
|
|||
|
|
|
|||
|
|
|
|||
|
|
包裹名
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public readonly string PackageName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### InitializeAsync(InitializeParameters)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步初始化
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public InitializationOperation InitializeAsync(InitializeParameters parameters)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.InitializationOperation](/docs/2.3.x/api/YooAsset/InitializationOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.InitializeParameters](/docs/2.3.x/api/YooAsset/InitializeParameters)*parameters*
|
|||
|
|
|
|||
|
|
### DestroyAsync()
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步销毁
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public DestroyOperation DestroyAsync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.DestroyOperation](/docs/2.3.x/api/YooAsset/DestroyOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
### RequestPackageVersionAsync(bool, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
请求最新的资源版本
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public RequestPackageVersionOperation RequestPackageVersionAsync(bool appendTimeTicks = true, int timeout = 60)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RequestPackageVersionOperation](/docs/2.3.x/api/YooAsset/RequestPackageVersionOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Boolean``*appendTimeTicks*在URL末尾添加时间戳``System.Int32``*timeout*超时时间(默认值:60秒)
|
|||
|
|
|
|||
|
|
### UpdatePackageManifestAsync(string, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
更新并加载指定版本的资源清单
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UpdatePackageManifestOperation UpdatePackageManifestAsync(string packageVersion, int timeout = 60)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UpdatePackageManifestOperation](/docs/2.3.x/api/YooAsset/UpdatePackageManifestOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageVersion*包裹版本``System.Int32``*timeout*超时时间(默认值:60秒)
|
|||
|
|
|
|||
|
|
### PreDownloadContentAsync(string, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
预下载指定版本的包裹资源
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public PreDownloadContentOperation PreDownloadContentAsync(string packageVersion, int timeout = 60)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.PreDownloadContentOperation](/docs/2.3.x/api/YooAsset/PreDownloadContentOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageVersion*包裹版本``System.Int32``*timeout*资源清单下载的超时时间(默认值:60秒)
|
|||
|
|
|
|||
|
|
### ClearCacheFilesAsync(EFileClearMode, object)
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理缓存文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ClearCacheFilesOperation ClearCacheFilesAsync(EFileClearMode clearMode, object clearParam = null)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ClearCacheFilesOperation](/docs/2.3.x/api/YooAsset/ClearCacheFilesOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.EFileClearMode](/docs/2.3.x/api/YooAsset/EFileClearMode)*clearMode*清理方式``System.Object``*clearParam*执行参数
|
|||
|
|
|
|||
|
|
### ClearCacheFilesAsync(string, object)
|
|||
|
|
|
|||
|
|
|
|||
|
|
清理缓存文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ClearCacheFilesOperation ClearCacheFilesAsync(string clearMode, object clearParam = null)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ClearCacheFilesOperation](/docs/2.3.x/api/YooAsset/ClearCacheFilesOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*clearMode*清理方式``System.Object``*clearParam*执行参数
|
|||
|
|
|
|||
|
|
### GetPackageVersion()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取当前加载包裹的版本信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string GetPackageVersion()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetPackageNote()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取当前加载包裹的备注信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string GetPackageNote()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetPackageDetails()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取当前加载包裹的详细信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public PackageDetails GetPackageDetails()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.PackageDetails](/docs/2.3.x/api/YooAsset/PackageDetails)
|
|||
|
|
|
|||
|
|
|
|||
|
|
### UnloadAllAssetsAsync()
|
|||
|
|
|
|||
|
|
|
|||
|
|
强制回收所有资源
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UnloadAllAssetsOperation UnloadAllAssetsAsync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UnloadAllAssetsOperation](/docs/2.3.x/api/YooAsset/UnloadAllAssetsOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
### UnloadAllAssetsAsync(UnloadAllAssetsOptions)
|
|||
|
|
|
|||
|
|
|
|||
|
|
强制回收所有资源
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UnloadAllAssetsOperation UnloadAllAssetsAsync(UnloadAllAssetsOptions options)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UnloadAllAssetsOperation](/docs/2.3.x/api/YooAsset/UnloadAllAssetsOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.UnloadAllAssetsOptions](/docs/2.3.x/api/YooAsset/UnloadAllAssetsOptions)*options*卸载选项
|
|||
|
|
|
|||
|
|
### UnloadUnusedAssetsAsync(int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
回收不再使用的资源
|
|||
|
|
说明:卸载引用计数为零的资源
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UnloadUnusedAssetsOperation UnloadUnusedAssetsAsync(int loopCount = 10)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UnloadUnusedAssetsOperation](/docs/2.3.x/api/YooAsset/UnloadUnusedAssetsOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*loopCount*循环迭代次数
|
|||
|
|
|
|||
|
|
### TryUnloadUnusedAsset(string, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源回收
|
|||
|
|
说明:尝试卸载指定的资源
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void TryUnloadUnusedAsset(string location, int loopCount = 10)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*location*``System.Int32``*loopCount*
|
|||
|
|
|
|||
|
|
### TryUnloadUnusedAsset(AssetInfo, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源回收
|
|||
|
|
说明:尝试卸载指定的资源
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void TryUnloadUnusedAsset(AssetInfo assetInfo, int loopCount = 10)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*``System.Int32``*loopCount*
|
|||
|
|
|
|||
|
|
### IsNeedDownloadFromRemote(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否需要从远端更新下载
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsNeedDownloadFromRemote(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### IsNeedDownloadFromRemote(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否需要从远端更新下载
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool IsNeedDownloadFromRemote(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*
|
|||
|
|
|
|||
|
|
### GetAllAssetInfos()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取所有的资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo[] GetAllAssetInfos()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``YooAsset.AssetInfo[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetAssetInfos(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息列表
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo[] GetAssetInfos(string tag)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``YooAsset.AssetInfo[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*tag*资源标签
|
|||
|
|
|
|||
|
|
### GetAssetInfos(string[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息列表
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo[] GetAssetInfos(string[] tags)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``YooAsset.AssetInfo[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*tags*资源标签列表
|
|||
|
|
|
|||
|
|
### GetAssetInfo(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfo(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### GetAssetInfo(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfo(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*资源类型
|
|||
|
|
|
|||
|
|
### GetAssetInfoByGUID(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfoByGUID(string assetGUID)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*assetGUID*资源GUID
|
|||
|
|
|
|||
|
|
### GetAssetInfoByGUID(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetInfo GetAssetInfoByGUID(string assetGUID, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*assetGUID*资源GUID``System.Type``*type*资源类型
|
|||
|
|
|
|||
|
|
### CheckLocationValid(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
检查资源定位地址是否有效
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool CheckLocationValid(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadRawFileSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载原生文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public RawFileHandle LoadRawFileSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RawFileHandle](/docs/2.3.x/api/YooAsset/RawFileHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadRawFileSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载原生文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public RawFileHandle LoadRawFileSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RawFileHandle](/docs/2.3.x/api/YooAsset/RawFileHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadRawFileAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载原生文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public RawFileHandle LoadRawFileAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RawFileHandle](/docs/2.3.x/api/YooAsset/RawFileHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadRawFileAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载原生文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public RawFileHandle LoadRawFileAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RawFileHandle](/docs/2.3.x/api/YooAsset/RawFileHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadSceneSync(string, LoadSceneMode, LocalPhysicsMode)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载场景
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SceneHandle LoadSceneSync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/2.3.x/api/YooAsset/SceneHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*场景的定位地址``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式
|
|||
|
|
|
|||
|
|
### LoadSceneSync(AssetInfo, LoadSceneMode, LocalPhysicsMode)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载场景
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SceneHandle LoadSceneSync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/2.3.x/api/YooAsset/SceneHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*场景的资源信息``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式
|
|||
|
|
|
|||
|
|
### LoadSceneAsync(string, LoadSceneMode, LocalPhysicsMode, bool, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载场景
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SceneHandle LoadSceneAsync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None, bool suspendLoad = false, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/2.3.x/api/YooAsset/SceneHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*场景的定位地址``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式``System.Boolean``*suspendLoad*场景加载到90%自动挂起``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadSceneAsync(AssetInfo, LoadSceneMode, LocalPhysicsMode, bool, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载场景
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SceneHandle LoadSceneAsync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None, bool suspendLoad = false, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/2.3.x/api/YooAsset/SceneHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*场景的资源信息``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式``System.Boolean``*suspendLoad*场景加载到90%自动挂起``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAssetSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadAssetSync<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetSync<TObject>(string location) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAssetSync(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetSync(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*资源类型
|
|||
|
|
|
|||
|
|
### LoadAssetSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadAssetAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAssetAsync<TObject>(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetAsync<TObject>(string location, uint priority = 0) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAssetAsync(string, Type, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetAsync(string location, Type type, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*资源类型``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAssetAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetHandle LoadAssetAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsSync<TObject>(string location) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsSync(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync<TObject>(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsAsync<TObject>(string location, uint priority = 0) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync(string, Type, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsAsync(string location, Type type, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public SubAssetsHandle LoadSubAssetsAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsSync<TObject>(string location) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsSync(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync<TObject>(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsAsync<TObject>(string location, uint priority = 0) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync(string, Type, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsAsync(string location, Type type, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AllAssetsHandle LoadAllAssetsAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*加载的优先级
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载当前资源版本所有的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateResourceDownloader(int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(string, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源标签关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*tag*资源标签``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(string[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源标签列表关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*tags*资源标签列表``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(string, bool, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(string location, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Boolean``*recursiveDownload*下载资源对象所属资源包内所有资源对象依赖的资源包``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(string, int, int)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(string location, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*location*``System.Int32``*downloadingMaxNumber*``System.Int32``*failedTryAgain*
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(string[], bool, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源列表依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(string[] locations, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*locations*资源的定位地址列表``System.Boolean``*recursiveDownload*下载资源对象所属资源包内所有资源对象依赖的资源包``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(string[], int, int)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(string[] locations, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String[]``*locations*``System.Int32``*downloadingMaxNumber*``System.Int32``*failedTryAgain*
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(AssetInfo, bool, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(AssetInfo assetInfo, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.Boolean``*recursiveDownload*下载资源对象所属资源包内所有资源对象依赖的资源包``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(AssetInfo, int, int)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(AssetInfo assetInfo, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*``System.Int32``*downloadingMaxNumber*``System.Int32``*failedTryAgain*
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(AssetInfo[], bool, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源列表依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(AssetInfo[] assetInfos, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``YooAsset.AssetInfo[]``*assetInfos*资源信息列表``System.Boolean``*recursiveDownload*下载资源对象所属资源包内所有资源对象依赖的资源包``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(AssetInfo[], int, int)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceDownloaderOperation CreateBundleDownloader(AssetInfo[] assetInfos, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``YooAsset.AssetInfo[]``*assetInfos*``System.Int32``*downloadingMaxNumber*``System.Int32``*failedTryAgain*
|
|||
|
|
|
|||
|
|
### CreateResourceUnpacker(int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建内置资源解压器,用于解压当前资源版本所有的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceUnpackerOperation CreateResourceUnpacker(int unpackingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceUnpackerOperation](/docs/2.3.x/api/YooAsset/ResourceUnpackerOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*unpackingMaxNumber*同时解压的最大文件数``System.Int32``*failedTryAgain*解压失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceUnpacker(string, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建内置资源解压器,用于解压指定的资源标签关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceUnpackerOperation CreateResourceUnpacker(string tag, int unpackingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceUnpackerOperation](/docs/2.3.x/api/YooAsset/ResourceUnpackerOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*tag*资源标签``System.Int32``*unpackingMaxNumber*同时解压的最大文件数``System.Int32``*failedTryAgain*解压失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceUnpacker(string[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建内置资源解压器,用于解压指定的资源标签列表关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceUnpackerOperation CreateResourceUnpacker(string[] tags, int unpackingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceUnpackerOperation](/docs/2.3.x/api/YooAsset/ResourceUnpackerOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*tags*资源标签列表``System.Int32``*unpackingMaxNumber*同时解压的最大文件数``System.Int32``*failedTryAgain*解压失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceImporter(string[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源导入器
|
|||
|
|
注意:资源文件名称必须和资源服务器部署的文件名称一致!
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceImporterOperation CreateResourceImporter(string[] filePaths, int importerMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceImporterOperation](/docs/2.3.x/api/YooAsset/ResourceImporterOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*filePaths*资源路径列表``System.Int32``*importerMaxNumber*同时导入的最大文件数``System.Int32``*failedTryAgain*导入失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceImporter(ImportFileInfo[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源导入器
|
|||
|
|
注意:资源信息里需要指定BundleName或BundleGUID!
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public ResourceImporterOperation CreateResourceImporter(ImportFileInfo[] fileInfos, int importerMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceImporterOperation](/docs/2.3.x/api/YooAsset/ResourceImporterOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``YooAsset.ImportFileInfo[]``*fileInfos*资源信息列表``System.Int32``*importerMaxNumber*同时导入的最大文件数``System.Int32``*failedTryAgain*导入失败的重试次数
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class ResourceUnpackerOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class ResourceUnpackerOperation : DownloaderOperation, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class SceneHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class SceneHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### SceneName
|
|||
|
|
|
|||
|
|
|
|||
|
|
场景名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string SceneName { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### SceneObject
|
|||
|
|
|
|||
|
|
|
|||
|
|
场景对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public Scene SceneObject { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ActivateScene()
|
|||
|
|
|
|||
|
|
|
|||
|
|
激活场景(当同时存在多个场景时用于切换激活场景)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool ActivateScene()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### UnSuspend()
|
|||
|
|
|
|||
|
|
|
|||
|
|
解除场景加载挂起操作
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool UnSuspend()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### UnloadAsync()
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步卸载场景对象
|
|||
|
|
注意:场景卸载成功后,会自动释放该handle的引用计数!
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public UnloadSceneOperation UnloadAsync()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.UnloadSceneOperation](/docs/2.3.x/api/YooAsset/UnloadSceneOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
完成委托
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<SceneHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.SceneHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class SubAssetsHandle
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class SubAssetsHandle : HandleBase, IEnumerator, IDisposable
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### SubAssetObjects
|
|||
|
|
|
|||
|
|
|
|||
|
|
子资源对象集合
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public IReadOnlyList<Object> SubAssetObjects { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
等待异步执行完毕
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public void WaitForAsyncComplete()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### GetSubAssetObject<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public TObject GetSubAssetObject<TObject>(string assetName) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``<TObject>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*assetName*子资源对象名称
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``子资源对象类型
|
|||
|
|
|
|||
|
|
### GetSubAssetObjects<TObject>()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取所有的子资源对象集合
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public TObject[] GetSubAssetObjects<TObject>() where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``<TObject>[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``子资源对象类型
|
|||
|
|
|
|||
|
|
## Events
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Completed
|
|||
|
|
|
|||
|
|
|
|||
|
|
完成委托
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public event Action<SubAssetsHandle> Completed
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Event Type
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Action<YooAsset.SubAssetsHandle>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IDisposable``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Delegate UnityWebRequestDelegate
|
|||
|
|
|
|||
|
|
|
|||
|
|
自定义下载器的请求委托
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public delegate UnityWebRequest UnityWebRequestDelegate(string url)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class UnloadAllAssetsOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class UnloadAllAssetsOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class UnloadAllAssetsOptions
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class UnloadAllAssetsOptions
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### ReleaseAllHandles
|
|||
|
|
|
|||
|
|
|
|||
|
|
释放所有资源句柄,防止卸载过程中触发完成回调!
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool ReleaseAllHandles
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### LockLoadOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
卸载过程中锁定加载操作,防止新的任务请求!
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public bool LockLoadOperation
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class UnloadSceneOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
场景卸载异步操作类
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class UnloadSceneOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class UnloadUnusedAssetsOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class UnloadUnusedAssetsOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class UpdatePackageManifestOperation
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public sealed class UpdatePackageManifestOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Implements
|
|||
|
|
|
|||
|
|
- ``System.Collections.IEnumerator``
|
|||
|
|
|
|||
|
|
- ``System.IComparable<YooAsset.AsyncOperationBase>``
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct WebDecryptFileInfo
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct WebDecryptFileInfo
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### BundleName
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public string BundleName
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileLoadCRC
|
|||
|
|
|
|||
|
|
|
|||
|
|
Unity引擎用于内容校验的CRC
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public uint FileLoadCRC
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### FileData
|
|||
|
|
|
|||
|
|
|
|||
|
|
文件字节数据
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public byte[] FileData
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Struct WebDecryptResult
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public struct WebDecryptResult
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Result
|
|||
|
|
|
|||
|
|
|
|||
|
|
资源包对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public AssetBundle Result
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class WebPlayModeParameters
|
|||
|
|
|
|||
|
|
|
|||
|
|
WebGL运行模式的初始化参数
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public class WebPlayModeParameters : InitializeParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Fields
|
|||
|
|
|
|||
|
|
|
|||
|
|
### WebServerFileSystemParameters
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters WebServerFileSystemParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### WebRemoteFileSystemParameters
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public FileSystemParameters WebRemoteFileSystemParameters
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class YooAssets
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class YooAssets
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Initialized
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否已经初始化
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool Initialized { get; }
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### Initialize(ILogger)
|
|||
|
|
|
|||
|
|
|
|||
|
|
初始化资源系统
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void Initialize(ILogger logger = null)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.ILogger](/docs/2.3.x/api/YooAsset/ILogger)*logger*自定义日志处理
|
|||
|
|
|
|||
|
|
### Destroy()
|
|||
|
|
|
|||
|
|
|
|||
|
|
销毁资源系统
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void Destroy()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
### CreatePackage(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源包裹
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourcePackage CreatePackage(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourcePackage](/docs/2.3.x/api/YooAsset/ResourcePackage)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
|
|||
|
|
### GetPackage(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源包裹
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourcePackage GetPackage(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourcePackage](/docs/2.3.x/api/YooAsset/ResourcePackage)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
|
|||
|
|
### TryGetPackage(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
尝试获取资源包裹
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourcePackage TryGetPackage(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourcePackage](/docs/2.3.x/api/YooAsset/ResourcePackage)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
|
|||
|
|
### GetAllPackages()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取所有资源包裹
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static List<ResourcePackage> GetAllPackages()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Collections.Generic.List<YooAsset.ResourcePackage>``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### RemovePackage(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
移除资源包裹
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool RemovePackage(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
|
|||
|
|
### RemovePackage(ResourcePackage)
|
|||
|
|
|
|||
|
|
|
|||
|
|
移除资源包裹
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool RemovePackage(ResourcePackage package)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.ResourcePackage](/docs/2.3.x/api/YooAsset/ResourcePackage)*package*包裹实例对象
|
|||
|
|
|
|||
|
|
### ContainsPackage(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
检测资源包裹是否存在
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool ContainsPackage(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*packageName*包裹名称
|
|||
|
|
|
|||
|
|
### StartOperation(GameAsyncOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
开启一个异步操作
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void StartOperation(GameAsyncOperation operation)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.GameAsyncOperation](/docs/2.3.x/api/YooAsset/GameAsyncOperation)*operation*异步操作对象
|
|||
|
|
|
|||
|
|
### SetDownloadSystemUnityWebRequest(UnityWebRequestDelegate)
|
|||
|
|
|
|||
|
|
|
|||
|
|
设置下载系统参数,自定义下载请求
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void SetDownloadSystemUnityWebRequest(UnityWebRequestDelegate createDelegate)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.UnityWebRequestDelegate](/docs/2.3.x/api/YooAsset/UnityWebRequestDelegate)*createDelegate*
|
|||
|
|
|
|||
|
|
### SetOperationSystemMaxTimeSlice(long)
|
|||
|
|
|
|||
|
|
|
|||
|
|
设置异步系统参数,每帧执行消耗的最大时间切片(单位:毫秒)
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void SetOperationSystemMaxTimeSlice(long milliseconds)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.Int64``*milliseconds*
|
|||
|
|
|
|||
|
|
### SetDefaultPackage(ResourcePackage)
|
|||
|
|
|
|||
|
|
|
|||
|
|
设置默认的资源包
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static void SetDefaultPackage(ResourcePackage package)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.ResourcePackage](/docs/2.3.x/api/YooAsset/ResourcePackage)*package*
|
|||
|
|
|
|||
|
|
### IsNeedDownloadFromRemote(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否需要从远端更新下载
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool IsNeedDownloadFromRemote(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### IsNeedDownloadFromRemote(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
是否需要从远端更新下载
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool IsNeedDownloadFromRemote(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*
|
|||
|
|
|
|||
|
|
### GetAssetInfos(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息列表
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetInfo[] GetAssetInfos(string tag)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``YooAsset.AssetInfo[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*tag*资源标签
|
|||
|
|
|
|||
|
|
### GetAssetInfos(string[])
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息列表
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetInfo[] GetAssetInfos(string[] tags)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``YooAsset.AssetInfo[]``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*tags*资源标签列表
|
|||
|
|
|
|||
|
|
### GetAssetInfo(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetInfo GetAssetInfo(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### GetAssetInfo(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetInfo GetAssetInfo(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*资源类型
|
|||
|
|
|
|||
|
|
### GetAssetInfoByGUID(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetInfo GetAssetInfoByGUID(string assetGUID)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*assetGUID*资源GUID
|
|||
|
|
|
|||
|
|
### GetAssetInfoByGUID(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取资源信息
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetInfo GetAssetInfoByGUID(string assetGUID, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*assetGUID*资源GUID``System.Type``*type*资源类型
|
|||
|
|
|
|||
|
|
### CheckLocationValid(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
检查资源定位地址是否有效
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static bool CheckLocationValid(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.Boolean``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadRawFileSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载原生文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static RawFileHandle LoadRawFileSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RawFileHandle](/docs/2.3.x/api/YooAsset/RawFileHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadRawFileSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载原生文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static RawFileHandle LoadRawFileSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RawFileHandle](/docs/2.3.x/api/YooAsset/RawFileHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadRawFileAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载原生文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static RawFileHandle LoadRawFileAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RawFileHandle](/docs/2.3.x/api/YooAsset/RawFileHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadRawFileAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载原生文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static RawFileHandle LoadRawFileAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.RawFileHandle](/docs/2.3.x/api/YooAsset/RawFileHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadSceneSync(string, LoadSceneMode, LocalPhysicsMode)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载场景
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SceneHandle LoadSceneSync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/2.3.x/api/YooAsset/SceneHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*场景的定位地址``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式
|
|||
|
|
|
|||
|
|
### LoadSceneSync(AssetInfo, LoadSceneMode, LocalPhysicsMode)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载场景
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SceneHandle LoadSceneSync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/2.3.x/api/YooAsset/SceneHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*场景的资源信息``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式
|
|||
|
|
|
|||
|
|
### LoadSceneAsync(string, LoadSceneMode, LocalPhysicsMode, bool, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载场景
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SceneHandle LoadSceneAsync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None, bool suspendLoad = false, uint priority = 100)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/2.3.x/api/YooAsset/SceneHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*场景的定位地址``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式``System.Boolean``*suspendLoad*场景加载到90%自动挂起``System.UInt32``*priority*优先级
|
|||
|
|
|
|||
|
|
### LoadSceneAsync(AssetInfo, LoadSceneMode, LocalPhysicsMode, bool, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载场景
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SceneHandle LoadSceneAsync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None, bool suspendLoad = false, uint priority = 100)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SceneHandle](/docs/2.3.x/api/YooAsset/SceneHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*场景的资源信息``UnityEngine.SceneManagement.LoadSceneMode``*sceneMode*场景加载模式``UnityEngine.SceneManagement.LocalPhysicsMode``*physicsMode*场景物理模式``System.Boolean``*suspendLoad*场景加载到90%自动挂起``System.UInt32``*priority*优先级
|
|||
|
|
|
|||
|
|
### LoadAssetSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetHandle LoadAssetSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadAssetSync<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetHandle LoadAssetSync<TObject>(string location) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAssetSync(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetHandle LoadAssetSync(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*资源类型
|
|||
|
|
|
|||
|
|
### LoadAssetSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetHandle LoadAssetSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadAssetAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetHandle LoadAssetAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadAssetAsync<TObject>(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetHandle LoadAssetAsync<TObject>(string location, uint priority = 0) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAssetAsync(string, Type, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetHandle LoadAssetAsync(string location, Type type, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*资源类型``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadAssetAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AssetHandle LoadAssetAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AssetHandle](/docs/2.3.x/api/YooAsset/AssetHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SubAssetsHandle LoadSubAssetsSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SubAssetsHandle LoadSubAssetsSync<TObject>(string location) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SubAssetsHandle LoadSubAssetsSync(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型
|
|||
|
|
|
|||
|
|
### LoadSubAssetsSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SubAssetsHandle LoadSubAssetsSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SubAssetsHandle LoadSubAssetsAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync<TObject>(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SubAssetsHandle LoadSubAssetsAsync<TObject>(string location, uint priority = 0) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync(string, Type, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SubAssetsHandle LoadSubAssetsAsync(string location, Type type, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadSubAssetsAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载子资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static SubAssetsHandle LoadSubAssetsAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.SubAssetsHandle](/docs/2.3.x/api/YooAsset/SubAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync(AssetInfo)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AllAssetsHandle LoadAllAssetsSync(AssetInfo assetInfo)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync<TObject>(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AllAssetsHandle LoadAllAssetsSync<TObject>(string location) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync(string, Type)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AllAssetsHandle LoadAllAssetsSync(string location, Type type)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型
|
|||
|
|
|
|||
|
|
### LoadAllAssetsSync(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
同步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AllAssetsHandle LoadAllAssetsSync(string location)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync(AssetInfo, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AllAssetsHandle LoadAllAssetsAsync(AssetInfo assetInfo, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync<TObject>(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AllAssetsHandle LoadAllAssetsAsync<TObject>(string location, uint priority = 0) where TObject : Object
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
##### Type Parameters
|
|||
|
|
|
|||
|
|
NameDescription``TObject``资源类型
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync(string, Type, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AllAssetsHandle LoadAllAssetsAsync(string location, Type type, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.Type``*type*子对象类型``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### LoadAllAssetsAsync(string, uint)
|
|||
|
|
|
|||
|
|
|
|||
|
|
异步加载资源包内所有资源对象
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static AllAssetsHandle LoadAllAssetsAsync(string location, uint priority = 0)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.AllAssetsHandle](/docs/2.3.x/api/YooAsset/AllAssetsHandle)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源的定位地址``System.UInt32``*priority*
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载当前资源版本所有的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceDownloaderOperation CreateResourceDownloader(int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(string, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源标签关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*tag*资源标签``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceDownloader(string[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源标签列表关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*tags*资源标签列表``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(string, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceDownloaderOperation CreateBundleDownloader(string location, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*location*资源定位地址``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(string[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源列表依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceDownloaderOperation CreateBundleDownloader(string[] locations, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*locations*资源定位地址列表``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(AssetInfo, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceDownloaderOperation CreateBundleDownloader(AssetInfo assetInfo, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription[YooAsset.AssetInfo](/docs/2.3.x/api/YooAsset/AssetInfo)*assetInfo*资源信息``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateBundleDownloader(AssetInfo[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源下载器,用于下载指定的资源列表依赖的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceDownloaderOperation CreateBundleDownloader(AssetInfo[] assetInfos, int downloadingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceDownloaderOperation](/docs/2.3.x/api/YooAsset/ResourceDownloaderOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``YooAsset.AssetInfo[]``*assetInfos*资源信息列表``System.Int32``*downloadingMaxNumber*同时下载的最大文件数``System.Int32``*failedTryAgain*下载失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceUnpacker(int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建内置资源解压器,用于解压当前资源版本所有的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceUnpackerOperation CreateResourceUnpacker(int unpackingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceUnpackerOperation](/docs/2.3.x/api/YooAsset/ResourceUnpackerOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.Int32``*unpackingMaxNumber*同时解压的最大文件数``System.Int32``*failedTryAgain*解压失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceUnpacker(string, int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建内置资源解压器,用于解压指定的资源标签关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceUnpackerOperation CreateResourceUnpacker(string tag, int unpackingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceUnpackerOperation](/docs/2.3.x/api/YooAsset/ResourceUnpackerOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String``*tag*资源标签``System.Int32``*unpackingMaxNumber*同时解压的最大文件数``System.Int32``*failedTryAgain*解压失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceUnpacker(string[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建内置资源解压器,用于解压指定的资源标签列表关联的资源包文件
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceUnpackerOperation CreateResourceUnpacker(string[] tags, int unpackingMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceUnpackerOperation](/docs/2.3.x/api/YooAsset/ResourceUnpackerOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*tags*资源标签列表``System.Int32``*unpackingMaxNumber*同时解压的最大文件数``System.Int32``*failedTryAgain*解压失败的重试次数
|
|||
|
|
|
|||
|
|
### CreateResourceImporter(string[], int, int)
|
|||
|
|
|
|||
|
|
|
|||
|
|
创建资源导入器
|
|||
|
|
注意:资源文件名称必须和资源服务器部署的文件名称一致!
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static ResourceImporterOperation CreateResourceImporter(string[] filePaths, int importerMaxNumber, int failedTryAgain)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
[YooAsset.ResourceImporterOperation](/docs/2.3.x/api/YooAsset/ResourceImporterOperation)
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeNameDescription``System.String[]``*filePaths*资源路径列表``System.Int32``*importerMaxNumber*同时导入的最大文件数``System.Int32``*failedTryAgain*导入失败的重试次数
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# Class YooAssetSettingsData
|
|||
|
|
|
|||
|
|
|
|||
|
|
###### **Assembly**: YooAsset.dll
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static class YooAssetSettingsData
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Methods
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetDefaultYooFolderName()
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取YooAsset文件夹名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetDefaultYooFolderName()
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
### GetBuildReportFileName(string, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取构建报告文件名
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetBuildReportFileName(string packageName, string packageVersion)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*packageName*``System.String``*packageVersion*
|
|||
|
|
|
|||
|
|
### GetManifestBinaryFileName(string, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取清单文件完整名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetManifestBinaryFileName(string packageName, string packageVersion)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*packageName*``System.String``*packageVersion*
|
|||
|
|
|
|||
|
|
### GetManifestJsonFileName(string, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取清单文件完整名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetManifestJsonFileName(string packageName, string packageVersion)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*packageName*``System.String``*packageVersion*
|
|||
|
|
|
|||
|
|
### GetPackageHashFileName(string, string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取包裹的哈希文件完整名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetPackageHashFileName(string packageName, string packageVersion)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*packageName*``System.String``*packageVersion*
|
|||
|
|
|
|||
|
|
### GetPackageVersionFileName(string)
|
|||
|
|
|
|||
|
|
|
|||
|
|
获取包裹的版本文件完整名称
|
|||
|
|
|
|||
|
|
Declaration
|
|||
|
|
```csharp
|
|||
|
|
public static string GetPackageVersionFileName(string packageName)
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
##### Returns
|
|||
|
|
|
|||
|
|
|
|||
|
|
``System.String``
|
|||
|
|
|
|||
|
|
|
|||
|
|
##### Parameters
|
|||
|
|
|
|||
|
|
TypeName``System.String``*packageName*
|