14 [CustomEditor(typeof(LeapXRServiceProvider))]
22 .FindProperty(
"_temporalWarpingMode")
23 .enumValueIndex == 1; },
24 "_customWarpAdjustment");
27 .FindProperty(
"_deviceOffsetMode")
28 .enumValueIndex == 1; },
34 .FindProperty(
"_deviceOffsetMode")
35 .enumValueIndex == 2; },
49 private void decorateAllowManualTimeAlignment(SerializedProperty property) {
50 bool pcOrAndroidPlatformDetected =
false;
51 string targetPlatform =
"";
53 pcOrAndroidPlatformDetected =
true;
54 targetPlatform =
"Standalone (Desktop)";
56 pcOrAndroidPlatformDetected =
true;
57 targetPlatform =
"Android";
60 if (pcOrAndroidPlatformDetected && property.boolValue) {
61 EditorGUILayout.HelpBox(targetPlatform +
" target platform detected; "
62 +
"manual time alignment should not be enabled under most "
63 +
"circumstances.", MessageType.Warning);
69 if (serializedObject.FindProperty(
"_deviceOffsetMode").enumValueIndex == 2 &&
72 deviceRotation = Quaternion.Inverse(xrProvider.transform.rotation) *
74 Quaternion.Euler(90f, 0f, 0f);
79 Quaternion.Euler(vrProvider.deviceTiltXAxis, 0f, 0f);
82 vrProvider.deviceOffsetYAxis,
83 vrProvider.deviceOffsetZAxis);
void specifyConditionalDrawing(string conditionalName, params string[] dependantProperties)
Specify a list of properties that should only be displayed if the conditional property has a value of...
void addPropertyToFoldout(string propertyName, string foldoutName, bool foldoutStartOpen=false)
Condition the drawing of a property based on the status of a foldout drop-down.
Quaternion deviceRotation
override void OnSceneGUI()
The LeapXRServiceProvider expands on the standard LeapServiceProvider to account for the offset of th...