You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation~/Assets.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
---
2
+
uid: psl-vos-assets
3
+
---
1
4
# PolySpatial Asset Support
2
5
3
6
## Meshes
@@ -8,16 +11,16 @@ As Unity and RealityKit use different coordinate systems, some vertex attributes
8
11
## Materials
9
12
Please refer to [PolySpatial Material Support](Materials.md) for detailed information about material and shader support on visionOS.
10
13
11
-
### Unity ShaderGraphs
12
-
Please refer to [Shader Graph Support](ShaderGraph.md) for detailed information about how custom shaders defined via Unity ShaderGraph are converted to MaterialX to interop with RealityKit.
14
+
### Unity Shader Graphs
15
+
Please refer to [Shader Graph Support](ShaderGraph.md) for detailed information about how custom shaders defined via Unity Shader Graph are converted to MaterialX to interop with RealityKit.
13
16
14
17
## Textures
15
18
Unity provides support for 2D textures on visionOS, and takes advantage of native texture compression options.
16
19
17
20
RealityKit for visionOS does not support 3D textures or cubemaps, so users must reimplement these texture assets in terms of 2D textures instead.
18
21
19
22
### Render Textures
20
-
Unity will replicate render targets to RealityKit in real time, but currently only a limited number of submissions can be made at rate. Introducing additional render targets may contend with Unity's own graphics buffer sumbmission, hindering overall performance.
23
+
Unity will replicate render targets to RealityKit in real time, but currently only a limited number of submissions can be made at rate. Introducing additional render targets may contend with Unity's own graphics buffer submission, hindering overall performance.
21
24
22
25
Also note that you must manually mark RenderTextures as dirty after modifying them; currently, no such dirtying occurs automatically, and if the texture isn't dirtied it won't be replicated over to RealityKit.
Copy file name to clipboardExpand all lines: Documentation~/DevelopmentAndIteration.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
---
2
+
uid: psl-vos-development
3
+
---
1
4
# Development & Iteration
2
5
3
6
## Prerequisites
@@ -12,14 +15,14 @@ visionOS support for Mixed Reality is provided by Unity PolySpatial, which can b
12
15
Unity provides several options for iterating and previewing content that targets visionOS. These options are on par with Unity's support for other non-desktop platforms.
13
16
14
17
### Play Mode
15
-
The fastest way to preview content is to enter Play Mode within the Unity Editor. This provides the fastest iteration cycle, but uses Unity's rendering system rather than RealityKit. This mode is optimized for rapid iteration, such as iterating on gameplay or UX, but may not always provide a faithful representation of the visuals or performance characteristics of a target platform. Visuals, optimization, and similar tasks typically benefit from other preview options provided by Unity. In addition, Play Mode doesn't currently preview volumes or the new input modalities provided by visionOS.
18
+
The fastest way to preview content is to enter Play Mode within the Unity Editor. This provides the fastest iteration cycle, but uses Unity's rendering system rather than RealityKit. This mode is optimized for rapid iteration, such as iterating on game play or UX, but may not always provide a faithful representation of the visuals or performance characteristics of a target platform. Visuals, optimization, and similar tasks typically benefit from other preview options provided by Unity. In addition, Play Mode doesn't currently preview volumes or the new input modalities provided by visionOS.
16
19
17
20
In order to better approximate the visionOS runtime, Play Mode for PolySpatial apps creates a parallel hierarchy of **backing** GameObjects that are linked to your app's **simulation** GameObjects, but perform all the rendering. This means you will observe some differences based on the state of the `Enable PolySpatial Runtime` project setting. These differences are intentional, as they allow developers to better preview how their content will look on device.
18
21
19
22
### visionOS Player builds.
20
23
Choose visionOS from the Build Settings window to target your build for visionOS. Most options in build settings are analogous to those provided for iOS. visionOS player builds will generate an Xcode project that needs to be compiled on a Mac (currently, this must be a Mac with Apple silicon), but may target either the visionOS simulator or an Apple Vision Pro headset connected to your Mac.
21
24
22
-
Note: unlike iOS, there is no need to switch to a different SDK in Project Settings to run your content in the simulator. Simply select the RealityDevice simulator target in Xcode.
25
+
Note: unlike iOS, there is no need to switch to a different SDK in Project Settings to run your content in the simulator. Simply select the RealityDevice simulator target in Xcode.
23
26
24
27
For building to a development kit make sure you have setup a valid provisioning profile and signing certificate for Apple Development (that includes visionOS) platform. You will also need to make sure the device is correctly registered to your development account.
25
28
@@ -30,6 +33,9 @@ PolySpatial for visionOS supports a unique recording and playback workflow that
30
33
The standard debugging workflow works normally when using PolySpatial. You enable Script Debugging in the build settings and optionally Wait for Managed Debugger. Then attach a managed debugger/IDE to your running application and debug your script code.
31
34
32
35
## Building Blocks in PolySpatial XR
33
-
The building blocks system is an overlay window in the scene view that can help you quickly access commonly used items in your project. To open the building blocks overlay click on the hamburger menu on the scene view > Overlay menu Or move the mouse over the scene view and press the "tilde" key. Afterwards just enable the Building Blocks overlay.
The Building Blocks system is an overlay window in the Scene view that can help you quickly access commonly used items in your project. To open the Building Blocks overlay click on the hamburger menu on the Scene view > Overlay menu. Or move the mouse over the Scene view and press the "tilde" key. Afterwards, just enable the Building Blocks overlay.
34
40
35
41
You can find more info about the building blocks system in the [XR Core Utils package](https://docs.unity3d.com/Packages/com.unity.xr.core-utils@latest).
Copy file name to clipboardExpand all lines: Documentation~/FAQ.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
uid: polyspatialxr-faq
2
+
uid: psl-vos-faq
3
3
---
4
4
5
5
# Frequently Asked Questions (FAQ)
@@ -9,23 +9,23 @@ uid: polyspatialxr-faq
9
9
* Please note that Unity is still building towards feature parity with the Metal API on XCode, so you might observe warnings from Metal’s API validation layer. To work around this, you can turn off the Metal API Validation Layer via XCode’s scheme menu.
10
10
11
11
## Q: How can I bring an existing mobile project to the PolySpatial XR platform?
12
-
Please check the Project conversion guide on the [getting started page](GettingStarted.md#unity-project-conversion-guide-for-unity-polyspatial-xr) for information on enabling and using PolySpatial.
12
+
Please check the Project conversion guide on the [getting started page](GettingStarted.md#porting-existing-projects) for information on enabling and using PolySpatial.
13
13
14
14
## Q: How can I bring an existing XR project to the PolySpatial XR platform?
15
-
You can check for a Project conversion guide on the [getting started page](GettingStarted.md#unity-project-conversion-guide-for-unity-polyspatial-xr)
15
+
You can check for a Project conversion guide on the [getting started page](GettingStarted.md#porting-existing-projects)
16
16
17
17
## Q: I enter Play Mode and see no visual or execution difference in my project!
18
18
This may indicate you haven't yet turned on support for the PolySpatial Runtime. To do so, go to **Project Settings > PolySpatial** and make sure that **Enable PolySpatial Runtime** is toggled.
19
19
20
20
## Q: The runtime is enabled, but nothing shows up!
21
-
* Ensure you have a Volume Camera in your scene. An Unbounded Volume Camera with its origin positioned in the middle of your scene is a good starting point.
21
+
* Ensure you have a Volume Camera in your scene. An Unbounded Volume Camera with its origin positioned in the middle of your scene is a good starting point.
22
22
If one is not present a default one will be created that will include the bounds of every object in the scene, but this may cause objects in the scene within the bounds of the volume camera to be too small to see.
23
-
* Verify that the in-editor preview runtime is functioning. Open the “DontDestroyOnLoad” scene in the hierarchy while playing, and check if there is a "PolySpatial Root” object present. If there is not, ensure that the PolySpatial runtime is enabled. If it is enabled and nothing shows up, please contact the Unity team.
24
-
* When using an Unbounded camera, the platform is responsible for choosing the (0,0,0) origin and may choose position for it that is unexpected. Look around (literally) to see if your content is somewhere other than here you think it should be. Rebooting the device can also help to reset its session space. It can be helpful to ensure that it is in a consistent location (for example, sitting on the desk, facing forward) every time you boot it up.
23
+
* Verify that the in-editor preview runtime is functioning. Open the “DontDestroyOnLoad” scene in the hierarchy while playing, and check if there is a "PolySpatial Root” object present. If there is not, ensure that the PolySpatial runtime is enabled. If it is enabled and nothing shows up, please contact the Unity team.
24
+
* When using an Unbounded camera, the platform is responsible for choosing the (0,0,0) origin and may choose position for it that is unexpected. Look around (literally) to see if your content is somewhere other than here you think it should be. Rebooting the device can also help to reset its session space. It can be helpful to ensure that it is in a consistent location (for example, sitting on the desk, facing forward) every time you boot it up.
25
25
26
26
## Q: Skinned Meshes are not animating!
27
27
* On the **Animator** component, ensure **Culling Mode** is set to **Always Animate**.
28
-
* If the model is imported, navigate to the **Import Settings** for the model. Under the **Rig** tab, ensure **Optimize Game Object** is unticked. Some models may not even have this setting; in that case, it should be good as-is.
28
+
* If the model is imported, navigate to the **Import Settings** for the model. Under the **Rig** tab, ensure **Optimize Game Objects** is unticked. Some models may not even have this setting; in that case, it should be good as-is.
29
29
* Certain models may contain a skeleton (a set of bones in a hierarchy) that are incompatible with RealityKit. To be compatible, a skeleton must have the following attributes:
30
30
1. A group of bones must have a common ancestor GameObject in the transform hierarchy.
31
31
2. Each bone in the skeleton must be able to traverse up the transform hierarchy without passing any non-bone GameObjects.
Copy file name to clipboardExpand all lines: Documentation~/GettingStarted.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
---
2
+
uid: psl-vos-getting-started
3
+
---
1
4
# Getting Started
2
5
This section covers several important topics to get you up to speed when developing for the visionOS platform. Here you will find links to a step-by-step guide for building your first Unity PolySpatial XR app and some development best practices when developing for PolySpatial XR.
3
6
@@ -13,8 +16,8 @@ you will find a wide range of vertical slices demo projects explaining how to de
13
16
14
17
## Porting Existing Projects
15
18
16
-
When porting existing Unity projects to visonOS, several considerations need to be taken into account. The biggest limitation is that some core Unity features aren't supported, and others provide a reduced feature set. In addition, input is different, and processing power and supported components will vary. Sometimes you will have to develop your own systems to support your unique project features and work around these limitations.
19
+
When porting existing Unity projects to visionOS, several considerations need to be taken into account. The biggest limitation is that some core Unity features aren't supported, and others provide a reduced feature set. In addition, input is different, and processing power and supported components will vary. Sometimes you will have to develop your own systems to support your unique project features and work around these limitations.
17
20
18
-
You can find information about [porting VR experiences to visionOS](VRApps.md#porting-vr-experiences-to-visionos), find out which [Unity features and components](SupportedFeatures.md) are currently supported for immersive apps, or how to use [Project Validation](PolySpatialXRProjectValidation.md) for helpful in-editor assistance to port a project. For more information on input and other dev topics, review the [Reference documentation](TableOfContents.md#reference-documentation).
21
+
You can find information about [porting VR experiences to visionOS](VRApps.md#porting-vr-experiences-to-visionos), find out which [Unity features and components](SupportedFeatures.md) are currently supported for immersive apps, or how to use [Project Validation](PolySpatialXRProjectValidation.md) for helpful in-editor assistance to port a project.
Copy file name to clipboardExpand all lines: Documentation~/Glossary.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,9 @@
1
+
---
2
+
uid: psl-vos-glossary
3
+
---
1
4
# Glossary
2
5
3
-
-**PolySpatial Core** (com.unity.polyspatial): The foundational PolySpatial Package, where initialization and all setup begins. It performs change tracking and processing, serialization/deserialization, and includes the ShaderGraph to MaterialX converter
6
+
-**PolySpatial Core** (com.unity.polyspatial): The foundational PolySpatial Package, where initialization and all setup begins. It performs change tracking and processing, serialization/deserialization, and includes the Shader Graph to MaterialX converter
4
7
5
8
-**PolySpatial XR** (com.unity.polyspatial.xr): Includes scene validation, capability profiles, building blocks, and coaching UI. Adds package dependencies on XRI, AR Foundation, and XR hands.
6
9
@@ -18,10 +21,11 @@
18
21
-**Host (or Backend) Space**: The world space of the backend or Host in which a PolySpatial app is running. This may differ from **Unity Sim Space** because the host environment may allow apps to be moved around independently (for example, relocated to another position and volume in the real world).
19
22
-**Host (or Backend) Physics**: The physics and colliders implemented within the backend to model the full shared environment for purposes such as input, selection, and cross-app interactions.
20
23
24
+
21
25
-**PolySpatial Layer**: A Unity layer that is created to house the backing objects of the Unity SceneGraph. If no such layer already exists *and* there are no free layers in which to create a new layer, the PolySpatial runtime will not initialize when you enter Play Mode, and you will instead get vanilla Unity rendering.
22
26
23
27
-**Volume Camera**: A new component which defines what content within a Sim scene that should be displayed on the Host. A volume camera consists of a mode, an oriented bounding box (OBB), and a culling mask. There are currently two modes:
24
-
- Bounded Mode: In this mode, all content within the volume camera's OBB *and* whose layer matches the culling mask will be replicated to the host. Content that falls on the border (partially inside and partially outside the OBB) will be clipped.
28
+
- Bounded Mode: In this mode, all content within the volume camera's OBB *and* whose layer matches the culling mask will be replicated to the host. Content that falls on the border (partially inside and partially outside the OBB) will be clipped.
25
29
- Unbounded Mode: In this mode, the OBB is ignored, and all content in the scene whose layer matches the culling mask will be replicated to the host. No content is explicitly clipped. See (see [VolumeCamera](VolumeCamera.md)) for more details.
26
30
27
31
-**Exclusive Mode**: Refers to the runtime behavior where an app is the only active and visible application
Provides a hint to the platform to apply a system hover effect when the user is hovering over this object. This is typically used to provide a visual cue to the user that the object is interactive. This effect gets triggered by gaze or a hand poke. The effect is applied to the object that is being hovered over, and not the object that is doing the hovering.
5
+
6
+
This component provides a hint to the platform to apply a system hover effect when the user is hovering over this object. This is typically used to provide a visual cue to the user that the object is interactive. This effect gets triggered by gaze or a hand poke. The effect is applied to the object that is being hovered over, and not the object that is doing the hovering.
3
7
4
8
For privacy reasons, visionOS does not permit apps access to user gaze directly. However, it is often helpful to visually highlight objects at which the user is gazing in order to hint which object will receive input if the user performs a pinch gesture. To this end, Unity PolySpatial provides a `PolySpatialHoverEffect` component for visionOS, which can be added to GameObjects that might receive input via gaze. The presence of this component instructs the host platform (RealityKit) to apply a coloration effect to `GameObject`'s `MeshRenderer` any time the user's gaze ray intersects its corresponding collider(s).
5
9
6
10
All three components must be present to achieve an effect: the `PolySpatialHoverEffect` indicates a `GameObject` should display hover, a `Collider` component defines the collision shape against which the gaze ray is cast, and the `MeshRenderer` provides the mesh and geometry on which the coloration affect will be applied.
Copy file name to clipboardExpand all lines: Documentation~/Input.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
---
2
+
uid: psl-vos-input
3
+
---
1
4
## Input
2
5
<aname="input"></a>
3
6
@@ -10,7 +13,7 @@ In both bounded and unbounded volumes, a 3D touch input is provided when the use
10
13
11
14
3D touch events are exposed via the **PolySpatialTouchSpace Input device**, which is built on top of the `com.unity.inputsystem` package, otherwise known as the New Input System. Existing actions bound to a touchscreen device should work for 2D input. For 3D input, users can bind actions to the specific **PolySpatialTouchSpace** device for a 3D position vector.
12
15
13
-
A collider with the collision mask set to the PolySpatial Input layer is required on any object that can receive 3D touch events. Only touches against those events are reported. At this time, the platform does not make available the gaze ray at the start of a tap gesture.
16
+
A collider with the collision mask set to the PolySpatial Input layer is required on any object that can receive 3D touch events. Only touches against those events are reported. At this time, the platform does not make available the gaze ray at the start of a tap gesture.
0 commit comments