The Title probably is enough, but here is some description:
I built the bundles and put it on my server. Set the Play Mode Script to explicitly use the Build. Set the profile to production that uses the remote loading. As you can see the Skin1 Group is set to RemoteLoadPath as-well, but yet the assets are loaded in the editor even if I disable my internet connection.
I encountered weird behavior like this earlier this year when I started to take a first look at Addressables. But now as I need to use it for production, this keeps giving me headaches.
I don’t understand what is going on…
PS: I don’t quite understand the package in a broader sense I guess.
So if you’ve entered playmode with an internet connection active then Addressables has pulled your bundle and cached it. After a bundle is cached it will use the cached version every time (internet connect or not) and will only re-download the bundle if it’s detected that there’s an update to the bundle currently in the cache.
A couple of things you can use to test this:
use Caching.ClearCache to clear the Asset Bundle cache before/after loading. Note: if an Asset Bundle is still in use when this is called the cache will not be cleared. You can use the return bool of this function to check if the cache was cleared or not.
on the Bundled Asset Schema attached to your group, uncheck Use AssetBundle Cache under Advanced Options, and re-build.
Thanks for the reply! AssetBundle Cache was disabled at all time in all groups when I tested it. Is this behavior still normal? I guess it’s not what you’d expect, but maybe this is just the way it is right now.
There actually is a bug we have to look into where sometimes the AssetBundle cache is getting used even when the system is told not to use it so you may be hitting that.
@davidla_unity what I’ve noticed while trying to load a scene via built addressables in the editor, is that if it can’t find the remote addressables, it will just fallback to loading the scene with editor methods.
In SceneProvider.cs the Execute() function will just decide not to use loading from a bundle if it couldn’t find the remote resource, then in InternalLoad it will just use UnityEditor.SceneManagement.EditorSceneManager.LoadSceneAsyncInPlayMode(path, new LoadSceneParameters() { loadSceneMode = mode });
This is not what I expected. If I have the “Use Existing Build (requires built groups)” option selected in Editor, then I’m trying to get it to behave like a real standalone build, but it’s not.
I’m not sure if assets besides scenes do this yet, I haven’t tried.