问题如题,当勾选文件夹作为Addressable资源时,文件夹下的资源路径少了一个/ 号
image.png image.png升级到新版本1.21.9
如果packagemanager没有显示新版本,按如下操作
package/manifest.json 增加
"com.unity.addressables": "1.21.9",
package/packages-locak.json
"com.unity.addressables": {
"version": "1.21.9",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.scriptablebuildpipeline": "1.21.3",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0"
},
"url": "https://packages.unity.com"
},
或者按下面的方法修改源码
将com.unity.addressables@1.19.19文件夹自Library\PackageCache移动到Packages目录下,以便修改源码
image.png
打开com.unity.addressables@1.19.19/Editor/Settings/AddressableAssetEntry.cs ,
修改712行
//assetEntry = settings.CreateSubEntryIfUnique(subAssetGuid, address + relativePath, this);
assetEntry = settings.CreateSubEntryIfUnique(subAssetGuid, address + "/" + relativePath, this);
加上这个"/"即可
image.png
网友评论