Samples
We prepare some sample scenes for Spatial Reality Display. You can find them in Assets / SRDisplayUnityPlugin / Samples.
Note
Only one Spatial Reality Display app can be run at a time. After the second apps will fail to launch.
0 - SRDisplaySampleHome
Open this, then you can go to the following sample scenes with numeric keys.
In a sample scene, you can move to other scene. For example, if you open SRDisplaySimpleSample and press "3", SRDisplayUISample will open.
Note
If you cannot use the keys, set "Active Input Handling" to "Both" in "Project Settings" - "Player" - "Other Settings".
1 - SRDisplaySimpleSample
In the sample, just the cube is floating and rotating.
2 - SRDisplayLookAtSample
In the sample, the character "primitive stick guy" will be looking at you always :)
If you want to use the user's position in your contents, you can use the WatcherAnchor GameObject that is the child of SRDisplayManager, as in this sample.
3 - SRDisplayUISample
In the sample, you can press the Button, toggle the checkbox, move the slider and select the dropdown menu.
4 - SRDisplayPostProcessingSample
In the sample, you can use PostProcessingStack v2 for Built-in render pipeline(BRP) content. You don't have to use it for Universal render pipeline(URP) and High definition render pipeline(HDRP) content.
Caution
You must install PostProcessingStack v2 to use this BRP sample. You don't have to install it for URP and HDRP sample.
Caution
Some effects may not work well. Especially, some effects don't work when Spatial Clipping is active.
5 - SRDisplay3DRaycastSample
In the sample, you can drag the box and change its position.
If you want to use raycasting using the user's mouse, use SRDCameras.ScreenPointToRay function as in SRD3DRaycastSample script.