OpenXR 1.13.0 compile error with Composition Layers 0.6.0

OpenXR 1.13.0 fails to compile with Composition Layers 0.6.0 present in the project.

Each composition layer class tries to reference CompositionLayerManager.mainCameraCache but it’s not there:
Library\PackageCache\com.unity.xr.openxr@1.13.0\Runtime\CompositionLayers\OpenXRCubeLayer.cs(55,122): error CS0117: 'CompositionLayerManager' does not contain a definition for 'mainCameraCache'

Additionally, OpenXRLayerProvider is using an internal class:
Library\PackageCache\com.unity.xr.openxr@1.13.0\Runtime\CompositionLayers\OpenXRLayerProvider.cs(285,41): error CS0122: 'DefaultLayerData' is inaccessible due to its protection level

I presume composition layers has a newer unreleased update with these changes, but the version check for XR_COMPOSITION_LAYERS is still looking for > 0.5.0.

EDIT: Bug report confirmed as OXRB-410

1 Like

I’m also seeing this. It’s preventing upgrading to 1.13.

Issue tracker link: Unity Issue Tracker - "error CS0117: 'CompositionLayerManager' does not contain a definition for 'mainCameraCache'" is thrown when using OpenXR with Composition Layers

The bug isn’t fixed in OpenXR, but XR Composition layers 1.0.0 is now available and doesn’t have this issue.