To speed up my unity webgl initial load time, I’m attempting to make some of my scenes addressable to load later. Below is the code I used for one of the scenes:
AsyncOperationHandle<SceneInstance> loadHandle;
private void LoadWords()
{
loadHandle = Addressables.LoadSceneAsync("wordsLabel", LoadSceneMode.Single);
}
void OnDestroy()
{
Addressables.UnloadSceneAsync(loadHandle);
}
I put the scene in a group and gave that group a label of “wordsLabel”.
When I run it on unity’s editor, it all works fine, but when I build it to a webgl (using clean build) and then upload to my server and run it, it shows this error when I click the button that triggers the function “LoadWords”:
HBAMBuild.framework.js.gz:10 RemoteProviderException : Unable to load asset bundle from : [url to my addressable bundle named words_scenes_all_57bce6880117c37ce9125333b1ab0c4a.bundle]
UnityWebRequest result : ProtocolError : HTTP/1.1 404 Not Found
ResponseCode : 404, Method : GET
url : [url to my addressable bundle named words_scenes_all_57bce6880117c37ce9125333b1ab0c4a.bundle]
The parts in bracketts were the url to my addressables which I verified are in my webgl in streamingAssets->aa->addressablesLink ->WebGL
Any idea what I’m missing?