v1.0 · Unity 6000.0+

Astra Web Platform

Embed real web pages in Unity — a managed browser runtime with platform-native adapters (WebGL iframe, Windows WebView2, and scaffolded WKWebView / Android WebView / WebKitGTK), a JavaScript bridge, a security policy layer, profiles, and diagnostics. Add a component, set a URL, press Play.

Unity 6000.0+ No-code component WebGL + Windows validated Bridge · Policy · Profiles
ⓘ
Two ways to drive it. Add the Astra Web View component and configure it entirely in the Inspector (no scripting), or call the managed runtime API (AstraWebRuntime, BrowserManager, BrowserEngineRegistry) from code. The two paths coexist — the no-code auto-open defers to code when you drive the component yourself.
✅
Validated where it can be. The WebGL iframe adapter and the Windows WebView2 adapter are independently verified to render a real live page (example.com) in a player build. macOS/iOS/Linux/Android adapters ship as build-ready scaffolding and are validated on their own hardware. See Engines & Platforms.

⤓ Installation

Import once, open the Welcome window, add a component.

Import from the Asset Store
In Window → Package Manager → My Assets, download and import Astra Web Platform. It lands at Assets/AstraWebPlatform/.
The Welcome window opens automatically
On first import the Welcome / Help window appears with big buttons to open the docs, the demo scene, and create your first web view. Re-open it any time from Tools → Astra Web Platform → Welcome.
Add a web view
GameObject → Astra Web Platform → Astra Web View (or Add Component → Astra Web Platform → Astra Web View).
Set a URL and press Play
In a player build the platform-native engine renders the page; in the Editor the Mock engine is used (expected). For Windows, the WebView2 Evergreen runtime must be installed.

Requirements

What gets installed

Assets/AstraWebPlatform/
  Runtime/        // Browser manager, engines, native adapters, bridge, policy,
                  //   profiles, diagnostics, automation, the Astra Web View component
  Editor/         // Welcome window, custom inspectors, scaffolding menu, Setup,
                  //   Diagnostics, project validation
  Welcome/        // interactive Getting Started scene (built in code at runtime)
  Plugins/        // WebGL .jslib, Windows WebView2 DLL, iOS/Android sources
  Demo/           // a guided, fully interactive showcase scene
  Documentation/  // You are here
  Tests/          // EditMode + PlayMode (run headless via Unity -runTests)Project
ⓘ
Additive, no lock-in. The no-code component wraps the same runtime the code API uses. Remove the component and your scene is unchanged; nothing is rewritten on disk.

⚡ Quick Start (No Code)

A real web page in your scene without writing a line of code.

Create the web view
GameObject → Astra Web Platform → Astra Web View. A sample-populated object drops into the scene (URL https://example.com/, Engine Automatic, Open On Start).
Set the URL & engine in the Inspector
Type your URL. Leave Engine on Automatic to use the best engine for the platform, or pick a specific one. The inspector shows whether that engine is available in the current build target.
(Optional) Assign a Settings asset
For a custom security policy/size, create Assets → Create → Astra Web Platform → Settings and drag it into the Settings Asset slot. Without one, a sensible default policy that allows your typed URL is used.
Press Play
The page opens through the resolved engine. In a Windows player it renders via WebView2; in a WebGL build via the iframe adapter; in the Editor the Mock engine runs (no visible page, but the full pipeline executes).
💡
Driving it from code? Call SuppressAutoOpen() (or set Open On Start off) so the no-code auto-open does not run on top of your own OpenAsync() call. See Scripting API.

⚙ How It Works

From a URL in the Inspector to a rendered page in one build pass.

Inspector fields → Engine factory → Policy check → BrowserManager → Native adapter → Live page
  1. The Astra Web View component reads its serialized fields (URL, engine, size, policy/profile assets).
  2. AstraBrowserEngineFactory resolves the engine selection to a concrete IBrowserEngine (falling back to Mock when the requested engine is not available in the current build).
  3. The DefaultPolicyEvaluator checks the create + navigation against the BrowserPolicy (origins, bridge channels/types, payload size).
  4. BrowserManager.CreateAsync creates the browser, initializes it, and navigates to the URL.
  5. The platform native adapter (WebView2 / WebGL iframe / WKWebView / …) renders the page; the managed IBrowserInstance exposes navigate / evaluate / dispose.
ⓘ
Same path, two entry points. The component calls exactly the runtime types you would use from code — the no-code layer adds Inspector wiring and a factory, nothing more.

🌐 Astra Web View Component

The single no-code component — every field is in the Inspector with a tooltip.

FieldWhat it does
URLThe page to open. Allowed by the assigned Settings policy, or (with no Settings) a default that permits this exact URL plus local development.
EngineDropdown: Automatic, Mock, Windows WebView2, WebGL Iframe, Apple WebKit, Android WebView, Linux WebKitGTK, CEF Chromium. Automatic picks the best available engine per build.
Settings AssetOptional. Supplies the security policy and default size. Assets → Create → Astra Web Platform → Settings.
Profile AssetOptional. Supplies the profile id for cookie/storage isolation.
Width / HeightUsed only when no Settings asset is assigned.
Rendering ModeDocumentProxy (WebGL iframe), NativeOverlay (WebView2/WKWebView/Android), or as the engine requires.
Open On StartNo-code auto-open on Start. Skipped automatically when you drive the component from code.
Runtime Status OverlayOptional small on-screen status label while learning.
ⓘ
Live engine summary. As you change the Engine dropdown, the Inspector shows the resolved engine id and whether it is available in the current build target, so there are no surprises at Play time.

🧩 Engines & Platforms

One enum, one factory, the right engine per platform.

SelectionEngine idStatus
Automaticbest availablePicks the platform-native engine, falls back to Mock
Mockastra.mockAlways available (in-memory; renders nothing real)
WebGL Iframeastra.webgl-iframeValidated — renders a real cross-origin page in a WebGL build
Windows WebView2astra.webview2Validated — renders + reads back a real page in a Windows player
Apple WebKitastra.webkitScaffolded (macOS/iOS/visionOS) — validate on Apple hardware
Android WebViewastra.android-webviewScaffolded — validate on a device
Linux WebKitGTKastra.webkitgtkScaffolded — build the .so, validate on Linux
CEF Chromiumastra.cefCapability-gated (requires the ASTRA_CEF define + binary)
✅
Editor uses Mock by design. Real native engines are gated to player builds (!UNITY_EDITOR). In the Editor, Automatic and any native selection resolve to Mock so play-in-editor never throws — the real engine activates in the matching build.

🔧 Editor Tools (No-Code)

Everything a non-coder needs is reachable by clicking — this is a headline capability.

➕ Scaffolding menu

GameObject → Astra Web Platform → Astra Web View drops a ready, sample-populated component into the scene with full Undo.

🖌 Custom inspector

The Astra Web View inspector groups Setup vs Behavior, shows a live engine-availability summary, and has Open / Close / Create-asset buttons.

📁 Asset create menu

Assets → Create → Astra Web Platform → … for Settings, Browser Profile, Auth Provider, Automation Script, and Plugin Manifest.

🔧 Setup & validation

Tools → Astra Web Platform → Setup creates default assets/samples and runs project validation; Diagnostics shows runtime events.

ⓘ
Headless CI entry. The package validates from the command line (Unity -runTests for EditMode/PlayMode, and a project-validation method) so it can be gated in automation.

👋 Welcome & Getting Started

Two friendly front doors that get you productive in a minute.

Welcome window (Editor)

Interactive Welcome scene

A playable, hands-on onboarding scene that walks you through the three steps to your first live web page — and lets you try it on the spot. Open it from the Welcome window's Open the interactive Welcome scene button, or generate it via Tools → Astra Web Platform → Create Welcome Scene (it lands at Assets/AstraWebPlatform/Welcome/Scenes/AstraWebPlatform_Welcome.unity).

💡
Built in code at runtime. The entire scene is constructed from a near-empty scene (Camera + controller), so it carries no serialized asset references and opens cleanly on any machine — and it exercises the same shipping runtime you use in your own project.

📁 Assets & Presets

Configuration lives in ScriptableObjects you can create, share, and version.

AssetPurpose
SettingsSecurity policy (allowed origins, bridge channels/types, payload cap, local-HTTP) + default size. Custom inspector adds presets and JSON export/import.
Browser ProfileProfile id, display name, persistence mode, user agent — for cookie/storage isolation.
Auth ProviderOAuth/OIDC provider configuration for the auth workflows.
Automation ScriptA sequence of browser/bridge commands for the automation runner.
Plugin ManifestDeclares optional native plugin packaging.
💡
Settings presets. The Settings inspector has one-click Allow Local Development and Production (HTTPS only) presets, plus Export/Import JSON — the import analog for an asset that has no tabular/CSV data.

🔗 Bridge & Policy

Talk to the page safely, behind an allow-list policy.

The BridgeBus carries typed request/response and chunked streaming messages between Unity and the page. Every message is evaluated by the DefaultPolicyEvaluator against the BrowserPolicy:

var policy = BrowserPolicy.AllowLocalDevelopment();
policy.AllowedOrigins.Add("https://example.com");
var options = new BrowserCreateOptions { InitialUrl = "https://example.com/", Policy = policy };C#

👤 Profiles

Isolate cookies and storage per profile.

A Browser Profile asset (or a ProfileId in code) keys cookie and storage state. Assign one to the Astra Web View component's Profile Asset slot, or create profiles in code through AstraWebRuntime.Profiles. Persistence modes range from in-memory to file-backed.

📊 Diagnostics & Automation

See what happened, and replay sequences.

📙 Scripting API

The code-first path — unchanged and fully supported.

// No-code component, driven from code (auto-open defers to you):
var view = gameObject.GetComponent<AstraWebViewComponent>();
view.SuppressAutoOpen();
await view.OpenAsync("https://example.com/");

// Or the raw runtime:
var engine = AstraBrowserEngineFactory.ResolveEngine(
    AstraBrowserEngineSelection.Automatic, out var id, out _, out _);
var manager = new BrowserManager(engine, AstraWebRuntime.Diagnostics,
    AstraWebRuntime.Profiles, new DefaultPolicyEvaluator(AstraWebRuntime.Diagnostics));
var browser = await manager.CreateAsync(new BrowserCreateOptions { InitialUrl = "https://example.com/" });
string title = await browser.EvaluateScriptAsync("document.title", default);C#
TypeRole
AstraWebViewComponentNo-code MonoBehaviour: OpenAsync, RebuildAsync, CloseAsync, SuppressAutoOpen, Browser, ResolvedEngineId.
AstraBrowserEngineFactoryResolveEngine / EngineIdFor / IsAvailable for the engine enum.
BrowserManagerCreateAsync, DisposeAsync — lifecycle + policy + profiles.
BrowserEngineRegistryThe full engine catalog and descriptors.
IBrowserInstanceNavigateAsync, EvaluateScriptAsync, LoadHtmlAsync, DisposeAsync.

💡 Troubleshooting

The common bumps and their fixes.

The page does not open / "Navigation origin is not allowed"

The URL's origin is not permitted by the policy. With no Settings asset, the component auto-allows the exact URL you typed; if you assigned a Settings asset, add the origin to its Allowed Origins (or use the Allow Local Development preset for testing).

The engine shows "astra.mock" in the Editor

Expected. Native engines are gated to player builds. Build for the target platform (or use WebGL/Windows) to see the real engine. The Inspector's engine summary tells you what will be used.

Windows player shows nothing

Install the WebView2 Evergreen runtime (preinstalled on Windows 11; otherwise download it from Microsoft). Confirm AstraWebView2.dll is packaged under <Player>_Data/Plugins/x86_64/.

macOS / iOS / Linux / Android do not render

These adapters require their platform binaries. Build the native plugin per the cross-platform build guide and validate on the device; until then those engines resolve to Mock.

Console warnings about native toolchain

Project validation reports missing CMake / cl.exe / WebView2 SDK as warnings — they only matter when you build desktop native plugins yourself and do not affect using the prebuilt WebGL/Windows adapters.

❓ FAQ

Do I need to write any code?

No. Add the Astra Web View component (or use the GameObject menu), set a URL, pick an engine, press Play. Code is fully supported but optional.

Will the no-code component override my code?

No. The auto-open is gated: it defers when you call SuppressAutoOpen()/OpenAsync() or turn off Open On Start.

Which platforms render real pages today?

WebGL and Windows are independently validated. The other adapters are build-ready scaffolding to be validated on their hardware.

Can I evaluate JavaScript / call into the page?

Yes — IBrowserInstance.EvaluateScriptAsync, plus the typed bridge for request/response and streaming messages.

Does removing the component change my project?

No. It is additive; nothing is written to disk on your behalf.

📬 Support

Need help? We're here for you.

📧

Get in Touch

Bug reports, feature requests, integration questions — reach out and we'll get back to you.

✉ szekipapa77@gmail.com

We typically respond within 24–48 hours.

💬 Before contacting
  • Check the Troubleshooting section
  • Open Tools → Astra Web Platform → Diagnostics
  • Confirm the Astra Web View component is on the object
  • Check the Console for policy/engine messages
📋 Helpful info to include
  • Unity version (e.g. 6000.0.30f1)
  • Astra Web Platform version (v1.0)
  • Target platform (WebGL / Windows / …) and engine selection
  • The URL you're loading + any Console messages
⭐
Enjoying Astra Web Platform? A review on the Unity Asset Store helps other developers discover the asset and helps us keep improving it. Thank you!

Astra Web Platform v1.0 · Built for Unity 6000.0+ · WebGL + Windows native adapters validated

Support: szekipapa77@gmail.com