Hello. I am unable to use local hosting in most cases due to a bug. I only recently come across this due to clearing the runtime cache (seems the requested assets were cached from previous runs/testing).
Unity: 2019.4.15f1
Addressables: 1.17.4 and 1.16.15
In short, if you’re using the base HttpHostingService to emulated packed mode testing the function:
protected virtual string FindFileInContentRoots(string relativePath)
{
foreach (var root in HostingServiceContentRoots)
{
var fullPath = Path.Combine(root, relativePath);
if (File.Exists(fullPath))
return fullPath;
}
return null;
}
Will produce a result like:
Library/com.unity.addressables/aa/OSX/StandaloneOSX/StandaloneOSX/packedassets_assets_assets/test_2831b27ffeb73642e5a7a206f38f8a4b.bundle
Where the root of server data is duplicated in the final local path.
Root Path: Library/com.unity.addressables/aa/OSX/StandaloneOSX
Relative Path: StandaloneOSX/packedassets_assets_assets/test_2831b27ffeb73642e5a7a206f38f8a4b.bundle
For now I’ve worked around this by creating my own hosting service and overriding the
FindFileInContentRoots method.