What's new in version 6.1
New features
Stereo occlusion
- Added support for stereo occlusion, enabling providers for head-mounted displays (HMDs) to implement the XR occlusion subsystem. Refer to Occlusion for more information.
Persistent anchor batch operations
- Added APIs for batch save, load, and erase of persistent anchors. Refer to Persistent anchors for more information.
Camera torch mode
- Added an API that allows you to turn on the device's camera torch (flash). Refer to Camera torch mode (flash) for more information
Deeper URP integration to support ARCore Vulkan
- Added three new APIs to the
XRSessionSubsystem
and provider class which can be extended by AR session providers to handle Universal Render Pipeline rendering events signaled by theARCommandBufferSupportRendererFeature
when it is included in the renderer features list for theUniversal Renderer
asset: - Added a new
ARCommandBufferSupportRendererFeature
which calls the newly exposedXRSessionSubsystem
APIs for integration into Universal Render Pipeline command buffer execution. Refer to Universal Render Pipeline for more information.
XR Simulation improvements
- Added support for simulated bounding box detection in XR Simulation via the Simulated
Bounding component.Box - Added support for EXIF data in Simulation
Camera via the SimulatedSubsystem Exif component.Data - Added camera torch mode support to XR Simulation.
Other API additions
- Added the following values to Status
Code :ProviderUninitialized
,ProviderNotStarted
, andValidationFailure
. These error codes may be returned instead ofStatusCode.UnknownError
for more specific error information. - Added Supported
Utils for easier conversion between the typesSupported
andbool
. - Added additional values provided by Apple RoomPlan to the Bounding
Box flags enum.Classifications
Changes
XR Simulation environments now visible in the Hierarchy window
- Changed XR Simulation so that simulation environments are now visibile in the Hierarchy window, allowing you to inspect the environment while in Play mode.
Warning
There are many possible runtime modifications to XR Simulation environments that are not supported, such as instantiating or destroying GameObjects. As a best practice, use the Hierarchy window to debug XR Simulation environments, and don't modify environments while in Play mode.
AR Occlusion Manager GameObject hierarchy
- Changed the AR Occlusion Manager component to add
[RequireComponent(typeof(Camera))]
. Previously, it was logically required that this component was on the same GameObject as your XR Origin's Camera, but this wasn't as clearly enforced.
AR Occlusion Manager frame timing
- Changed the timing of
AROcclusionManager.frameReceived
so that this event is now invoked duringApplication.onBeforeRender
instead ofMonoBehaviour.Update
. This change is required for compatibility with head-mounted-display (HMD) providers, and may result in improved precision of occlusion frames on all platforms.
Size of XRTextureDescriptor
- As part of the implementation for stereo occlusion support, we added a new
textureType
field to the XRTextureDescriptor struct. If you implement a provider for AR Foundation's camera or occlusion subystems, you should update your native plug-in(s) to match the new struct size.
Deprecated
- Deprecated and replaced the following APIs:
XRTextureDescriptor.dimension
toXRTextureDescriptor.textureType
XRTextureDescriptor
constructor withdimension
parameter toXRTextureType
parameter.AROcclusionFrameEventArgs.propertyNameIds
toAROcclusionFrameEventArgs.gpuTextures
.AROcclusionFrameEventArgs.textures
toAROcclusionFrameEventArgs.gpuTextures
.AROcclusionManager.environmentDepthConfidenceTexture
toAROcclusionManager.TryGetEnvironmentDepthConfidenceTexture
.AROcclusionManager.environmentDepthTexture
toAROcclusionManager.TryGetEnvironmentDepthTexture
.ShaderKeywords
toXRShaderKeywords
XRCameraSubsystem.GetShaderKeywords
toXRCameraSubsystem.GetShaderKeywords2
XRCameraSubsystem.Provider.GetShaderKeywords
toXRCameraSubsystem.Provider.GetShaderKeywords2
XROcclusionSubsystem.GetShaderKeywords
toXROcclusionSubsystem.GetShaderKeywords2
XROcclusionSubsystem.Provider.GetShaderKeywords
toXROcclusinSubsystem.Provider.GetShaderKeywords2
ARCameraFrameEventArgs.disabledShaderKeywords
toARCameraFrameEventArgs.shaderKeywords
ARCameraFrameEventArgs.enabledShaderKeywords
toARCameraFrameEventArgs.shaderKeywords
AROcclusionFrameEventArgs.disabledShaderKeywords
toAROcclusionFrameEventArgs.shaderKeywords
AROcclusionFrameEventArgs.enabledShaderKeywords
toAROcclusionFrameEventArgs.shaderKeywords
For a full list of changes in this version including backwards-compatible bugfixes, refer to the package changelog.