mirror of https://github.com/tuyoogame/YooAsset
Update document
parent
009fa88402
commit
d452c610c1
|
@ -114,7 +114,8 @@ private static void BuildInternal(BuildTarget buildTarget)
|
|||
buildParameters.BuildinTags = "buildin";
|
||||
buildParameters.VerifyBuildingResult = true;
|
||||
buildParameters.EnableAddressable = false;
|
||||
buildParameters.AppendFileExtension = false;
|
||||
buildParameters.AppendFileExtension = false;
|
||||
buildParameters.CopyBuildinTagFiles = true;
|
||||
buildParameters.EncryptionServices = new GameEncryption();
|
||||
buildParameters.CompressOption = ECompressOption.LZ4;
|
||||
|
||||
|
|
|
@ -24,6 +24,25 @@
|
|||
|
||||
#### 资源分组
|
||||
|
||||
- Active Rule
|
||||
|
||||
激活规则,规则可以自定义扩展。下面是内置规则:
|
||||
|
||||
- EnableGroup 启用分组。
|
||||
|
||||
- DisableGroup 禁用分组。
|
||||
|
||||
````c#
|
||||
//自定义扩展范例
|
||||
public class DisableGroup : IActiveRule
|
||||
{
|
||||
public bool IsActiveGroup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
````
|
||||
|
||||
- Grouper Name
|
||||
|
||||
分组名称
|
||||
|
@ -63,6 +82,7 @@
|
|||
- AddressByCollectorAndFileName 以收集器名+文件名为定位地址。
|
||||
|
||||
````c#
|
||||
//自定义扩展范例
|
||||
public class AddressByFileName : IAddressRule
|
||||
{
|
||||
string IAddressRule.GetAssetAddress(AddressRuleData data)
|
|
@ -1,11 +1,15 @@
|
|||
# 调试器
|
||||
|
||||
调试器是在游戏运行时,帮助我们查看资源包加载信息的工具。可以查看资源对象列表信息(AssetView),资源包列表信息(BundleView)。
|
||||
调试器是在游戏运行时,帮助我们查看资源包加载信息的工具,通过该工具可以发现潜在的资源泄漏。
|
||||
|
||||
未来计划支持在编辑器下通过远程调试真机信息。
|
||||
可以查看资源对象列表信息(AssetView),资源包列表信息(BundleView)。
|
||||
|
||||
**注意**:该工具仅支持Unity2019+
|
||||
|
||||
### 真机远程调试注意事项
|
||||
|
||||
在构建安装包的时候,需要勾选上Development Build和Autoconnect Profiler
|
||||
|
||||
### 资源对象列表视图
|
||||
|
||||
![image](https://github.com/tuyoogame/YooAsset/raw/main/Docs/Image/AssetDebugger-img1.png)
|
||||
|
|
|
@ -59,6 +59,8 @@ private IEnumerator InitializeYooAsset()
|
|||
|
||||
- FallbackHostServer : 备用的资源服务器IP地址。
|
||||
|
||||
- VerifyLevel : 下载文件校验等级
|
||||
|
||||
````c#
|
||||
private IEnumerator InitializeYooAsset()
|
||||
{
|
||||
|
@ -68,6 +70,7 @@ private IEnumerator InitializeYooAsset()
|
|||
createParameters.ClearCacheWhenDirty = false;
|
||||
createParameters.DefaultHostServer = "http://127.0.0.1/CDN1/Android";
|
||||
createParameters.FallbackHostServer = "http://127.0.0.1/CDN2/Android";
|
||||
createParameters.VerifyLevel = EVerifyLevel.High;
|
||||
yield return YooAssets.InitializeAsync(createParameters);
|
||||
}
|
||||
````
|
||||
|
|
|
@ -86,9 +86,10 @@ IEnumerator Download()
|
|||
long totalDownloadBytes = downloader.TotalDownloadBytes;
|
||||
|
||||
//注册回调方法
|
||||
downloader.OnDownloadFileFailedCallback = OneDownloadFileFailed;
|
||||
downloader.OnDownloadProgressCallback = OnDownloadProgressUpdate;
|
||||
downloader.OnDownloadOverCallback = OnDownloadOver;
|
||||
downloader.OnDownloadErrorCallback = OnDownloadErrorFunction;
|
||||
downloader.OnDownloadProgressCallback = OnDownloadProgressUpdateFunction;
|
||||
downloader.OnDownloadOverCallback = OnDownloadOverFunction;
|
||||
downloader.OnStartDownloadFileCallback = OnStartDownloadFileFunction;
|
||||
|
||||
//开启下载
|
||||
downloader.BeginDownload();
|
||||
|
|
|
@ -3,17 +3,21 @@
|
|||
加载方法:
|
||||
|
||||
- YooAssets.LoadAssetSync() 同步加载资源对象
|
||||
- YooAssets.LoadSubAssetsSync() 同步加载子资源对象
|
||||
- YooAssets.LoadAssetAsync() 异步加载资源对象
|
||||
- YooAssets.LoadSubAssetsSync() 同步加载子资源对象
|
||||
- YooAssets.LoadSubAssetsAsync() 异步加载子资源对象
|
||||
- YooAssets.LoadSceneAsync() 异步加载场景
|
||||
- YooAssets.GetRawFileAsync() 异步获取原生文件
|
||||
|
||||
统一约定:location为资源的定位地址,也是加载资源对象的唯一标识符。
|
||||
**统一约定**
|
||||
|
||||
DefaultLocationServices 默认资源定位服务,location代表的是资源对象的相对路径。
|
||||
location为资源的定位地址,也是加载资源对象的唯一标识符。
|
||||
|
||||
- DefaultLocationServices 默认资源定位服务,location代表的是资源对象的相对路径。
|
||||
|
||||
|
||||
- AddressLocationServices 可寻址资源定位服务,location代表的是资源对象可寻址地址。
|
||||
|
||||
AddressLocationServices 可寻址资源定位服务,location代表的是资源对象可寻址地址。
|
||||
|
||||
**注意**:以下范例执行环境是在DefaultLocationServices下。
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
## 入门教程
|
||||
1. [快速开始](https://github.com/tuyoogame/YooAsset/blob/master/Docs/QuickStart.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)
|
||||
5. [资源部署](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetDeploy.md)
|
||||
5. [构建报告](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetReporter.md)
|
||||
|
|
Loading…
Reference in New Issue