API reference
API reference
Select your platform
No SDKs available
No versions available

OVRMetricDefinition Class

Modifiers: final
Defines the metadata for a custom performance metric displayed in the OVR Metrics overlay. Each definition specifies the metric's display name, grouping, value range, and whether to show its graph and numeric readout. Create instances and register them via OVRMetricsFeature to expose application-specific metrics (frame budget, entity count, network latency) in the runtime performance dashboard.

Signature

data class OVRMetricDefinition(val Name: String, val DisplayName: String, val Group: String? = null, val RangeMin: Int = 0, val RangeMax: Int = 100, val ShowGraph: Boolean = true, val ShowStat: Boolean = true)

Constructors

OVRMetricDefinition ( Name , DisplayName , Group , RangeMin , RangeMax , ShowGraph , ShowStat )
Signature
constructor(Name: String, DisplayName: String, Group: String? = null, RangeMin: Int = 0, RangeMax: Int = 100, ShowGraph: Boolean = true, ShowStat: Boolean = true)
Parameters
Name: String  Internal identifier for the metric, used as the key when reporting values. Must be unique within the metrics group.
DisplayName: String  Human-readable label shown in the OVR Metrics overlay UI. Should be concise but descriptive, e.g. 'Frame Budget (ms)'.
Group: String?  Optional grouping label that organizes related metrics together in the overlay. Metrics with the same group appear in the same section.
RangeMin: Int  Minimum value for the metric's graph axis. Values reported below this floor are clamped for display purposes. Defaults to 0.
RangeMax: Int  Maximum value for the metric's graph axis. Values reported above this ceiling are clamped for display purposes. Defaults to 100.
ShowGraph: Boolean  Whether to render a real-time line graph for this metric in the overlay. Useful for tracking values that change over time. Defaults to true.
ShowStat: Boolean  Whether to display the current numeric value as a text readout in the overlay. Useful for instantaneous readings. Defaults to true.

Properties

DisplayName : String
[Get]
Human-readable label shown in the OVR Metrics overlay UI. Should be concise but descriptive, e.g. 'Frame Budget (ms)'.
Signature
val DisplayName: String
Group : String?
[Get]
Optional grouping label that organizes related metrics together in the overlay. Metrics with the same group appear in the same section.
Signature
val Group: String? = null
Name : String
[Get]
Internal identifier for the metric, used as the key when reporting values. Must be unique within the metrics group.
Signature
val Name: String
RangeMax : Int
[Get]
Maximum value for the metric's graph axis. Values reported above this ceiling are clamped for display purposes. Defaults to 100.
Signature
val RangeMax: Int = 100
RangeMin : Int
[Get]
Minimum value for the metric's graph axis. Values reported below this floor are clamped for display purposes. Defaults to 0.
Signature
val RangeMin: Int = 0
ShowGraph : Boolean
[Get]
Whether to render a real-time line graph for this metric in the overlay. Useful for tracking values that change over time. Defaults to true.
Signature
val ShowGraph: Boolean = true
ShowStat : Boolean
[Get]
Whether to display the current numeric value as a text readout in the overlay. Useful for instantaneous readings. Defaults to true.
Signature
val ShowStat: Boolean = true