Skip to content

Commit abd57fa

Browse files
author
Unity Technologies
committed
com.unity.polyspatial.visionos@1.3.9
## [1.3.9] - 2024-08-26 ### Changed - We have narrowed down the conditions under which the package will compile from UNITY_VISIONOS || UNITY_IOS || UNITY_EDITOR_OSX to (UNITY_VISIONOS || UNITY_IOS) && UNITY_EDITOR_OSX. This should eliminate compile errors in the case where you had the OSX editor but not the visionOS or iOS platform dependencies. ### Fixed - Wrap all MonoPInvokeCallback methods in try/catch to avoid potential crashes in player builds. - Parent SkinnedMeshRenderer bones to parent of the RootBone (so that it's a sibling with the RootBone) rather than to the SkinnedMeshRenderer itself - this fixes an issue where the RootBone was on a different hierarchy than the SkinnedMeshRenderer, and changes applied to the RootBone GameObject didn't affect the bones.
1 parent 4255741 commit abd57fa

17 files changed

+67
-41
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ 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+
## [1.3.9] - 2024-08-26
13+
14+
### Changed
15+
- We have narrowed down the conditions under which the package will compile from UNITY_VISIONOS || UNITY_IOS || UNITY_EDITOR_OSX to (UNITY_VISIONOS || UNITY_IOS) && UNITY_EDITOR_OSX. This should eliminate compile errors in the case where you had the OSX editor but not the visionOS or iOS platform dependencies.
16+
17+
### Fixed
18+
- Wrap all MonoPInvokeCallback methods in try/catch to avoid potential crashes in player builds.
19+
- Parent SkinnedMeshRenderer bones to parent of the RootBone (so that it's a sibling with the RootBone) rather than to the SkinnedMeshRenderer itself - this fixes an issue where the RootBone was on a different hierarchy than the SkinnedMeshRenderer, and changes applied to the RootBone GameObject didn't affect the bones.
20+
1221
## [1.3.1] - 2024-07-09
1322

1423
## [1.3.0] - 2024-06-26

Documentation~/Glossary.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ uid: psl-vos-glossary
99

1010
- **Unity PolySpatial -- Apple visionOS support** (com.unity.polyspatial.visionos): Adds a new build target (visionOS) and platform support for visionOS and Apple Vision Pro.
1111

12-
- **PolySpatial App** (aka **Client App** or **Unity App**): A Unity app (Unity player) that uses PolySpatial. PolySpatial apps are split in two logical parts: the **Unity Sim** and the **Backend**.
12+
- **PolySpatial App** (aka **Client App** or **Unity App**): A Unity app (Unity player) that uses PolySpatial. PolySpatial apps are split in two logical parts: the **Unity Sim** and the **Backend**.
13+
14+
- **Apple visionOS XR Plug-in** (com.unity.xr.visionos): Implements XR Subsystems and includes common settings for visionOS apps like **App Mode** and **Immersion Style**. This is the only package required for immersive XR apps that use Metal to render.
1315

1416
- **Unity Sim**: The non-rendering portion of a Unity app - its application-specific logic, as well as built-in simulation features including physics, animation, AI, and asset management.
1517
- **(Unity) Sim Space**: The world space of a Unity Sim. While a typical Unity app simulates and renders objects in the same space, these may differ in a PolySpatial app.
@@ -31,3 +33,9 @@ uid: psl-vos-glossary
3133
- **Exclusive Mode**: Refers to the runtime behavior where an app is the only active and visible application
3234

3335
- **Shared Mode**: Refers to the runtime behavior where other apps may be active and/or visible
36+
37+
- **Immersion Style**: Defines the behavior of fully immersive content when using a `VolumeCamera` whose output mode is `Unbounded` or `VR`. This can be set at build time under `Project Settings > XR Plug-in Management > Apple visionOS`. There are two settings for Immersion Style, one for MR and one for VR, and they can be set independently. See [Apple's documentation](https://developer.apple.com/documentation/swiftui/immersionstyle) for more information. The options for Immersion Style are:
38+
- Automatic: The default immersion style. It is equivalent to to Mixed.
39+
- Full: Displays unbounded content that completely replaces passthrough.
40+
- Mixed: Displays unbounded content mixed with passthrough.
41+
- Progressive: Displays unbounded content that partially replaces passthrough.
-70.1 KB
Binary file not shown.
-229 KB
Binary file not shown.

Documentation~/ShaderGraph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Global values must be set in C# using the methods of [PolySpatialShaderGlobals](
2929
Note that visionOS materials do not support global properties natively, and thus PolySpatial must apply global properties separately to all material instances, which may affect performance. For animation, consider using the `PolySpatial Time` node rather than the standard Unity shader graph `Time`. While `PolySpatial Time` will not be exactly synchronized with [Time.time](https://docs.unity3d.com/ScriptReference/Time-time.html) (notably, it will not reflect changes to [Time.timeScale](https://docs.unity3d.com/ScriptReference/Time-timeScale.html)), it is supported natively in visionOS and does not require per-frame property updates.
3030

3131
## Supported targets
32-
The `Universal` and `Built-In` targets are supported for conversion. For both targets, the `Lit` and `Unlit` materials are supported, as well as the `Opaque` and `Transparent` surface types and the `Alpha Clipping` setting. For `Transparent` surfaces, the `Alpha`, `Premultiply`, and `Additive` blending modes are supported. No other target settings are currently supported for conversion. Due to platform limitations, all materials will have `Front` render face, depth writes enabled, `LEqual` depth testing, and tangent space fragment normals.
32+
The `Universal` and `Built-In` targets are supported for conversion. For both targets, the `Lit` and `Unlit` materials are supported (`Sprite Unlit` is treated the same as `Unlit`), as well as the `Opaque` and `Transparent` surface types and the `Alpha Clipping` setting. For `Transparent` surfaces, the `Alpha`, `Premultiply`, and `Additive` blending modes are supported. No other target settings are currently supported for conversion. Due to platform limitations, all materials will have `Front` render face, depth writes enabled, `LEqual` depth testing, and tangent space fragment normals.
3333

3434
## MaterialX keyword
3535
The built-in `MaterialX` keyword may be used to select different paths to use for Unity rendering (as used in editor play mode) versus MaterialX export (as used on visionOS). This is useful in cases where, for example, the Unity path requires Custom Function nodes that use HLSL beyond what is supported by the [MaterialX exporter](CustomFunctionNode.md). Connect the Unity path to the `Off` keyword input and the MaterialX path to the `On` input.

Documentation~/SortingGroup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ uid: psl-vos-sorting-group
33
---
44
# visionOS Sorting Groups
55

6-
The **VisionOS Sorting Group** component provides a way to use the visionOS platform's native sorting group capabilities. By placing renderers in a sorting group, you can get fine-grained control over which render is drawn first. While 2D components (such as SpriteRenderers and CanvasRenderers) have their own sorting mechanism, in some situations, it might help to override their sorting, or to sort non-2D renderers such as `MeshRenderers`.
6+
The **VisionOS Sorting Group** component provides a way to use the visionOS platform's native sorting group capabilities. By placing renderers in a sorting group, you can get fine-grained control over which renderer is drawn first. While 2D components (such as SpriteRenderers and CanvasRenderers) have their own sorting mechanism, in some situations, it might help to override their sorting, or to sort non-2D renderers such as `MeshRenderers`.
77

88
A visionOS sorting group can also be used to sort input on visionOS, in the same way renderers would be sorted. Game objects with colliders can be rearranged using a sorting group - colliders with higher order will capture input and block any lower order colliders from receiving input. Note that the physics of these colliders are not altered - the sorting group only affects the collider with respect to input resolution.
99

10-
Any 2D renderers included in the `VisionOSSortingGroup` will have their default (sprite/canvas) sorting overridden. Each renderer can only belong to one sorting group at a time, and subsequent attempts to add a renderer to another sorting group will result in a warning.
10+
Any 2D renderers or particle systems included in the `VisionOSSortingGroup` will have their default (sprite/canvas) sorting overridden. Each renderer can only belong to one sorting group at a time, and subsequent attempts to add a renderer to another sorting group will result in a warning.
1111

1212
To create a sorting group, add a **VisionOS Sorting Group** component to a GameObject in the scene. You can only add one **VisionOS Sorting Group** component per GameObject. You should avoid changing the component properties often -- changing these properties can be an expensive operation, especially if the **Apply To Descendants** option is enabled.
1313

Documentation~/WebCamTextures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PolySpatial transfers WebCamTextures to host platforms using an optimized path.
77
By default, Unity does not enable WebCamTexture support. You must create a scripting define named `POLYSPATIAL_ENABLE_WEBCAM` to use, and make sure that you fill out the `Camera Usage Description` field in `Player Settings > Other settings`. If you don't do this, then you will see errors with `LocalAssetManager` as it doesn't know how to deal with asset types it doesn't know about.
88

99
## Platform Support
10-
Support for WebCamTextures is dependent on the underlying API support on the target platform. This support may vary and might be entirely missing so take care to validate your needs on the platforms you wish to run on.
10+
On the Apple Vision Pro, WebCamTexture provides a feed of the user's Spatial Persona. In general, support for WebCamTextures is dependent on the underlying API support on the target platform. This support may vary and might be entirely missing so take care to validate your needs on the platforms you wish to run on.
1111

1212
## Texture updates and manual dirtying
1313
WebCamTextures are not auto dirtied when the camera updates the texture. This means that PolySpatial will not know that it needs to update the texture on the target host platform unless told. You can do this by using the `Unity.PolySpatial.PolySpatialObjectUtils.MarkDirty(webCamTexture)` on every frame (Usually in Update) in which the WebCamTexture is being changed while playing.
@@ -34,6 +34,6 @@ public class SetWebCamDirty : MonoBehaviour
3434
}
3535
```
3636

37-
This dirtying API, as with all if the WebCamTextureSupport, is on available when `POLYSPATIAL_ENABLE_WEBCAM` is defined.
37+
This dirtying API, as with all if the WebCamTextureSupport, is only available when `POLYSPATIAL_ENABLE_WEBCAM` is defined.
3838

3939

Editor/BuildUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_VISIONOS || UNITY_IOS || UNITY_EDITOR_OSX
1+
#if (UNITY_VISIONOS || UNITY_IOS || POLYSPATIAL_INTERNAL) && (UNITY_EDITOR_OSX || UNITY_EDITOR_WIN)
22
using System;
33
using System.Diagnostics;
44
using System.IO;

Editor/MacBuildProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_VISIONOS || UNITY_IOS || UNITY_EDITOR_OSX
1+
#if (UNITY_VISIONOS || UNITY_IOS || POLYSPATIAL_INTERNAL) && (UNITY_EDITOR_OSX || UNITY_EDITOR_WIN)
22
#if POLYSPATIAL_INTERNAL
33
using System;
44
using System.Diagnostics;

Editor/RealityKitPluginBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_EDITOR_OSX
1+
#if (UNITY_VISIONOS || UNITY_IOS || POLYSPATIAL_INTERNAL) && UNITY_EDITOR_OSX
22
using System;
33
using System.IO;
44
using Unity.PolySpatial.Internals.Editor;

0 commit comments

Comments
 (0)