Skip to content

Commit 2c59d07

Browse files
authored
Merge pull request #1392 from StephenHodgson/MRTK-Standalone
Fixed standalone compile issues
2 parents 272d5fd + 352fdc7 commit 2c59d07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Assets/HoloToolkit/Input/Scripts/Utilities/AttachToController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
using HoloToolkit.Unity.InputModule;
54
using UnityEngine;
65
#if UNITY_2017_2_OR_NEWER
76
using UnityEngine.XR.WSA.Input;
@@ -55,11 +54,13 @@ protected virtual void OnEnable()
5554
{
5655
SetChildrenActive(false);
5756

57+
#if UNITY_WSA && UNITY_2017_2_OR_NEWER
5858
// Look if the controller has loaded.
5959
if (MotionControllerVisualizer.Instance.TryGetControllerModel(handedness, out controller))
6060
{
6161
AttachElementToController(controller);
6262
}
63+
#endif
6364

6465
MotionControllerVisualizer.Instance.OnControllerModelLoaded += AttachElementToController;
6566
MotionControllerVisualizer.Instance.OnControllerModelUnloaded += DetachElementFromController;

0 commit comments

Comments
 (0)