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].
UpdateTransformPerFrame
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 )