Scene loading
Keep Loom alive across Unity scenes and drive scene-specific UI from gameplay code.
The LoomUI component owns one UI session that continues across scene loads,
so the page does not need to reload or reconnect every time the game changes
scenes.
Startup scene
Add LoomUI to a startup scene:
Tools > Loom > Setup UI in Current Scene
When Play starts, Loom creates the view and starts the UI session. Keep this startup path stable so every game flow initializes Loom once.
Per-scene drivers
Scene-specific GameObjects can drive bridge state when their scene loads:
public sealed class CombatUiDriver : MonoBehaviour
{
private void Start()
{
UIBridge.Instance.CurrentScreen = GameScreen.Hud;
}
}
This keeps UI ownership clear:
- Loom owns the cross-scene UI session.
- Scenes own their gameplay objects.
- Per-scene drivers update bridge state for that scene.
Returning to menus
When loading a menu scene, set screen state the same way:
UIBridge.Instance.CurrentScreen = GameScreen.MainMenu;
Avoid destroying the Loom UI object just to change UI screens. Use bridge state and Solid rendering instead.
Loading progress
For loading screens, expose progress as bridge state:
public float LoadingProgress { get; set; }
public GameScreen CurrentScreen { get; set; } = GameScreen.Loading;
Update it while your scene load runs. The UI can render progress immediately without needing a separate Unity UI loading layer.