The Android XR SDK is now available in Developer Preview. We want your feedback! Visit our
support page to reach out.
Stay organized with collections
Save and categorize content based on your preferences.
XRPassthroughLayerData
Example of defining a layer data script for a passthrough layer.
This composition layer type will appear in the type dropdown of the Unity.XR.CompositionLayers.CompositionLayer component with what the name is defined as.
Note: it requires a valid MeshFilter with non-empty MeshFilter.mesh for the geometry to create a passthrough layer at runtime.
Summary
Inheritance
Inherits from:
LayerData
Properties
|
Clockwise
|
bool
Gets or sets a value indicating whether to use winding order clockwide of the give mesh from MeshFilter.mesh.
|
Opacity
|
float
Gets or sets opacity of the passthrough texture in the range [0, 1].
|
UpdateTransformPerFrame
|
bool
Gets or sets a value indicating whether to update the mesh transform associated with the passthrough layer per frame.
|
Public functions
|
CopyFrom(LayerData layerData)
|
override void
|
Properties
Clockwise
bool Clockwise
Gets or sets a value indicating whether to use winding order clockwide of the give mesh from MeshFilter.mesh.
Opacity
float Opacity
Gets or sets opacity of the passthrough texture in the range [0, 1].
bool UpdateTransformPerFrame
Gets or sets a value indicating whether to update the mesh transform associated with the passthrough layer per frame.
If false (the default), the mesh transform is created once at creation and then kept constant. Otherwise, the mesh transform is updated once per frame based the relative pose to the current main camera.
Public functions
CopyFrom
override void CopyFrom(
LayerData layerData
)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-12-12 UTC.
[null,null,["Last updated 2024-12-12 UTC."],[],[],null,["# XRPassthroughLayerData Class Reference\n\nXRPassthroughLayerData\n======================\n\nExample of defining a layer data script for a passthrough layer.\n\nThis composition layer type will appear in the type dropdown of the Unity.XR.CompositionLayers.CompositionLayer component with what the name is defined as.\n\nNote: it requires a valid MeshFilter with non-empty MeshFilter.mesh for the geometry to create a passthrough layer at runtime.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: `LayerData`\n\n| ### Properties ||\n|-----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| [Clockwise](#clockwise) | `bool` Gets or sets a value indicating whether to use winding order clockwide of the give mesh from MeshFilter.mesh. |\n| [Opacity](#opacity) | `float` Gets or sets opacity of the passthrough texture in the range \\[0, 1\\]. |\n| [UpdateTransformPerFrame](#updatetransformperframe) | `bool` Gets or sets a value indicating whether to update the mesh transform associated with the passthrough layer per frame. |\n\n| ### Public functions ||\n|----------------------------------------------|-----------------|\n| [CopyFrom](#copyfrom)`(LayerData layerData)` | `override void` |\n\nProperties\n----------\n\n### Clockwise\n\n```c#\nbool Clockwise\n``` \nGets or sets a value indicating whether to use winding order clockwide of the give mesh from MeshFilter.mesh. \n\n### Opacity\n\n```c#\nfloat Opacity\n``` \nGets or sets opacity of the passthrough texture in the range \\[0, 1\\]. \n\n### UpdateTransformPerFrame\n\n```c#\nbool UpdateTransformPerFrame\n``` \nGets or sets a value indicating whether to update the mesh transform associated with the passthrough layer per frame.\n\nIf false (the default), the mesh transform is created once at creation and then kept constant. Otherwise, the mesh transform is updated once per frame based the relative pose to the current main camera.\n\nPublic functions\n----------------\n\n### CopyFrom\n\n```c#\noverride void CopyFrom(\n LayerData layerData\n)\n```"]]