Multi-Instance Isolation
Quest 3D WebView is built from the ground up to support multiple concurrent web screens running simultaneously in the same 3D VR environment.
How Multi-Instance Isolation Works
When multiple BP_WebScreen actors are placed in a level or spawned dynamically at runtime:
- On
BeginPlay, each component receives an unconditionally incremented, unique runtimeInstanceId(NextInstanceId++). - In the Android layer, each
InstanceIdcreates its own dedicated:- Android
VirtualDisplayinstance ImageReaderswapchain- Chromium
WebViewcontainer - Dedicated render update handler thread
- Android
Unreal Engine 5 VR Level
┌───────────────────────┬───────────────────────┬───────────────────────┐
│ Screen 1: ChatGPT │ Screen 2: YouTube │ Screen 3: Trello │
│ Instance ID = 1 │ Instance ID = 2 │ Instance ID = 3 │
└───────────┬───────────┴───────────┬───────────┴───────────┬───────────┘
│ │ │
▼ ▼ ▼
VirtualDisplay #1 VirtualDisplay #2 VirtualDisplay #3
(TargetFPS = 30) (TargetFPS = 60) (TargetFPS = 30)Naming & Identifying Instances
To make it easy to build UI docks, switchers, and dropdowns:
InstanceName(Property): Set a descriptive label in the Details Panel (e.g."Primary YouTube","ChatGPT Workspace").SetInstanceName(InName)/GetInstanceName()(Nodes): Dynamically read or update labels from Blueprint.GetInstanceId()(Node): Returns the numeric internal instance identifier.
Recommended Multi-Instance Best Practices
To maintain a rock-solid 72+ FPS on Meta Quest when running 3 to 6 active screens:
- Stagger Video Framerates:
- Keep your primary video screen at
TargetFPS = 60.0. - Set secondary static screens (ChatGPT, Trello, Discord) to
TargetFPS = 30.0.
- Keep your primary video screen at
- Use 720p on Secondary Panels:
- Set secondary panels to
Width = 1280, Height = 720to reduce GPU texture memory overhead by 55%.
- Set secondary panels to
- Pause Out-of-Sight Panels:
- Call
PauseRendering()on screens that are positioned behind the player's field of view.
- Call