向visionOS移植Unity的VR应用(苹果称之为“全沉浸式体验”)相当简单,使用类似iOS的构建链,Unity与苹果的XCode IDE接口。例如,Rec Room已经确定将会在VisionPro上发布,而只需进行少量修改。
However, building an AR application in Unity that runs in a visionOS "shared space" is very different and introduces several important limitations that developers need to be aware of.
Content in shared spaces is rendered using Apple's RealityKit framework, rather than Unity's own rendering subsystem. To convert Unity's mesh renderers, materials, shaders, and particles to RealityKit, Unity developed a new system called PolySpatial.
However, PolySpatial only supports certain materials and shaders. For the Universal Render Pipeline (URP), it supports Lit, Simple Lit, and Complex Lit shaders, while for the built-in Render Pipeline, it only supports Standard shaders. Custom shaders and material types are supported, but only through the Shader Graph visualization tool, and handwritten shaders are not supported.
However, PolySpatial has a unique advantage: you can go straight to play mode without having to rebuild every time. Unity says this should drastically reduce iterative testing times.
Interested developers canfill out this formApply to participate in the closed beta of Unity visionOS support.