Persistent UI Across Levels

I’ve been using Flax for a couple weeks now and I’ve been trying to find an effective way of keeping my UI persistent across levels. Coming from Godot I usually have my UI setup as an autoload singleton which loads at the start or the game and remains regardless of what scenes or loaded or unloaded. So I would just hide or show different menus on that as needed.
Now in Flax the UI Canvas is attached to the scene it self. So I’d have to add the my UI to every level. It’s great for in world UIs for general menus and HUDs I’m wondering if there a better way to do this?

I can think of a couple of ways off the top of my head. you could create a prefab of your UI and load it into each level you load. You could create a scene and keep your UI in the scene and just change out the other scenes and keep the scene with your UI in it (basically a persistent scene for your UI using Level.LoadSceneAsync and Level.UnloadSceneAsync but not using Level.UnloadAllScenes),

1 Like

I had considered the prefab option but having the UI on a main scene that loads and unloads the levels is more inline with what I’m looking for. Thank you.