Skip to content

Commit c981de7

Browse files
author
Unity Technologies
committed
com.unity.polyspatial.visionos@2.0.0-pre.9
## [2.0.0-pre.9] - 2024-07-24 ### Added - Added `Hybrid` app mode. This allows an application to switch between Metal and RealityKit mode at runtime. Hybrid mode requires PolySpatial. Refer to the **PolySpatial Hybrid apps on visionOS** section of the PolySpatial VisionOS documentation for more information. - Added the ability to create multiple volume cameras. Refer to the **Volume cameras** section of the PolySpatial VisionOS documentation for more information. ### Changed - Updated instructions for setting up 2.x prerelease packages. This currently requires manually pointing your project's manifest.json at the appropriate package versions. - Several VisionOS prefixed components (such as VisionOSVideoComponent and VisionOSImageBasedLight) have had DisallowMultipleComponent applied to them, and cannot be added multiple times to the same GameObject.
1 parent a81546f commit c981de7

File tree

70 files changed

+1207
-1194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1207
-1194
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
For general changes to PolySpatial, refer to the [PolySpatial Changelog](https://docs.unity3d.com/Packages/com.unity.polyspatial@latest?subfolder=/changelog/CHANGELOG.html).
1111

12-
## [2.0.0-pre.3] - 2024-04-22
12+
## [2.0.0-pre.9] - 2024-07-24
1313

1414
### Added
15+
- Added `Hybrid` app mode. This allows an application to switch between Metal and RealityKit mode at runtime. Hybrid mode requires PolySpatial. Refer to the **PolySpatial Hybrid apps on visionOS** section of the PolySpatial VisionOS documentation for more information.
16+
- Added the ability to create multiple volume cameras. Refer to the **Volume cameras** section of the PolySpatial VisionOS documentation for more information.
17+
18+
### Changed
19+
- Updated instructions for setting up 2.x prerelease packages. This currently requires manually pointing your project's manifest.json at the appropriate package versions.
20+
- Several VisionOS prefixed components (such as VisionOSVideoComponent and VisionOSImageBasedLight) have had DisallowMultipleComponent applied to them, and cannot be added multiple times to the same GameObject.
21+
1522

23+
## [2.0.0-pre.3] - 2024-04-22
24+
25+
### Added
1626
- Added a loading screen during initial Play To Device loading
1727
- Added support for procedural skinned meshes. Updating a skinned mesh will now notify all skinned mesh renderers using that mesh to update.
28+
- Added support for adding new reference images at runtime, refer to [ARFoundation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@6.0/manual/features/image-tracking.html#add-new-reference-images-at-runtime) documentation.
29+
- Added tracked image support to the "PolySpatial XR" Plug-in Provider, under XR Plug-in Managment.
1830

1931
### Changed
2032

Documentation~/Assets.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ Please refer to [PolySpatial Material Support](Materials.md) for detailed inform
1515
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.
1616

1717
## Textures
18-
Unity provides support for 2D textures on visionOS, and takes advantage of native texture compression options.
19-
20-
RealityKit for visionOS does not support 3D textures or cubemaps, so PolySpatial emulates these using 2D textures. This carries two limitations:
21-
* First, the height times the depth (where cube maps have a fixed depth of 6) must be less than or equal to visionOS's maximum texture height (currently 8192). This means that cube maps with power-of-two dimensions must be sized 1024 or smaller, and 3D textures with equal power-of-two dimensions cannot be larger than 64.
22-
* Second, due to the way that 3D texture coordinates are mapped to slices within a 2D texture, artifacts may appear when displaying texture mipmap levels whose sizes are not evenly divisible by their compressed texture block size (e.g., 6 for ASTC6x6). If this becomes apparent, consider switching to an uncompressed texture format.
18+
Unity provides support for 2D textures, 3D textures, and cube maps on visionOS, and takes advantage of native texture compression options.
2319

2420
### Render Textures
2521
Please refer to [PolySpatial Render Texture Support](RenderTextures.md) for detailed information about support for render textures.

Documentation~/Billboard.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
uid: psl-vos-billboard
3+
---
4+
# Billboard
5+
6+
The **VisionOSBillboard** component ensures an object always faces the user, even in modes where head position isn't directly available, such as shared mode. This is particularly useful for text, UI, and other oriented content. In visionOS, this maps directly to the [BillboardComponent](https://developer.apple.com/documentation/realitykit/billboardcomponent), and is ignored on other platforms. In Unity play mode, we provide similar functionality which will show only the Game view targeting the main camera.
7+
8+
| **Property** | **Description** |
9+
| --- | --- |
10+
| **Blend Factor** | "Degree" that entity rotates towards camera. |
11+
| **Forward Direction** | Vector in local space that will point towards camera. |
12+
| **Up Direction** | Direction in local space to align with world up. |
13+
| **Rotation Axis** | World space axis to rotate around, if any. |

Documentation~/CustomFunctionNode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Swizzling vector values is supported. For example, `float3(1, 2, 3).xz` is equi
3535
## Supported Functions
3636

3737
### HLSL Intrinsic Functions
38-
The parser supports a subset of HLSL's intrinsic functions: `abs`, `acos`, `all`, `any`, `asin`, `atan`, `atan2`, `ceil`, `clamp`, `cos`, `cosh`, `cross`, `degrees`, `distance`, `dot`, `exp`, `exp2`, `floor`, `fmod`, `frac`, `isinf`, `isnan`, `length`, `lerp`, `log`, `max`, `min`, `mul`, `normalize`, `pow`, `radians`, `rcp`, `reflect`, `refract`, `round`, `rsqrt`, `saturate`, `sign`, `sin`, `sinh`, `smoothstep`, `sqrt`, `step`, `tan`, `tanh`, `transpose`, `trunc`
38+
The parser supports a subset of HLSL's intrinsic functions: `abs`, `acos`, `all`, `any`, `asin`, `atan`, `atan2`, `ceil`, `clamp`, `cos`, `cosh`, `cross`, `ddx`, `ddy`, `degrees`, `distance`, `dot`, `exp`, `exp2`, `floor`, `fmod`, `frac`, `fwidth`, `isinf`, `isnan`, `length`, `lerp`, `log`, `max`, `min`, `mul`, `normalize`, `pow`, `radians`, `rcp`, `reflect`, `refract`, `round`, `rsqrt`, `saturate`, `sign`, `sin`, `sinh`, `smoothstep`, `sqrt`, `step`, `tan`, `tanh`, `transpose`, `trunc`
3939

4040
### PolySpatial-Specific Functions
4141
Additionally, the parser supports the custom `splitlr` function, which implements the splitlr function described in the [MaterialX Spec](https://materialx.org/assets/MaterialX.v1.38.Spec.pdf):
@@ -45,7 +45,7 @@ genType splitlr(genType valuel, genType valuer, float center, float2 texcoord);
4545
(where `genType` is one of `float`, `float2`, `float3`, or `float4`)
4646

4747
### Unity Macros
48-
For sampling textures, the parser supports Unity macros: `SAMPLE_TEXTURE2D`, `SAMPLE_TEXTURE2D_LOD`, `SAMPLE_TEXTURE3D`, `SAMPLE_TEXTURE3D_LOD`, `SAMPLE_TEXTURECUBE_LOD`
48+
For sampling textures, the parser supports Unity macros: `GATHER_TEXTURE2D`, `SAMPLE_TEXTURE2D`, `SAMPLE_TEXTURE2D_LOD`, `SAMPLE_TEXTURE3D`, `SAMPLE_TEXTURE3D_LOD`, `SAMPLE_TEXTURECUBE_LOD`
4949

5050
## Supported Globals
5151
The parser supports several of Unity's built-in global variables: `_Time`, `_SinTime`, `_CosTime`, `unity_DeltaTime`, `unity_ObjectToWorld`, `unity_WorldToObject`, `UNITY_MATRIX_V`, `UNITY_MATRIX_I_V`, `UNITY_MATRIX_P`, `UNITY_MATRIX_I_P`, `UNITY_MATRIX_VP`, `UNITY_MATRIX_I_VP`

Documentation~/DevelopmentAndIteration.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ uid: psl-vos-development
44
# Development & Iteration
55

66
## Prerequisites
7-
Please refer to [visionOS Mixed Reality Requirements & Limitations](Requirements.md) for information about supported hardware, software, and Unity features.
7+
Please refer to [visionOS Support Requirements & Limitations](Requirements.md) for information about supported hardware, software, and Unity features.
88

99
<!-- TODO: ## Package Setup Instructions -->
1010

11-
## Enable Mixed Reality mode
12-
visionOS support for Mixed Reality is provided via Unity PolySpatial. When the active build target is visionOS and "Mixed Reality" is selected as the App Mode in **Edit &gt; Project Settings &gt; XR Plugin-in Management &gt; Apple visionOS &gt; App Mode**, PolySpatial is automatically enabled and configured for visionOS. If Mixed Reality is not selected as the App Mode, or on other platforms, PolySpatial is disabled.
11+
## Enable RealityKit mode
12+
visionOS support for RealityKit is provided via Unity PolySpatial. When the active build target is visionOS and "RealityKit" or "Hybrid" is selected as the App Mode in **Edit &gt; Project Settings &gt; XR Plugin-in Management &gt; Apple visionOS &gt; App Mode**, PolySpatial is automatically enabled and configured for visionOS. If RealityKit or Hybrid is not selected as the App Mode, or on other platforms, PolySpatial is disabled.
1313

1414
## Iteration and Preview
15-
When targeting visionOS Mixed Reality, Unity's regular play mode and build workflows are used. Additionally, visionOS Mixed Reality supports "Play to Device" for rapid iteration on actual hardware via play mode.
15+
When targeting visionOS RealityKit, Unity's regular play mode and build workflows are used. Additionally, visionOS RealityKit supports "Play to Device" for rapid iteration on actual hardware via play mode.
1616

1717
### Play Mode
18-
The fastest way to preview content is to enter Play Mode within the Unity Editor. When targeting visionOS Mixed Reality, entering play mode will enable PolySpatial in the editor. A parallel hierarchy of GameObjects is created that represent the objects that will be visible on the PolySpatial target. When previewing in play mode in the editor, Volume Cameras are ignored, and the preview is displayed from the viewpoint of the a regular Unity Camera. PolySpatial objects are created in the PolySpatial layer. To ensure you are viewing the end result objects, make sure the active camera's culling mask shows only PolySpatial objects. In the editor, PolySpatial will attempt to manage this for you directly, and will create and configure a mirror of the main camera.
18+
The fastest way to preview content is to enter Play Mode within the Unity Editor. When targeting visionOS RealityKit, entering play mode will enable PolySpatial in the editor. A parallel hierarchy of GameObjects is created that represent the objects that will be visible on the PolySpatial target platform. When previewing in play mode in the editor, the preview is displayed from the viewpoint of the main Unity Camera. PolySpatial objects are created in the PolySpatial layer. To ensure you are viewing the end result objects, make sure the active camera's culling mask shows only PolySpatial objects. In the editor, PolySpatial will attempt to manage this for you directly, and will create and configure a mirror of the main camera.
19+
20+
When working with multiple volumes, the **Target Display** of each Volume Camera can be set to a different value, allowing you to cycle between volumes in the Game tab. See [Volume Camera](VolumeCamera.md) for more information.
1921

2022
When playing in the editor, Unity's rendering system is used instead of RealityKit, as it would be on visionOS. As such, it will not be a faithful representation of visuals or performance characteristics of visionOS.
2123

@@ -25,7 +27,7 @@ Most options in build settings are analogous to those provided for iOS. visionOS
2527
As with iOS, when building for a device, you must configure a valid provisioning profile and signing certificate in order to deploy the built application.
2628

2729
### Play to Device
28-
Unity's visionOS Mixed Reality support includes **Play to Device**, a new workflow that allows you to enter Play Mode in the editor and instantly see your content on an attached device. You can inspect or make changes to your content live, and can provide input either via the device or the editor.
30+
Unity's visionOS RealityKit support includes **Play to Device**, a new workflow that allows you to enter Play Mode in the editor and instantly see your content on an attached device. You can inspect or make changes to your content live, and can provide input either via the device or the editor. See [Play To Device](PlayToDevice.md) for more information.
2931

3032
### Recording and Playback
3133
PolySpatial-based platforms support a recording and playback workflow that allows you to record a session (including input commands) and then play it back within the Unity Editor. For more information, see information about [PolySpatial tooling](Tooling.md)
@@ -35,7 +37,7 @@ The standard debugging workflow works normally on visionOS. Enable **Script Debu
3537

3638
## Project Validation
3739

38-
Unity's visionOS Mixed Reality platform provides a way to validate your visionOS project before building and deploying to a device. Unsupported scene objects will be indicated by a warning icon in the Hierarchy view, while the Inspector view provides helpful UIs to navigate between these objects and address the issues. For detailed information about the validation system, please refer to the [Project Validation](PolySpatialXRProjectValidation.md) page.
40+
Unity's visionOS RealityKit platform provides a way to validate your visionOS project before building and deploying to a device. Unsupported scene objects will be indicated by a warning icon in the Hierarchy view, while the Inspector view provides helpful UIs to navigate between these objects and address the issues. For detailed information about the validation system, please refer to the [Project Validation](PolySpatialXRProjectValidation.md) page.
3941

4042
## Building Blocks in PolySpatial XR
4143

Documentation~/Extensions.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
uid: psl-vos-extensions-package
3+
---
4+
# Extensions Package
5+
6+
Unity’s **PolySpatial Extensions** package provides functionality that is either optional, or currently experimental.
7+
8+
> [!NOTE]
9+
> Experimental features are only being developed for Unity 6+ and URP with RenderGraph enabled.
10+
11+
| Topic | Description |
12+
|-------|-------------|
13+
| [Stereo Render Targets *(Experimental)*](StereoRenderTargets.md) | Enables a camera to render into a single-pass-stereo framebuffer and then display this in various ways in visionOS RealityKit mode. |
14+
| DOTS/ECS Rendering | Synchronize DOTS/ECS over PolySpatial. |
15+

Documentation~/ExtensionsImport.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
uid: psl-vos-extensions-package
3+
---
4+
# Import Extensions Package
5+
6+
To add the extensions package to a project:
7+
8+
1. [Install PolySpatial and visionOS support](xref:psl-vos-install).
9+
2. Open the Package Manager window (menu: **Window > Package Manager**).
10+
3. Open the **Add package by name** dialog.
11+
4. Enter the package ID `com.unity.polyspatial.extensions`.
12+
5. Click **Add**.
13+
14+
The Unity Package Manager installs the extensions package in your project.

0 commit comments

Comments
 (0)