diff --git a/Docs/AssetDeploy.md b/Docs/AssetDeploy.md index 8a6fbe2..96f53ce 100644 --- a/Docs/AssetDeploy.md +++ b/Docs/AssetDeploy.md @@ -14,5 +14,9 @@ CDN ├─v1.0 ├─v1.1 └─v2.0 +└─iphone + ├─v1.0 + ├─v1.1 + └─v2.0 ```` diff --git a/Docs/CodeTutorial1.md b/Docs/CodeTutorial1.md index 39ee923..e2f91a6 100644 --- a/Docs/CodeTutorial1.md +++ b/Docs/CodeTutorial1.md @@ -17,7 +17,7 @@ YooAssets.InitializeAsync(CreateParameters parameters); private IEnumerator InitializeYooAsset() { var createParameters = new YooAssets.EditorPlayModeParameters(); - createParameters.LocationRoot = "Assets/GameRes"; + createParameters.LocationServices = new DefaultLocationServices("Assets/GameRes"); yield return YooAssets.InitializeAsync(createParameters); } ```` @@ -32,7 +32,7 @@ private IEnumerator InitializeYooAsset() private IEnumerator InitializeYooAsset() { var createParameters = new YooAssets.OfflinePlayModeParameters(); - createParameters.LocationRoot = "Assets/GameRes"; + createParameters.LocationServices = new DefaultLocationServices("Assets/GameRes"); yield return YooAssets.InitializeAsync(createParameters); } ```` @@ -43,7 +43,10 @@ private IEnumerator InitializeYooAsset() 注意:该模式需要构建资源包 -- LocationRoot : 资源定位的根路径,所有通过代码加载的资源文件都需要放在资源定位的根路径下。 +- LocationServices : 资源定位的实例类。 + 1. 默认的资源定位服务类(DefaultLocationServices) + 2. 可寻址的资源定位服务类(AdressLocationServices) + 3. 开发者自定义的资源定位服务类,需要提供实现ILocationServices接口的实例类。 - DecryptionServices : 如果资源包在构建的时候有加密,需要提供实现IDecryptionServices接口的实例类。 - ClearCacheWhenDirty : 安装包在覆盖安装的时候,是否清空沙盒缓存文件夹。 - DefaultHostServer : 默认的资源服务器IP地址。 @@ -53,7 +56,7 @@ private IEnumerator InitializeYooAsset() private IEnumerator InitializeYooAsset() { var createParameters = new YooAssets.HostPlayModeParameters(); - createParameters.LocationRoot = "Assets/GameRes"; + createParameters.LocationServices = new DefaultLocationServices("Assets/GameRes"); createParameters.DecryptionServices = null; createParameters.ClearCacheWhenDirty = false; createParameters.DefaultHostServer = "http://127.0.0.1/CDN1/Android"; diff --git a/Docs/CodeTutorial3.md b/Docs/CodeTutorial3.md index 3ff2c38..7fd7874 100644 --- a/Docs/CodeTutorial3.md +++ b/Docs/CodeTutorial3.md @@ -1,7 +1,5 @@ # 资源加载 -在加载资源对象的时候只需要提供相对路径,统一约定该相对路径名称为:location - 加载接口: - YooAssets.LoadAssetSync() 同步加载资源对象接口 @@ -11,6 +9,8 @@ - YooAssets.LoadSceneAsync() 异步加载场景接口 - YooAssets.LoadRawFileAsync() 异步读取原生文件接口 +统一约定:location为资源的定位地址,也是加载资源对象的唯一标识符。 + **加载路径的匹配方式** ````C#