A walkthrough on setting up a skydome with a slider that controls immersion level in a PolySpatial mixed reality scene.
- Create a new folder in Assets called
(Your Name)'s Skydome - Go to the PolySpatial Sample Scenes folder and duplicate (
Cmd + D) theMixedRealityscene - Rename it
(Your Name)'s Skydome Sceneand move it into your folder - In the hierarchy, find the Instructions object and delete
Home Button Text and Icon - Delete both
XR OriginandAR Sessionfrom the hierarchy or the scene will look broken on the AVP
- In the Assets search bar, find
CutSphere, duplicate it, and add it to your folder - Open your Skydome scene and drag the CutSphere into the hierarchy
- Right click the CutSphere in the hierarchy -> Prefab -> Unpack Completely
- Rename it something like
Sky
Unpacking lets you swap out the skybox image later without modifying the original prefab in Assets.
- Select your
Skyobject in the hierarchy, then go to Skybox (material) -> Surface Options- Set Surface Type to
Transparent - Set Blending Mode to
Alpha
- Set Surface Type to
Always make changes to the skybox through the hierarchy, not the Assets folder.
- Add an image to your folder
- In your
Skyobject in the hierarchy, drag the image onto the square next to Base Map
- Open the PolySpatial sample scene
SpatialUI - Drag the
ManagerandSpatialPanel_UIobjects from the hierarchy into your Skydome folder
It helps to have your Skydome folder open at the same time so you can drag and drop easily.
- Open your Skydome scene and add
ManagerandSpatialPanel_UIto the hierarchy - Double click
SpatialPanel_UIand delete everything inside it except for the slider - Set the
SpatialPanel_UItransform position to0, 0, 0(or move it manually to sit near the Instructions panel)
You may need to move the entire Instructions object up slightly depending on how it looks in the Simulator.
- In the hierarchy go to Instructions -> Instructions
- For both
titleanddescription, find the TextMeshPro text object and update the text:- Title:
Progressive Immersion - Description:
Drag the slider to change immersion level
- Title:
Tip: Hold
Optionin the scene view to pan around easily.
This script reads the slider value and uses it to control the opacity of the sky sphere.
Right click in the hierarchy -> Create Empty -> name it SkyOpacityController
Add a new script called SkyOpacityController and add the script provided to you in the repo.
After adding the script, you need to assign both fields in the Inspector:
- Slider Fill Renderer: drag in
SliderImage, found atInstructions -> SpatialPanel_UI -> SliderBackdrop -> SliderImage - Sky Sphere Renderer: drag in your
Skyobject from the hierarchy
Before testing, make sure your hierarchy looks something like this:








