For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quick Start

Get a model streaming in your Unity scene in under 5 minutes.

The SDK includes ready-to-use prefabs. Import them first:

  1. Open Window > Package Manager.

  2. Select Polygon Streaming from the package list.

  3. Expand the Samples section and click Import.

Then in your scene:

  1. Drag the Stream Controller prefab into your scene. Assign your scene camera to the Viewer Camera field.

  2. Drag the Streaming Model prefab into your scene. Assign the StreamController to the Stream Controller field, and paste your XRG model URL into Source Url.

  3. Press Play.


Option B: Manual Setup

If you prefer to set up from scratch:

  1. Create an empty GameObject, add the StreamController component, and assign your scene camera to Viewer Camera.

  2. Create another empty GameObject where you want the model to appear, add the StreamingModel component, assign the StreamController, and paste your XRG URL into Source Url.

  3. Press Play.

If Viewer Camera is left empty, the SDK falls back to Camera.main at runtime and logs a warning.

The model begins streaming automatically on the first frame. No code required for basic usage.


Scene Preview (Edit Mode)

The StreamingModelPreview component (added automatically) renders a lightweight preview of each model directly in the Scene View while in Edit Mode. Toggle it on or off in the Inspector.


Required Layer (Occlusion Culling)

If occlusion culling is enabled (default), add a layer named exactly PolygonStreaming in Edit > Project Settings > Tags and Layers. The SDK auto-creates this layer in the Editor via AutoAddLayerOnLoad, but verify it exists if you encounter occlusion issues.


Cache Settings

On first use, the SDK creates Assets/Resources/SosCacheSettings.asset automatically. This ScriptableObject controls memory and disk cache sizes. You do not need to create it manually.


Next Steps

Last updated

Was this helpful?