A little update on my tests. I created a simple scene with a bunch of static assets. I saved the base scene as Scene1, then split up the geometry of the rest of the scene into 2 groups and saved each as a prefab. I created 2 new scenes, Scene2, and Scene3 and dropped the respective prefabs with the geometry into each. I made sure none of these scenes were in my build settings. I added these 3 scenes to the addressable assets Default Local Group. I then did Build Player Content.
I created a scene called MapLoader. Inside this scene is a gameobject with a simple script attached. The script references 3 AssetReferences which allows selection of the 3 scene references. Here is the script (borrowed from a thread on this forum at Scene Don't Load On Packed Mode and on Build (RemotePath) ):
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement;
using UnityEngine.SceneManagement;
public class GameStarter : MonoBehaviour
{
public AssetReference[] ScenesToLoad;
// Use this for initialization
void Start()
{
//AssetToLoad.LoadAsset<scene>().Completed += OnAssetReferenceLoaded;
//Addressables.PreloadDependencies(AssetToLoad, null);
foreach (AssetReference scene in ScenesToLoad)
{
Addressables.LoadScene(scene, LoadSceneMode.Additive).Completed += OnCompleted;
}
}
private void OnCompleted(IAsyncOperation<Scene> obj)
{
Debug.Log("Scene Load Complete");
}
// Update is called once per frame
void Update()
{
}
}
Running the game loads the 3 sub-scenes additively into the composite map with all geometry intact in the appropriate locations. I didn’t have to do any per-asset loading, they were loaded automatically as scene dependencies. None of the prefabs in the scenes were explicitly set to be addressable. Looking into the build folders reveals that the resS files are very small (max 129kb) and the generated asset bundle was just over 9mb (expected given the amount of geometry in the scene).
These results show how to split up a scene into chunks and load them additively. I have not done large scale testing yet or lighting tests. I haven’t added in a loading bar or anything like that yet. I’ll proceed with some large scale tests using a map with >6gb textures next. @karl_jones Hopefully this is able to overcome the 4gb per scene limitation in this thread: Bug: 4GB limit to Textures in standalone build