- Home /
Addressables & loading remote Scenes w WebGL
Hi all, I'm trying to work with addressables and I have parsed an ok workflow but am having some trouble: specifically, w WebGL builds & loading remote scenes from a server
I think loading Scenes Additively may be the best option for me to assemble a variety of assets together w dependencies...
Here is my (somewhat working) workflow: a) import addressables package and make new group (I call 'scenes') and drag the scenes I want to load inside- Note that alone makes them addressable - and because it's a scene I don't think I also need to include the prefabs/ models / materials & textures... However, I believe it will help with loading if do this
b) I set up another profile I point to a server I control the permissions on and right click to set as the active profile - & I make sure all my groups point to using the remotes Load and Build - & check the √ build remote catalog button in the Addressableasset settings also
c) in my Starting (almost blank) scene, I have a script to load a remote addressable (below) Code (CSharp): [SerializeField] AssetReference assetReferenceScene;
void OnSomething()
{
assetReferenceScene.LoadSceneAsync(UnityEngine.SceneManagement.LoadSceneMode.Additive);
}
I test it in the Play mode (use asset database)
Then I use the addressables build to build (new build > default) the remote assets to my "Server Data" folder created outside the Assets folder (n my case this is a webGL build, so it creates a webGL folder to hold my bundles .json and hash)
After that builds I upload the (WebGL) folder to the remote server (the same file path as the remote setting I provided (above where WebGL is [build target])) & I change the permissions to be completely open so they can be accessed.
I test it again in addressable Play mode (with use existing build) selected as this will pull the assets remotely
If this works I do a unity build, and upload it to server
BUT to get this to work, I must select ALL the scenes I need in the regular build settings, It does not seem to work without including them (which defeats the purpose of having asset bundles/ addressables)
Is it the WebGL? What am I missing? Thanks in advance! ~b