Update document

pull/17/head
hevinci 2022-06-25 11:41:13 +08:00
parent 009fa88402
commit d452c610c1
7 changed files with 44 additions and 11 deletions

View File

@ -114,7 +114,8 @@ private static void BuildInternal(BuildTarget buildTarget)
buildParameters.BuildinTags = "buildin"; buildParameters.BuildinTags = "buildin";
buildParameters.VerifyBuildingResult = true; buildParameters.VerifyBuildingResult = true;
buildParameters.EnableAddressable = false; buildParameters.EnableAddressable = false;
buildParameters.AppendFileExtension = false; buildParameters.AppendFileExtension = false;
buildParameters.CopyBuildinTagFiles = true;
buildParameters.EncryptionServices = new GameEncryption(); buildParameters.EncryptionServices = new GameEncryption();
buildParameters.CompressOption = ECompressOption.LZ4; buildParameters.CompressOption = ECompressOption.LZ4;

View File

@ -24,6 +24,25 @@
#### 资源分组 #### 资源分组
- Active Rule
激活规则,规则可以自定义扩展。下面是内置规则:
- EnableGroup 启用分组。
- DisableGroup 禁用分组。
````c#
//自定义扩展范例
public class DisableGroup : IActiveRule
{
public bool IsActiveGroup()
{
return false;
}
}
````
- Grouper Name - Grouper Name
分组名称 分组名称
@ -63,6 +82,7 @@
- AddressByCollectorAndFileName 以收集器名+文件名为定位地址。 - AddressByCollectorAndFileName 以收集器名+文件名为定位地址。
````c# ````c#
//自定义扩展范例
public class AddressByFileName : IAddressRule public class AddressByFileName : IAddressRule
{ {
string IAddressRule.GetAssetAddress(AddressRuleData data) string IAddressRule.GetAssetAddress(AddressRuleData data)

View File

@ -1,11 +1,15 @@
# 调试器 # 调试器
调试器是在游戏运行时,帮助我们查看资源包加载信息的工具。可以查看资源对象列表信息AssetView资源包列表信息BundleView 调试器是在游戏运行时,帮助我们查看资源包加载信息的工具,通过该工具可以发现潜在的资源泄漏
未来计划支持在编辑器下通过远程调试真机信息 可以查看资源对象列表信息AssetView资源包列表信息BundleView
**注意**该工具仅支持Unity2019+ **注意**该工具仅支持Unity2019+
### 真机远程调试注意事项
在构建安装包的时候需要勾选上Development Build和Autoconnect Profiler
### 资源对象列表视图 ### 资源对象列表视图
![image](https://github.com/tuyoogame/YooAsset/raw/main/Docs/Image/AssetDebugger-img1.png) ![image](https://github.com/tuyoogame/YooAsset/raw/main/Docs/Image/AssetDebugger-img1.png)

View File

@ -59,6 +59,8 @@ private IEnumerator InitializeYooAsset()
- FallbackHostServer : 备用的资源服务器IP地址。 - FallbackHostServer : 备用的资源服务器IP地址。
- VerifyLevel : 下载文件校验等级
````c# ````c#
private IEnumerator InitializeYooAsset() private IEnumerator InitializeYooAsset()
{ {
@ -68,6 +70,7 @@ private IEnumerator InitializeYooAsset()
createParameters.ClearCacheWhenDirty = false; createParameters.ClearCacheWhenDirty = false;
createParameters.DefaultHostServer = "http://127.0.0.1/CDN1/Android"; createParameters.DefaultHostServer = "http://127.0.0.1/CDN1/Android";
createParameters.FallbackHostServer = "http://127.0.0.1/CDN2/Android"; createParameters.FallbackHostServer = "http://127.0.0.1/CDN2/Android";
createParameters.VerifyLevel = EVerifyLevel.High;
yield return YooAssets.InitializeAsync(createParameters); yield return YooAssets.InitializeAsync(createParameters);
} }
```` ````

View File

@ -86,9 +86,10 @@ IEnumerator Download()
long totalDownloadBytes = downloader.TotalDownloadBytes; long totalDownloadBytes = downloader.TotalDownloadBytes;
//注册回调方法 //注册回调方法
downloader.OnDownloadFileFailedCallback = OneDownloadFileFailed; downloader.OnDownloadErrorCallback = OnDownloadErrorFunction;
downloader.OnDownloadProgressCallback = OnDownloadProgressUpdate; downloader.OnDownloadProgressCallback = OnDownloadProgressUpdateFunction;
downloader.OnDownloadOverCallback = OnDownloadOver; downloader.OnDownloadOverCallback = OnDownloadOverFunction;
downloader.OnStartDownloadFileCallback = OnStartDownloadFileFunction;
//开启下载 //开启下载
downloader.BeginDownload(); downloader.BeginDownload();

View File

@ -3,17 +3,21 @@
加载方法: 加载方法:
- YooAssets.LoadAssetSync() 同步加载资源对象 - YooAssets.LoadAssetSync() 同步加载资源对象
- YooAssets.LoadSubAssetsSync() 同步加载子资源对象
- YooAssets.LoadAssetAsync() 异步加载资源对象 - YooAssets.LoadAssetAsync() 异步加载资源对象
- YooAssets.LoadSubAssetsSync() 同步加载子资源对象
- YooAssets.LoadSubAssetsAsync() 异步加载子资源对象 - YooAssets.LoadSubAssetsAsync() 异步加载子资源对象
- YooAssets.LoadSceneAsync() 异步加载场景 - YooAssets.LoadSceneAsync() 异步加载场景
- YooAssets.GetRawFileAsync() 异步获取原生文件 - YooAssets.GetRawFileAsync() 异步获取原生文件
统一约定location为资源的定位地址也是加载资源对象的唯一标识符。 **统一约定**
DefaultLocationServices 默认资源定位服务location代表的是资源对象的相对路径。 location为资源的定位地址也是加载资源对象的唯一标识符。
- DefaultLocationServices 默认资源定位服务location代表的是资源对象的相对路径。
- AddressLocationServices 可寻址资源定位服务location代表的是资源对象可寻址地址。
AddressLocationServices 可寻址资源定位服务location代表的是资源对象可寻址地址。
**注意**以下范例执行环境是在DefaultLocationServices下。 **注意**以下范例执行环境是在DefaultLocationServices下。

View File

@ -48,7 +48,7 @@
## 入门教程 ## 入门教程
1. [快速开始](https://github.com/tuyoogame/YooAsset/blob/master/Docs/QuickStart.md) 1. [快速开始](https://github.com/tuyoogame/YooAsset/blob/master/Docs/QuickStart.md)
2. [全局配置](https://github.com/tuyoogame/YooAsset/blob/master/Docs/Settings.md) 2. [全局配置](https://github.com/tuyoogame/YooAsset/blob/master/Docs/Settings.md)
3. [资源配置](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetGrouper.md) 3. [资源配置](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetCollector.md)
4. [资源打包](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetBuilder.md) 4. [资源打包](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetBuilder.md)
5. [资源部署](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetDeploy.md) 5. [资源部署](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetDeploy.md)
5. [构建报告](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetReporter.md) 5. [构建报告](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetReporter.md)