Class OpenXRFeature.ValidationRule
A Build-time validation rule.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features
Assembly: Unity.XR.OpenXR.dll
Syntax
public class OpenXRFeature.ValidationRule
Constructors
ValidationRule(OpenXRFeature)
Creates a validation rule for an OpenXRFeature.
Declaration
public ValidationRule(OpenXRFeature feature)
Parameters
Type | Name | Description |
---|---|---|
OpenXRFeature | feature | Feature to create validation rule for |
Fields
checkPredicate
Lambda function that returns true if validation passes, false if validation fails.
Declaration
public Func<bool> checkPredicate
Field Value
Type | Description |
---|---|
Func<bool> |
error
If true, failing the rule is treated as an error and stops the build. If false, failing the rule is treated as a warning and it doesn't stop the build. The developer has the option to correct the problem, but is not required to.
Declaration
public bool error
Field Value
Type | Description |
---|---|
bool |
errorEnteringPlaymode
If true, will deny the project from entering playmode in editor. If false, can still enter playmode in editor if this issue isn't fixed.
Declaration
public bool errorEnteringPlaymode
Field Value
Type | Description |
---|---|
bool |
fixIt
Lambda function that fixes the issue, if possible.
Declaration
public Action fixIt
Field Value
Type | Description |
---|---|
Action |
fixItAutomatic
True if the fixIt Lambda function performs a function that is automatic and does not require user input. If your fixIt function requires user input, set fixitAutomatic to false to prevent the fixIt method from being executed during fixAll
Declaration
public bool fixItAutomatic
Field Value
Type | Description |
---|---|
bool |
fixItMessage
Text describing how the issue is fixed, shown in a tooltip.
Declaration
public string fixItMessage
Field Value
Type | Description |
---|---|
string |
helpLink
Optional link that will be opened if the help icon is clicked.
Declaration
public string helpLink
Field Value
Type | Description |
---|---|
string |
helpText
Optional text to display in a help icon with the issue in the validator.
Declaration
public string helpText
Field Value
Type | Description |
---|---|
string |
message
Message describing the rule that will be showed to the developer if it fails.
Declaration
public string message
Field Value
Type | Description |
---|---|
string |