Render a page in your own panel
Render a page where there is no phone: a main menu column, a machine panel or a wall board. A surface uses the same renderer, CSS subset and s1.call / s1.on channel as a phone app.
You need: Sideload 1.13.0+, a bundle with LogicalName resources (see Build your first app), and a RectTransform to draw into.
A surface has no home-screen icon, no turnable orientation, no badge and no notifications. For those, register an app.
-
Mount the page.
using Sideload.Api;Surfaces.Mount(myPanel, "sidehustle-menu", "SideHustle.Assets.menu").OnCall("menu.state", _ => StateJson()).Emit("ready");Argument Meaning hostRectYour UnityEngine.RectTransform. Typedobjectso the shim compiles without a Unity reference. Pass the RectTransform directly.idUnique across apps and surfaces. It is also the folder under Mods/that overrides the bundle.bundlePrefixEmbedded-resource prefix of your web files. designShortSideDefault 0. See step 2. hostAssemblyAssembly that holds the bundle. Defaults to the caller’s. Mountreturns aSurfaceHandlewith chainableOnCall,Emit,AllowHostandUnmount. -
Choose
designShortSide. A wrong value makes everything the wrong size.0maps one CSS pixel to one device unit. Use it for a panel that uGUI has already laid out.- A number such as
400scales the page against that width. A phone-app stylesheet then renders unchanged.
-
Remount when the panel is rebuilt. A surface ends when its
RectTransformis destroyed, so a scene reload needs nothing else.if (!Surfaces.IsMounted("sidehustle-menu")) Mount(); -
Keep a fallback for hosts without surfaces.
Surfaces.Availableis false on Sideload 1.12.0 and older, andMountthen returns a handle whose calls do nothing.if (Surfaces.Available) MountThePage();else BuildTheOldPanel();
Check it works
Section titled “Check it works”The page draws inside the panel at the size you expect. Surfaces.IsMounted(id) returns true. It returns false once the panel is destroyed.

- The bridge -
s1.call,Emit, storage andfetchwork the same on a surface. - CSS and layout
- Companion seam
- API reference