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
## [2.0.0-pre.11] - 2024-08-12
### Added
- PlayToDevice will now limit the editor framerate to 45 by default in order to lower network congestion. The editor sending too many packets over PlayToDevice could cause significant lag and latency for some users. This limit can be changed in the PlayToDevice window.
### Changed
- Duplicate VolumeCameraWindowConfigurations are not allowed - in each project, there can only be one of each of Metal and Unbounded configurations. There can be multiple Bounded configurations, but each Bounded configuration must have a different OutputDimension.
### Deprecated
### Removed
### Fixed
- Wrap all MonoPInvokeCallback methods in try/catch to avoid potential crashes in player builds.
### Security
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9
9
10
10
For general changes to PolySpatial, refer to the [PolySpatial Changelog](https://docs.unity3d.com/Packages/com.unity.polyspatial@latest?subfolder=/changelog/CHANGELOG.html).
11
11
12
+
## [2.0.0-pre.11] - 2024-08-12
13
+
14
+
### Added
15
+
- PlayToDevice will now limit the editor framerate to 45 by default in order to lower network congestion. The editor sending too many packets over PlayToDevice could cause significant lag and latency for some users. This limit can be changed in the PlayToDevice window.
16
+
17
+
### Changed
18
+
- Duplicate VolumeCameraWindowConfigurations are not allowed - in each project, there can only be one of each of Metal and Unbounded configurations. There can be multiple Bounded configurations, but each Bounded configuration must have a different OutputDimension.
19
+
20
+
### Deprecated
21
+
22
+
### Removed
23
+
24
+
### Fixed
25
+
- Wrap all MonoPInvokeCallback methods in try/catch to avoid potential crashes in player builds.
On visionOS, hover transitions for certain `Selectable` objects (`Button`, `Dropdown`, `TMP_Dropdown`, `InputField`, `TMP_InputField`, `Scrollbar`, `Slider`, and `Toggle`) are automatically handled by adding a hover effect component to the Selectable's `targetGraphic` and using the `PolySpatial Hover State` shader graph node in the PolySpatial UI image shader graph (`Packages/PolySpatial/Resources/Shaders/MaskingShader.shadergraph`) to switch between the normal `Color` and a separate `HoverColor` property. Note that only `Color Tint` transitions are supported for hover through this method and that any custom UI shaders (that is, shaders other than `UI/Default`) must replicate the properties and hover state functionality of `MaskingShader` in order to show transitions on hover.
Copy file name to clipboardExpand all lines: Documentation~/MetalApps.md
+47-3Lines changed: 47 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,63 @@ uid: psl-vos-metal-apps
3
3
---
4
4
# Metal-based Apps on visionOS
5
5
6
-
With Unity, users can leverage on familiar workflows to build [fully immersive experiences for VisionOS](https://developer.apple.com/documentation/visionOS/creating-fully-immersive-experiences), including virtual reality games or fully virtual environments. Today, Unity provides a wide [range of features and APIs](https://docs.unity3d.com/Manual/VROverview.html) that can be used to develop fully immersive experiences for visionOS. Such packages include:
6
+
With Unity, users can leverage familiar workflows to build Metal-based apps using [**Compositor Services**](https://developer.apple.com/documentation/compositorservices)for visionOS, allowing users to create [fully immersive](https://developer.apple.com/documentation/visionOS/creating-fully-immersive-experiences)or mixed immersion experiences. Today, Unity provides a wide [range of features and APIs](https://docs.unity3d.com/Manual/VROverview.html) that can be used to develop experiences for visionOS. Such packages include:
7
7
8
-
*[visionOS plug-in]()
8
+
[//]: #(TODO: LXR-3988 Once visionOS plug-in docs page is created, link the below to that docs page.)
Once you’ve built your VR content in Unity, simply select **Apple visionOS** on the XR Plug-in Management window, select and build for the visionOS platform, recompile native plugins and a Unity XCode Project file will be generated. From here on, [you’ll continue your development process in XCode](https://developer.apple.com/documentation/visionOS/creating-fully-immersive-experiences), where you can explore concepts like transitioning between windowed content and fully immersive content.
16
+
To get started, simply select **Apple visionOS** on the **XR Plug-in Management** window in **Project Settings**, then navigate to the **Apple visionOS** project setting below **XR Plugin-in Management**.
17
+
18
+
Set the App Mode to **Metal Rendering with Compositor Services**. If you are using ARKit features, you may also need to set a **Hands Tracking Usage Description** and/or a **World Sensing Usage Description**.
|**Initialize Hand Tracking On Startup**| Initializes hand tracking when application starts up. |
28
+
|**Metal Immersion Style**| Defines the immersion style to be used in Metal-based apps. Immersion style determines whether an app will have pass-through. For Metal-based apps, only two immersion styles are valid - **Mixed** and **Full**. The **Progressive** immersion style is not supported with Metal-based apps. |
29
+
| *Automatic*| For Metal-based apps, choosing **Automatic** will cause the app to fallback to **Mixed** immersion style. |
30
+
| *Full*| With this immersion style, pass-through is disabled, and only the skybox will be shown. |
31
+
| *Mixed*| With this immersion style, apps will have pass-through video feed. This immersion style allows an app to switch at runtime between allowing pass-through and rendering the skybox. |
32
+
|**RealityKit Immersion Style**| Defines the immersion style to be used in RealityKit-based apps. Immersion style determines whether your application will have pass-through. Although all immersion styles are applicable to RealityKit-based apps, the effects of some immersion styles will differ depending on the **VolumeCamera****Mode**. |
33
+
| *Automatic*| For RealityKit-based apps, choosing **Automatic** will cause the app to fallback to **Mixed** immersion style. |
34
+
| *Full*| If all **VolumeCamera**s are set to **Bounded****Mode**, content will still appear with pass-through, as if the app was in **Mixed** immersion style. If one **VolumeCamera** in the scene is set to **Unbounded****Mode**, pass-through will be disabled and replaced with a black background, and only content will be visible. The **Digital Crown** will have no effect. |
35
+
| *Mixed*| With this immersion style, apps will have pass-through video feed. **VolumeCamera****Mode** will have no effect on this immersion style. |
36
+
| *Progressive*| If all **VolumeCamera**s are set to **Bounded****Mode**, content will still appear with pass-through, as if the app was in **Mixed** immersion style. If one **VolumeCamera** in the scene is set to **Unbounded****Mode**, content will appear inside a radial portal with a black background. See [Progressive Immersion](RealityKitApps.md#progressive-immersion) for more details. |
37
+
|**Upper Limb Visibility**| This option allows for controlling whether the hands are visible within the app. This option is ignored if the **App Mode** is Windowed, or if the **App Mode** is set to RealityKit but the scene consists of only **Bounded****VolumeCamera**s. |
38
+
| *Automatic*| Hands visibility will be determined by visionOS's default hands setting, which will depend on the context. |
39
+
| *Visible*| In **Metal****App Mode**, the hands will always be visible in the app. Hands always render on top of virtual content. In **RealityKit****App Mode**, the hands are blended with virtual content based on depth. |
40
+
| *Hidden*| In **Metal****App Mode**, the hands will be hidden, which may be beneficial if you wish to present virtual hands instead. In **RealityKit****App Mode**, the hands will be displayed behind virtual content. |
41
+
|**Foveated Rendering**| This option controls whether foveated rendering is enabled or disabled. This option only applies to Metal-based content, and requires the Universal Render Pipeline. |
42
+
|**IL2CPP Large Exe Workaround**| When building your project in Xcode, you may encounter an error such as `ARM64 branch out of range`, especially with larger projects. This option will patch the project to work around this error. |
43
+
44
+
After modifying the project settings, select and build for the visionOS platform in the **Build Profiles** menu. This will generate a Unity XCode Project. From here on, you'll continue the build process in the XCode project, debugging in XCode as needed.
16
45
17
46
>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.
18
47
48
+
### Pass-through Video in Metal Mode
49
+
With visionOS 2, apps set to **Metal Rendering with Compositor Services** can now show pass-through instead of just the skybox. The steps for enabling pass-through with Metal-based apps are the same as the steps for enabling pass-through with [Hybrid](PolySpatialHybridApps.md) apps.
50
+
51
+
1. Set the **Metal Immersion Style** under the **Apple visionOS** project setting to **Mixed** or **Automatic**.
52
+
2. Set your Unity **Camera**'s **Background Type** to **Solid Color**.
53
+
3. Under **Background Type**, click on **Background**. Set the RGBA values for the background color to 0. You can technically use any color here, but ensure the **Alpha** value is set to 0.
54
+
55
+
You may switch **Background Type** from **Solid Color** to **Skybox** in order to switch from showing pass-through to showing the skybox, and vice-versa.
56
+
57
+
> [!NOTE]
58
+
> When you set **Background Type** to **Skybox** (both in the Inspector and via scripting API), Unity will change the alpha value of the background color to 1. When you switch back to pass-through, you must _also_ set the background color to something transparent.
59
+
60
+
> [!NOTE]
61
+
> You will need to disable **HDR** on your **Universal Render Pipeline Asset** to get pass-through to work.
62
+
19
63
## Porting VR experiences to visionOS
20
64
For users who are looking to port existing VR titles looking to visionOS as a fully immersive experience there are a few things you can do to make the transition smoother, in addition to the build workflow elaborated in the above section.
Copy file name to clipboardExpand all lines: Documentation~/PlayToDevice.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,8 @@ If you notice that your connection is timing out, you can increase the connectio
70
70
71
71
**NOTE**: If you select multiple connections at once, content will be streamed to all selected hosts simultaneously.
72
72
73
+
**NOTE**: Limit Frames Per Second should be enabled and set to the expected framerate on device. If the editor runs significantly faster than the device it can overload the network with unnecessary messages making Play To Device feel unresponsive.
74
+
73
75
**NOTE**: Your project's **App Mode** must be set to `RealityKit with PolySpatial` in order to use Play To Device. You can access this setting in the **Apple visionOS** section under **XR Plug-in Management** in your **Project Settings**.
0 commit comments