What's new in version 6.0
New features
Bounding boxes
- Added an API for provider plug-ins to implement the detection and tracking of 3D bounding boxes. Refer to Bounding box detection for more information.
Persistent anchors
- Added AR Foundation API definitions for persistent anchors. Provider plug-ins can implement these methods, which allow you to save anchors during an AR session and re-load them during subsequent sessions:
Image Stabilization
- Added support for Image Stabilization, which helps stabilize shaky video from the camera. Refer to AR Camera Manager component for more information.
XR Simulation occlusion
- Added support for occlusion to XR Simulation, allowing you to test occlusion without deploying to device.
XR Simulation light estimation
- Added support for light estimation in SimulationCameraSubsystem. Add the new SimulatedLight component to any lights in your simulation environment.
Build AssetBundles window
- Added an editor window in Assets > AR Foundation > Build AssetBundles that you can use to build AssetBundles containing XRReferenceImageLibrary objects.
Asynchronous anchor creation
- Added XRAnchorSubsystem.Provider.TryAddAnchorAsync, backed by the new Awaitable<T> class introduced in Unity 2023.1. The default implementation will forward calls to the synchronous TryAddAnchor method and return its results.
- Added ARAnchorManager.TryAddAnchorAsync to asynchronously create
ARAnchors. - Added XRAnchorSubsystemDescriptor.supportsSynchronousAdd. If you are a provider of the
XRAnchorSubsystemand you support synchronous anchor creation, you should set your descriptor'ssupportsSynchronousAddvalue totrue.
Multiple classifications for planes
- Added support for planes to have multiple semantic labels via the PlaneClassifications flags enum, ARPlane.classifications, and BoundedPlane.classifications.
Added
Generic trackablesChanged event
- Added a generic ARTrackableManager.trackablesChanged event to replace all previous trackables-changed events (
ARPlaneManager.planesChanged, etc). This simplifies the code needed to work across all managers.- This new event can be used in the Inspector.
- This new event also fixes an issue where destroying an
ARAnchororAREnvironmentProbecomponent would not result in a respectiveanchorsChangedorenvironmentProbesChangedevent invocation.
- Added a generic ARTrackablesChangedEventArgs to replace all previous trackables-changed event arguments structs.
Platform-specific error codes and success codes
- Added XRResultStatus, a new way for AR Foundation to provide status information for completed operations. Provider plug-ins can add extension methods to this type to give users access to platform-specific error codes and success codes.
More consistent image tracking in XR Simulation
- Added
SimulatedTrackedImage.imageAssetGuidAPI to make it possible for XR Simulation to identify images even if Keep Texture at Runtime is disabled in the reference image library.
Support for concave plane boundary meshes
- Added new API ARPlaneMeshGenerator.TryGenerateMesh to support generating meshes of simple polygons, i.e. concave and convex polygons.
Render graph
- Added support for the Universal Render Pipeline Render Graph introduced in URP 17.
Other API design improvements
- Added the following subsystem descriptor registration methods for consistency with other descriptors:
- Added XRCameraSubsystem.GetShaderKeywords and XROcclusionSubsystem.GetShaderKeywords. Both return a new read-only ShaderKeywords struct.
- Added
NotAxisAlignedPlane Detection Mode. - Added a constructor to SerializableGuid allowing the creation of
SerializableGuids with aSystem.Guid.
Changed
Minimum Unity Editor version
- Upgraded minimum Unity Editor version from 2021.2 to 6000.0. Refer to the official Unity 6 New Naming Convention announcement for more information.
XR Simulation image tracking workflow
- Changed the
SimulatedTrackedImagecomponent to render a textured mesh of its image, allowing you to see the image in the Scene view and Game view without requiring additional GameObjects. - Removed now-unnecessary Quad GameObjects from the DefaultSimulationEnvironment.
Navigation Input Actions in XR Simulation
- Changed XR Simulation navigation controls to be bound to configurable Input Actions instead of hard-coded to WASD keys. You can configure these Input Actions in the XR Simulation Preferences window.
ARAnchor life cycle
- Changed the life cycle behavior of ARAnchor in the event that adding the anchor to the
XRAnchorSubsystemfailed. Instead of retrying the add operation every frame, theARAnchorcomponent now disables itself after the first failed attempt.
Other API design improvements
- Changed
ARTrackableto now implement theITrackableinterface, enabling generic API designs when dealing with trackables. - Changed
Promise<T>.OnKeepWaiting()tovirtualinstead ofabstract. - Changed
XRPlaneSubsystem.Provider.requestedPlaneDetectionModefromvirtualtoabstract, asARPlaneManagerrequires a concrete implementation. - Changed
SubsystemLifecycleManager.GetActiveSubsystemInstance()fromprotectedtoprotected static, as it does not use any instance members ofSubsystemLifecycleManager. - Changed the behavior of
SimulationSessionSubsystem.sessionIdto now return a non-empty, unique value when the subsystem is running. You can access the session id usingXRSessionSubsystem.sessionId. - Changed
SimulationPlaneSubsystemto respect the currently setPlaneDetectionMode, detecting updates only from planes that match the current mode. - Changed the behavior of
ARMeshManagerto recalculate normals on a mesh if normals were requested and the provider did not calculate them.
Deprecated
All deprecated APIs are replaced by new API additions.
- Deprecated the following APIs, all of which are replaced by ARTrackableManager.trackablesChanged:
- ARAnchorManager.anchorsChanged
- ARAnchorManager.OnTrackablesChanged
- AREnvironmentProbeManager.environmentProbesChanged
- AREnvironmentProbeManager.OnTrackablesChanged
- ARFaceManager.facesChanged
- ARFaceManager.OnTrackablesChanged
- ARHumanBodyManager.humanBodiesChanged
- ARHumanBodyManager.OnTrackablesChanged
- ARParticipantManager.participantsChanged
- ARParticipantManager.OnTrackablesChanged
- ARPlaneManager.planesChanged
- ARPlaneManager.OnTrackablesChanged
- ARPointCloudManager.pointCloudsChanged
- ARPointCloudManager.OnTrackablesChanged
- ARTrackedImageManager.trackedImagesChanged
- ARTrackedImageManager.OnTrackablesChanged
- ARTrackedObjectManager.trackedObjectsChanged
- ARTrackedObjectManager.OnTrackablesChanged
- ARTrackableManager.OnTrackablesChanged
- Deprecated the following structs, all of which are replaced by ARTrackablesChangedEventArgs:
- Deprecated the following Visual Scripting nodes, and replaced them with new updated versions. To upgrade a graph containing a deprecated node, delete the node from your graph and replace it with the new version of the node.
- Deprecated and replaced the following APIs:
- PlaneClassification to PlaneClassifications
- ARPlane.classification to ARPlane.classifications
- BoundedPlane.classification to BoundedPlane.classifications
- BoundedPlane constructor to new constructor overload.
- Deprecated and replaced the following APIs for consistency with other subsystems:
XRCameraSubsystemCinfotoXRCameraSubsystemDescriptor.CinfoFaceSubsystemParamstoXRFaceSubsystemDescriptor.CinfoXRHumanBodySubsystemCinfotoXRHumanBodySubsystemDescriptor.CinfoXREnvironmentProbeSubsystemCinfotoXREnvironmentProbeSubsystemDescriptor.CinfoXROcclusionSubsystemCinfotoXROcclusionSubsystemDescriptor.CinfoXRAnchorSubsystemDescriptor.CreatetoXRAnchorSubsystemDescriptor.RegisterXRFaceSubsystemDescriptor.CreatetoXRFaceSubsystemDescriptor.RegisterXRImageTrackingSubsystemDescriptor.CreatetoXRImageTrackingSubsystemDescriptor.RegisterXRPlaneSubsystemDescriptor.CreatetoXRPlaneSubsystemDescriptor.RegisterXRPointCloudSubsystemDescriptor.RegisterDescriptortoXRPointCloudSubsystemDescriptor.RegisterXRRaycastSubsystemDescriptor.RegisterDescriptortoXRRaycastSubsystemDescriptor.RegisterXRSessionSubsystemDescriptor.RegisterDescriptortoXRSessionSubsystemDescriptor.RegisterXRCameraSubsystem.RegistertoXRCameraSubsystemDescriptor.RegisterXREnvironmentProbeSubsystem.RegistertoXREnvironmentProbeSubsystemDescriptor.RegisterXRHumanBodySubsystem.RegistertoXRHumanBodySubsystemDescriptor.RegisterXROcclusionSubsystem.RegistertoXROcclusionSubsystemDescriptor.Register
- Deprecated the structs
XRObjectTrackingSubsystemDescriptor.CapabilitiesandXRParticipantSubsystemDescriptor.Capabilitiesas they had no functionality. - Deprecated
XRObjectTrackingSubsystemDescriptor.RegisterandXRParticipantSubsystemDescriptor.Registeroverloads that use the now-deprecatedCapabilitiesstructs, and replaced them with new overloaded versions. - Deprecated and replaced the following APIs:
XRCameraSubsystem.GetMaterialKeywordstoXRCameraSubsystem.GetShaderKeywordsXROcclusionSubsystem.GetMaterialKeywordstoXROcclusionSubsystem.GetShaderKeywordsARCameraFrameEventArgs.enabledMaterialKeywordstoARCameraFrameEventArgs.enabledShaderKeywordsARCameraFrameEventArgs.disabledMaterialKeywordstoARCameraFrameEventArgs.disabledShaderKeywordsAROcclusionFrameEventArgs.enabledMaterialKeywordstoAROcclusionFrameEventArgs.enabledShaderKeywordsAROcclusionFrameEventArgs.disabledMaterialKeywordstoAROcclusionFrameEventArgs.disabledShaderKeywords
- Deprecated and replaced the following APIs for consistency:
XRCameraFrame.timestampNstoXRCameraFrame.TryGetTimestampXRCameraFrame.hasTimestamptoXRCameraFrame.TryGetTimestampXRCameraFrame.averageBrightnesstoXRCameraFrame.TryGetAverageBrightnessXRCameraFrame.hasAverageBrightnesstoXRCameraFrame.TryGetAverageBrightnessXRCameraFrame.averageColorTemperaturetoXRCameraFrame.TryGetAverageColorTemperatureXRCameraFrame.hasAverageColorTemperaturetoXRCameraFrame.TryGetAverageColorTemperatureXRCameraFrame.colorCorrectiontoXRCameraFrame.TryGetColorCorrectionXRCameraFrame.hasColorCorrectiontoXRCameraFrame.TryGetColorCorrectionXRCameraFrame.projectionMatrixtoXRCameraFrame.TryGetProjectionMatrixXRCameraFrame.hasProjectionMatrixtoXRCameraFrame.TryGetProjectionMatrixXRCameraFrame.displayMatrixtoXRCameraFrame.TryGetDisplayMatrixXRCameraFrame.hasDisplayMatrixtoXRCameraFrame.TryGetDisplayMatrixXRCameraFrame.averageIntensityInLumenstoXRCameraFrame.TryGetAverageIntensityInLumensXRCameraFrame.hasAverageIntensityInLumenstoXRCameraFrame.TryGetAverageIntensityInLumensXRCameraFrame.exposureDurationtoXRCameraFrame.TryGetExposureDurationXRCameraFrame.hasExposureDurationtoXRCameraFrame.TryGetExposureDurationXRCameraFrame.exposureOffsettoXRCameraFrame.TryGetExposureOffsetXRCameraFrame.hasExposureOffsettoXRCameraFrame.TryGetExposureOffsetXRCameraFrame.mainLightIntensityLumenstoXRCameraFrame.TryGetMainLightIntensityLumensXRCameraFrame.hasMainLightIntensityLumenstoXRCameraFrame.TryGetMainLightIntensityLumensXRCameraFrame.mainLightColortoXRCameraFrame.TryGetMainLightColorXRCameraFrame.hasMainLightColortoXRCameraFrame.TryGetMainLightColorXRCameraFrame.mainLightDirectiontoXRCameraFrame.TryGetMainLightDirectionXRCameraFrame.hasMainLightDirectiontoXRCameraFrame.TryGetMainLightDirectionXRCameraFrame.ambientSphericalHarmonicstoXRCameraFrame.TryGetAmbientSphericalHarmonicsXRCameraFrame.hasAmbientSphericalHarmonicstoXRCameraFrame.TryGetAmbientSphericalHarmonicsXRCameraFrame.cameraGraintoXRCameraFrame.TryGetCameraGrainXRCameraFrame.hasCameraGraintoXRCameraFrame.TryGetCameraGrainXRCameraFrame.noiseIntensitytoXRCameraFrame.TryGetNoiseIntensityXRCameraFrame.hasNoiseIntensitytoXRCameraFrame.TryGetNoiseIntensity
- Deprecated and replaced ARPlaneMeshGenerators with
ARPlaneMeshGenerator.
Removed
- Removed the following APIs which were previously deprecated. Refer to the recommended upgrade guidance if your code used any of these APIs.
| Removed API | Upgrade recommendation |
|---|---|
ARAnchorManager.AddAnchor |
Add an anchor using AddComponent<ARAnchor> or ARAnchorManager.TryAddAnchorAsync |
ARAnchorManager.RemoveAnchor |
Call Destroy() on the ARAnchor component to remove it. |
ARCameraManager.focusMode |
Use autoFocusEnabled or autoFocusRequested instead. |
ARCamerManager.lightEstimationMode |
Use currentLightEstimation or requestedLightEstimation instead. |
ARCamerManager.TryGetLatestImage |
Use TryAcquireLatestCpuImage instead. |
AREnvironmentProbeManager.automaticPlacement |
Use automaticPlacementRequested or automaticPlacementEnabledinstead. |
AREnvironmentProbeManager.environmentTextureHDR |
Use environmentTextureHDRRequested or environmentTextureHDREnabled instead. |
AREnvironmentProbeManager.AddEnvironmentProbe |
Add an environment probe using AddComponent<AREnvironmentProbe>. |
AREnvironmentProbeManager.RemoveEnvironmentProbe |
Call AREnvironmentProbe.Destroy() to remove it. |
ARFaceManager.maximumFaceCount |
Use requestedMaximumFaceCount or currentMaximumFaceCount instead. |
ARHumanBodyManager.humanBodyPose2DEstimationEnabled |
Use pose2DEnabled or pose2DRequested instead. |
ARHumanBodyManager.humanBodyPose3DEstimationEnabled |
Use pose3DEnabled or pose3DRequested instead. |
ARHumanBodyManager.humanBodyPose3DScaleEstimationEnabled |
Use pose3DScaleEstimationRequested or pose3DScaleEstimationRequested instead. |
AROcclusionManager.humanSegmentationStencilMode |
Use requestedSegmentationStencilMode or currentSegmentationStencilMode instead. |
AROcclusionManager.humanSegmentationDepthMode |
Use requestedSegmentationDepthMode or currentSegmentationDepthMode instead. |
ARPlaneManager.detectionMode |
Use requestedDetectionMode or currentDetectionMode instead. |
ARSession.matchFrameRate |
Use matchFrameRateRequested or matchFrameRateEnabled instead. |
ARTrackableManager.sessionOrigin |
Use origin instead. |
ARTrackedImageManager.maxNumberOfMovingImages |
Use requestedMaxNumberOfMovingImages or currentMaxNumberOfMovingImages instead. |
MutableRuntimeReferenceImageLibrary.ScheduleAddImageJob |
Use ScheduleAddImageWithValidationJob instead. |
XRAnchorSubsystemDescriptor.Cinfo.subsystemImplementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XRCameraSubsystem.TryGetLatestImage |
Use TryAcquireLatestCpuImage instead. |
XRCameraSubsystemCinfo.implementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XREnvironmentProbeSubsystemCinfo.implmentationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
FaceSubsystemParams.subsystemImplementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XRHumanBodySubsystemCinfo.implementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XRImageTrackingSubsystem.Cinfo.subsystemImplementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XROcclusionSubsystemCinfo.implementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XROcclusionSubsystemCinfo.supportsHumanSegmentationStencilImage |
Use humanSegmentationStencilImageSupportedDelegate instead. |
XROcclusionSubsystemCinfo.supportsHumanSegmentationDepthImage |
Use humanSegmentationDepthImageSupportedDelegate instead. |
XROcclusionSubsystemCinfo.queryForSupportsEnvironmentDepthImage |
Use environmentDepthImageSupportedDelegate instead. |
XROcclusionSubsystemCinfo.queryForSupportsEnvironmentDepthConfidenceImage |
Use environmentDepthConfidenceImageSupportedDelegate instead. |
XRPlaneSubsystemDescriptor.Cinfo.subsystemImplementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XRPointCloudSubsystemDescriptor.Cinfo.implementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XRRaycastSubsystemDescriptor.Cinfo.subsystemImplementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XRReferenceObjectLibrary.indexOf |
Use IndexOf instead. |
XRSessionSubsystem.subsystemImplementationType |
Use providerType and, optionally, subsystemTypeOverride instead. |
XRSubsystem |
Use UnityEngine.SubsystemsImplementation.SubsystemWithProvider instead. |
- Removed the image file
/Editor/Icons/ARVR@4x.pngas it was unused. - Removed the
Descriptionattribute from values of several enums, as the attribute was unused:XRCameraFramePropertiesAREnvironmentProbePlacementTypeCameraFocusModeLightEstimationModeEnvironmentDepthModeHumanSegmentationDepthModeHumanSegmentationStencilModeOcclusionPreferenceMode
For a full list of changes in this version including backwards-compatible bugfixes, refer to the package changelog.