// AddressableAssetSettingsLocator.cs
string GetInternalIdFromFolderEntry(string keyStr, AddressableAssetEntry entry)
{
var entryPath = entry.AssetPath;
var a = keyStr.Replace(entry.address, entryPath);
var b = "Config/DebugConfigData.asset".Replace("Config", "Assets/AddressablesResources/Config");
// log true
Debug.Log(b == "Assets/AddressablesResources/Config/DebugAssets/AddressablesResources/ConfigData.asset");
environment:
Unity2020.2.0f1, Addressables1.16.10
My asset “DebugConfigData.asset” is contained in directory “Config”, and I make directory “Config” addressable, so the full address of asset “DebugConfigData.asset” is “Config/DebugConfigData.asset”.
keyStr = “Config/DebugConfigData.asset”
entry.address = “Config”
entryPath = “Assets/AddressablesResources/Config”
so the result of keyStr.Replace(entry.address, entryPath) is “Assets/AddressablesResources/Config/DebugAssets/AddressablesResources/ConfigData.asset”.
Incredible! It’s impossible to make key right!