Namespace Unity.XR.CompositionLayers.Services
Classes
CompositionLayerManager
Singleton manger for defined composition layers and updating layer information for a given ILayerProvider instance.
The expected lifecycle of a layer in relation to the manager is as follows: | Composition Layer | Manager | Reported State | | -- | -- | -- | | Awake | CompositionLayerCreated(CompositionLayer) | Created | | OnEnable | CompositionLayerEnabled(CompositionLayer) | Modified, Active | | OnDisable | CompositionLayerDisabled(CompositionLayer) | Modified | | OnDestroy | CompositionLayerDestroyed(CompositionLayer) | Removed |
The manager will report the set of created, removed, modified and active layers to the s_LayerProvider instance on every Update call. These lists are defined to contain layers a follows:
Created : Any layer that has just been created. Populated on calls to CompositionLayerCreated(CompositionLayer).
This list is ephemeral and is cleared after each call to the layer provider.
Removed : Any layer that has been destroyed will cause a call to CompositionLayerDestroyed(CompositionLayer). The layer will be removed from the created, active and modified lists and added to the removed list.
This list is ephemeral and is cleared after each call to the layer provider.
Modified : Any layer that has changed in some way be added to this list. A modification could be a property change, or the layer being re-activated or de-activated. A layer is only added to this list if it isn't already in the Created or Removed lists.
This list is ephemeral and is cleared after each call to the layer provider.
A layer will only exist in one of Removed, Created or Modified on any call to the s_LayerProvider.
Active : This list contains the current set of active layers for this update call to the s_LayerProvider. Layers passed to CompositionLayerEnabled(CompositionLayer) will be added to this list, and layers passed to CompositionLayerDisabled(CompositionLayer) or CompositionLayerDestroyed(CompositionLayer) will be removed from this list.
CompositionLayerUtils
Collection of utility methods that are useful for CompositionLayer.
PlatformManager
For managing active PlatformProvider.
Structs
CompositionLayerManager.LayerInfo
Information about composition layers registered with the manager.