docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ILayerProvider

    Interface that defines the API for an ILayerProvider.

    Namespace: Unity.XR.CompositionLayers.Provider
    Assembly: Unity.XR.CompositionLayers.dll
    Syntax
    public interface ILayerProvider

    Methods

    CleanupState()

    Tell the provider to clean up all layer state it maintains.

    Declaration
    void CleanupState()

    LateUpdate()

    Called by the CompositionLayerManager to pass calls to LateUpdate through to the ILayerProvider.

    Declaration
    void LateUpdate()

    SetInitialState(List<LayerInfo>)

    Sets the layer provider state on first assignment to the CompositionLayerManager.

    Declaration
    void SetInitialState(List<CompositionLayerManager.LayerInfo> layers)
    Parameters
    Type Name Description
    List<CompositionLayerManager.LayerInfo> layers

    The list of all currently known CompositionLayer instances, regardless of active state.

    UpdateLayers(List<LayerInfo>, List<int>, List<LayerInfo>, List<LayerInfo>)

    Called by the CompositionLayerManager to tell the instance of ILayerProvider about the current state of layers it is managing.

    Declaration
    void UpdateLayers(List<CompositionLayerManager.LayerInfo> createdLayers, List<int> removedLayers, List<CompositionLayerManager.LayerInfo> modifiedLayers, List<CompositionLayerManager.LayerInfo> activeLayers)
    Parameters
    Type Name Description
    List<CompositionLayerManager.LayerInfo> createdLayers

    The list of layers that were just created. Any layer in this list may be in the activeLayers list if it is activated in the same frame. Any layer in this list should not be in modifiedLayers or removedLayers. This list is ephemeral and cleared after each call.

    List<int> removedLayers

    The list of layers that are no longer being managed. Any layer in this list should not be in the createdLayers, modifiedLayers, or activeLayers lists. This list is ephemeral and cleared after each call.

    List<CompositionLayerManager.LayerInfo> modifiedLayers

    The list of layers that have been recently modified. Any layer in this list may also be in the activeLayers list. Any layer in this list should not be in createdLayers or removedLayers. This list is ephemeral and cleared after each call.

    List<CompositionLayerManager.LayerInfo> activeLayers

    The list of layers currently active within the scene. Layers in this list may also be in the createdLayers or modifiedLayers lists if they became active in the same frame.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)