Skip to content

Commit

Permalink
Fixing various warnings with MRTK3 samples (#13)
Browse files Browse the repository at this point in the history
The "EyeLEvelSceneOrigin" warning is a false positive on Editor.  The "InteractorBehaviorControls" warning is ignorable, but easy to fix by removing unused field in sample code.  The "ScrollablePanel" prefab is missing a required component.
  • Loading branch information
AMollis authored Aug 10, 2023
1 parent 1dccbda commit 2edf78e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ public class InteractorBehaviorControls : MonoBehaviour
/// </summary>
public event Action<bool> onGazeToggled;

/// <summary>
/// event triggered when gaze pinch interactors are toggled on/off
/// </summary>
public event Action<bool> onGazePinchToggled;

/// <summary>
/// Enable all interactors
/// </summary>
Expand Down
12 changes: 8 additions & 4 deletions com.microsoft.mrtk.input/Tracking/UnboundedTrackingMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,32 @@ private void OnEnable()
XRGeneralSettings xrSettings = XRGeneralSettings.Instance;
if (xrSettings == null)
{
Debug.LogWarning($"EyeLevelSceneOrigin: XRGeneralSettings is null.");
Debug.LogWarning($"UnboundedTrackingMode: XRGeneralSettings is null.");
return;
}

XRManagerSettings xrManager = xrSettings.Manager;
if (xrManager == null)
{
Debug.LogWarning($"EyeLevelSceneOrigin: XRManagerSettings is null.");
Debug.LogWarning($"UnboundedTrackingMode: XRManagerSettings is null.");
return;
}

XRLoader xrLoader = xrManager.activeLoader;
if (xrLoader == null)
{
Debug.LogWarning($"EyeLevelSceneOrigin: XRLoader is null.");
if (!Application.isEditor)
{
// This warning is only actionable on a XR device.
Debug.LogWarning($"UnboundedTrackingMode: XRLoader is null.");
}
return;
}

m_inputSubsystem = xrLoader.GetLoadedSubsystem<XRInputSubsystem>();
if (m_inputSubsystem == null)
{
Debug.LogWarning($"EyeLevelSceneOrigin: XRInputSubsystem is null.");
Debug.LogWarning($"UnboundedTrackingMode: XRInputSubsystem is null.");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
eventRoutes:
- rid: 4538478793802383364
- rid: 4538478793802383365
- rid: 2896949501434265604
- rid: 2896949501434265605
references:
version: 2
RefIds:
- rid: 4538478793802383364
type: {class: HoverParentEventRoute, ns: MixedReality.Toolkit, asm: MixedReality.Toolkit.Core}
- rid: 4538478793802383365
type: {class: SelectParentEventRoute, ns: MixedReality.Toolkit, asm: MixedReality.Toolkit.Core}
- rid: 2896949501434265604
type: {class: BubbleChildHoverEvents, ns: MixedReality.Toolkit.Experimental, asm: MixedReality.Toolkit.Core}
- rid: 2896949501434265605
type: {class: BubbleChildSelectEvents, ns: MixedReality.Toolkit.Experimental, asm: MixedReality.Toolkit.Core}
--- !u!114 &6449560764903005711
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -189,7 +189,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_InteractionManager: {fileID: 0}
m_Colliders: []
m_Colliders:
- {fileID: 6449560764903005707}
m_InteractionLayerMask:
serializedVersion: 2
m_Bits: 4294967295
Expand Down Expand Up @@ -347,7 +348,11 @@ MonoBehaviour:
m_Calls: []
disabledInteractorTypes: []
scrollRect: {fileID: 6449560764903005705}
dragDivisor: 10
moveLerpTime: 0.001
deadZone: 0.05
cancelSelectDistance: 0.06
pokeDeadZone: 0.01
pokeCancelSelectDistance: 0.02
--- !u!1 &6449560765081929051
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -422,6 +427,7 @@ GameObject:
- component: {fileID: 6449560765461398682}
- component: {fileID: 6449560765461398680}
- component: {fileID: 6449560765461398683}
- component: {fileID: 4225612563592357419}
m_Layer: 5
m_Name: Content
m_TagString: Untagged
Expand All @@ -446,7 +452,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -0.012010826, y: -0.048043303}
m_AnchoredPosition: {x: 0.014124214, y: -0.034411807}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &6449560765461398680
Expand Down Expand Up @@ -487,3 +493,18 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 2
--- !u!114 &4225612563592357419
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6449560765461398685}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab638e81f7d2ca34dbf7e36e0294ae12, type: 3}
m_Name:
m_EditorClassIdentifier:
childrenChanged:
m_PersistentCalls:
m_Calls: []

0 comments on commit 2edf78e

Please sign in to comment.