compositionMode
: CompositionMode |
Defines how the overlay is composited with with the scene layer.
Punch-A-Hole creates a transparent hole in the scene, where the layer is rendered behind and peeks through the hole. Depth Tested renders in front of the scene, using the scene depth to determine where the layer has been occluded.
Signature
CompositionMode compositionMode |
curveRadius
: float |
Radius of the cylindrical surface when shape is set to Curved.
Larger values create less pronounced curves. Only affects curved overlays.
Signature
float curveRadius |
layer
: int |
Unity layer used for rendering overlay content.
Objects on this layer will be included in the overlay rendering. Default is layer 5.
Signature
int layer |
manualRedraw
: bool |
When true, disables automatic rendering and requires manual calls to trigger updates.
Use this for UI that changes infrequently to optimize performance.
Signature
bool manualRedraw |
maxTextureSize
: int |
Maximum texture resolution (width or height) used for the overlay render texture.
Higher values provide better quality but consume more memory and performance. Actual resolution may be lower based on dynamic scaling and aspect ratio.
Signature
int maxTextureSize |
opacity
: DrawMode |
Defines how the overlay is rendered and composited with transparency handling.
Controls whether content is opaque, transparent, or uses alpha clipping.
Signature
DrawMode opacity |
overlapMask
: bool |
When enabled, creates an overlap mask to handle interactions between multiple overlays.
Helps prevent visual artifacts when overlays intersect.
Signature
bool overlapMask |
rectTransform
: RectTransform |
The RectTransform component that defines the canvas size and positioning.
Must be on the same GameObject as the OVROverlayCanvas component.
Signature
RectTransform rectTransform |
renderInterval
: int |
Interval between render updates in frames.
Higher values reduce performance cost but make animations less smooth. Set to 1 for every frame, 2 for every other frame, etc.
Signature
int renderInterval |
renderIntervalFrameOffset
: int |
Frame offset for render interval timing.
Allows staggering updates across multiple overlay canvases to distribute performance load more evenly.
Signature
int renderIntervalFrameOffset |
shape
: CanvasShape |
Geometric shape of the overlay surface.
Flat creates a rectangular quad, while Curved creates a cylindrical surface with configurable radius.
Signature
CanvasShape shape |
superSample
: bool |
Enables super sampling for improved visual quality at the cost of performance.
Renders at 2x resolution internally, then scales down for sharper results. Use sparingly and only when visual quality is critical.
Signature
bool superSample |
rectTransformWorldCenter
: Vector3
[Get] |
Signature
Vector3 rectTransformWorldCenter |
CanvasDepth
: int
[Get] |
Signature
virtual int CanvasDepth |
expensive
: bool
[Get][Set] |
Signature
bool expensive |
IsCanvasPriority
: bool
[Get] |
Signature
virtual bool IsCanvasPriority |
Overlay
: OVROverlay
[Get] |
Signature
OVROverlay Overlay |
overlayEnabled
: bool
[Get][Set] |
Signature
bool overlayEnabled |
overlayType
: OVROverlay.OverlayType
[Get][Set] |
Signature
OVROverlay.OverlayType overlayType |
ShouldShowImposter
: bool
[Get] |
Signature
bool ShouldShowImposter |
ShouldRender
()
|
Signature
virtual bool ShouldRender() Returns bool |
GetViewDistance
()
|
Signature
float? GetViewDistance() Returns float? |
GetViewPriorityScore
()
|
Signature
float? GetViewPriorityScore() Returns float? |
GetWorldIntersectionFromCanvas
(
canvasInstersectionPosition
, intersectionPosition
, intersectionNormal
)
|
Signature
void GetWorldIntersectionFromCanvas(Vector3 canvasInstersectionPosition, out Vector3 intersectionPosition, out Vector3 intersectionNormal) Parameters canvasInstersectionPosition: Vector3intersectionPosition: out Vector3intersectionNormal: out Vector3Returns void |
SetCanvasLayer
(
layer
, forceUpdate
)
|
Signature
void SetCanvasLayer(int layer, bool forceUpdate) Parameters layer: intforceUpdate: boolReturns void |
SetFrameDirty
()
|
Signature
void SetFrameDirty() Returns void |
TransformRay
(
ray
)
|
Signature
override Ray TransformRay(Ray ray) Parameters ray: RayReturns override Ray |
UpdateOverlaySettings
()
|
Signature
void UpdateOverlaySettings() Returns void |
| Member | Value | Description |
|---|---|---|
Opaque | 0 |
Renders content as fully opaque without transparency support.
|
OpaqueWithClip | 1 |
Renders opaque content with alpha clipping support for sharp edges.
|
Transparent | 2 |
Renders content with full transparency and alpha blending support.
|
TransparentDefaultAlpha | 2 |
Legacy transparency mode. Use Transparent instead.
|
TransparentCorrectAlpha | 3 |
Legacy transparency mode with corrected alpha. Use Transparent instead.
|
AlphaToMask | 4 |
Converts alpha values to binary mask for sharp transparency cutoffs.
|
| Member | Description |
|---|---|
Flat |
Renders on a flat rectangular surface.
|
Curved |
Renders on a curved cylindrical surface with configurable radius.
|
| Member | Value | Description |
|---|---|---|
PunchAHole | OVROverlay.OverlayType.Underlay |
Creates a hole in the scene where the overlay appears, allowing overlay content to show through.
This composition mode is more efficient on the GPU, and handles occlusion by transparent objects more correctly, however artifacts may appear around the edges of the layer, and fine edge details will be lost.
|
DepthTested | OVROverlay.OverlayType.Overlay |
Renders overlay with depth testing against the scene's depth buffer, The appearance of this layer's edges will be crisper without artifacts, however, the GPU cost is slightly higher, and occlusions by objects in the scene may show aliased edges and MSAA artifacts.
Additionally, transparent objects will either not occlude the layer, or not blend correctly, depending on whether they write depth.
|