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
ARAnchor
s. - Added XRAnchorSubsystemDescriptor.supportsSynchronousAdd. If you are a provider of the
XRAnchorSubsystem
and you support synchronous anchor creation, you should set your descriptor'ssupportsSynchronousAdd
value 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
ARAnchor
orAREnvironmentProbe
component would not result in a respectiveanchorsChanged
orenvironmentProbesChanged
event 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.imageAssetGuid
API 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
NotAxisAligned
Plane Detection Mode. - Added a constructor to SerializableGuid allowing the creation of
SerializableGuid
s 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
SimulatedTrackedImage
component 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
XRAnchorSubsystem
failed. Instead of retrying the add operation every frame, theARAnchor
component now disables itself after the first failed attempt.
Other API design improvements
- Changed
ARTrackable
to now implement theITrackable
interface, enabling generic API designs when dealing with trackables. - Changed
Promise<T>.OnKeepWaiting()
tovirtual
instead ofabstract
. - Changed
XRPlaneSubsystem.Provider.requestedPlaneDetectionMode
fromvirtual
toabstract
, asARPlaneManager
requires a concrete implementation. - Changed
SubsystemLifecycleManager.GetActiveSubsystemInstance()
fromprotected
toprotected static
, as it does not use any instance members ofSubsystemLifecycleManager
. - Changed the behavior of
SimulationSessionSubsystem.sessionId
to now return a non-empty, unique value when the subsystem is running. You can access the session id usingXRSessionSubsystem.sessionId
. - Changed
SimulationPlaneSubsystem
to respect the currently setPlaneDetectionMode
, detecting updates only from planes that match the current mode. - Changed the behavior of
ARMeshManager
to 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:
XRCameraSubsystemCinfo
toXRCameraSubsystemDescriptor.Cinfo
FaceSubsystemParams
toXRFaceSubsystemDescriptor.Cinfo
XRHumanBodySubsystemCinfo
toXRHumanBodySubsystemDescriptor.Cinfo
XREnvironmentProbeSubsystemCinfo
toXREnvironmentProbeSubsystemDescriptor.Cinfo
XROcclusionSubsystemCinfo
toXROcclusionSubsystemDescriptor.Cinfo
XRAnchorSubsystemDescriptor.Create
toXRAnchorSubsystemDescriptor.Register
XRFaceSubsystemDescriptor.Create
toXRFaceSubsystemDescriptor.Register
XRImageTrackingSubsystemDescriptor.Create
toXRImageTrackingSubsystemDescriptor.Register
XRPlaneSubsystemDescriptor.Create
toXRPlaneSubsystemDescriptor.Register
XRPointCloudSubsystemDescriptor.RegisterDescriptor
toXRPointCloudSubsystemDescriptor.Register
XRRaycastSubsystemDescriptor.RegisterDescriptor
toXRRaycastSubsystemDescriptor.Register
XRSessionSubsystemDescriptor.RegisterDescriptor
toXRSessionSubsystemDescriptor.Register
XRCameraSubsystem.Register
toXRCameraSubsystemDescriptor.Register
XREnvironmentProbeSubsystem.Register
toXREnvironmentProbeSubsystemDescriptor.Register
XRHumanBodySubsystem.Register
toXRHumanBodySubsystemDescriptor.Register
XROcclusionSubsystem.Register
toXROcclusionSubsystemDescriptor.Register
- Deprecated the structs
XRObjectTrackingSubsystemDescriptor.Capabilities
andXRParticipantSubsystemDescriptor.Capabilities
as they had no functionality. - Deprecated
XRObjectTrackingSubsystemDescriptor.Register
andXRParticipantSubsystemDescriptor.Register
overloads that use the now-deprecatedCapabilities
structs, and replaced them with new overloaded versions. - Deprecated and replaced the following APIs:
XRCameraSubsystem.GetMaterialKeywords
toXRCameraSubsystem.GetShaderKeywords
XROcclusionSubsystem.GetMaterialKeywords
toXROcclusionSubsystem.GetShaderKeywords
ARCameraFrameEventArgs.enabledMaterialKeywords
toARCameraFrameEventArgs.enabledShaderKeywords
ARCameraFrameEventArgs.disabledMaterialKeywords
toARCameraFrameEventArgs.disabledShaderKeywords
AROcclusionFrameEventArgs.enabledMaterialKeywords
toAROcclusionFrameEventArgs.enabledShaderKeywords
AROcclusionFrameEventArgs.disabledMaterialKeywords
toAROcclusionFrameEventArgs.disabledShaderKeywords
- Deprecated and replaced the following APIs for consistency:
XRCameraFrame.timestampNs
toXRCameraFrame.TryGetTimestamp
XRCameraFrame.hasTimestamp
toXRCameraFrame.TryGetTimestamp
XRCameraFrame.averageBrightness
toXRCameraFrame.TryGetAverageBrightness
XRCameraFrame.hasAverageBrightness
toXRCameraFrame.TryGetAverageBrightness
XRCameraFrame.averageColorTemperature
toXRCameraFrame.TryGetAverageColorTemperature
XRCameraFrame.hasAverageColorTemperature
toXRCameraFrame.TryGetAverageColorTemperature
XRCameraFrame.colorCorrection
toXRCameraFrame.TryGetColorCorrection
XRCameraFrame.hasColorCorrection
toXRCameraFrame.TryGetColorCorrection
XRCameraFrame.projectionMatrix
toXRCameraFrame.TryGetProjectionMatrix
XRCameraFrame.hasProjectionMatrix
toXRCameraFrame.TryGetProjectionMatrix
XRCameraFrame.displayMatrix
toXRCameraFrame.TryGetDisplayMatrix
XRCameraFrame.hasDisplayMatrix
toXRCameraFrame.TryGetDisplayMatrix
XRCameraFrame.averageIntensityInLumens
toXRCameraFrame.TryGetAverageIntensityInLumens
XRCameraFrame.hasAverageIntensityInLumens
toXRCameraFrame.TryGetAverageIntensityInLumens
XRCameraFrame.exposureDuration
toXRCameraFrame.TryGetExposureDuration
XRCameraFrame.hasExposureDuration
toXRCameraFrame.TryGetExposureDuration
XRCameraFrame.exposureOffset
toXRCameraFrame.TryGetExposureOffset
XRCameraFrame.hasExposureOffset
toXRCameraFrame.TryGetExposureOffset
XRCameraFrame.mainLightIntensityLumens
toXRCameraFrame.TryGetMainLightIntensityLumens
XRCameraFrame.hasMainLightIntensityLumens
toXRCameraFrame.TryGetMainLightIntensityLumens
XRCameraFrame.mainLightColor
toXRCameraFrame.TryGetMainLightColor
XRCameraFrame.hasMainLightColor
toXRCameraFrame.TryGetMainLightColor
XRCameraFrame.mainLightDirection
toXRCameraFrame.TryGetMainLightDirection
XRCameraFrame.hasMainLightDirection
toXRCameraFrame.TryGetMainLightDirection
XRCameraFrame.ambientSphericalHarmonics
toXRCameraFrame.TryGetAmbientSphericalHarmonics
XRCameraFrame.hasAmbientSphericalHarmonics
toXRCameraFrame.TryGetAmbientSphericalHarmonics
XRCameraFrame.cameraGrain
toXRCameraFrame.TryGetCameraGrain
XRCameraFrame.hasCameraGrain
toXRCameraFrame.TryGetCameraGrain
XRCameraFrame.noiseIntensity
toXRCameraFrame.TryGetNoiseIntensity
XRCameraFrame.hasNoiseIntensity
toXRCameraFrame.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 automaticPlacementEnabled instead. |
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.png
as it was unused. - Removed the
Description
attribute from values of several enums, as the attribute was unused:XRCameraFrameProperties
AREnvironmentProbePlacementType
CameraFocusMode
LightEstimationMode
EnvironmentDepthMode
HumanSegmentationDepthMode
HumanSegmentationStencilMode
OcclusionPreferenceMode
For a full list of changes in this version including backwards-compatible bugfixes, refer to the package changelog.