Parsing a scene into Subscenes at runtime / runtime subscene creation?

My understanding is that a subscene requires a scene asset to be assigned to it. Is it possible to use SceneManager.CreateScene() and create an asset of that scene using AssetDatabase.CreateAsset(), add the subscene component to a GameObject prefab, Instantiate it, and assign the new scene asset as that subscenes scene asset at runtime? I want to know if it’s possible to use this for either procedural generation or parsing of a large existing scene from a larger project into subscenes. Any feedback/ advice would be appreciated.

AssetDatabase lies in UnityEditor, you can’t use it at runtime :slight_smile: