How do you use Unity on visionOS?

Asked on 08/05/2024

1 search

To use Unity on visionOS, you can follow these steps:

  1. Start with a Compatible App: Begin by running your game as a compatible app on visionOS. This involves compiling the app with the iOS SDK and running it on visionOS as a compatible app. Compatible apps will run in a window on visionOS, and both touch controls and game controllers are available, providing a uniform experience across all platforms.

  2. Convert to a Native App: To convert the app to a native visionOS app, go to the build settings of the app and select the iOS target. Add Apple Vision as a supported destination to compile the app. You might encounter a few compilation errors, but if the app was made for iOS, most of the code should compile.

  3. Rendering Options: For displaying the content of your game on visionOS, you have several options:

    • Render to a CMTL Layer: This can be easily integrated into UIViews.
    • Render Directly to a Relative Texture: Using the new low-level texture API for more control.
  4. Enhance the Rendering: Start with a CM metal layer if it is easier, but it is recommended to move to a low-level texture to get the most control over the rendering.

For more detailed steps and techniques, you can refer to the session Bring your iOS or iPadOS game to visionOS.

Relevant Sessions

These sessions provide a comprehensive guide on how to get started with visionOS and enhance your app for spatial computing.