Skip to content

Commit 8061a80

Browse files
author
David Kline
authored
Merge pull request #2215 from keveleigh/CursorStateFix
[Cursor] Properly track sources that were detected before registering as a global listener
2 parents e36c610 + 5677810 commit 8061a80

File tree

1 file changed

+4
-0
lines changed
  • Assets/HoloToolkit/Input/Scripts/Cursor

1 file changed

+4
-0
lines changed

Assets/HoloToolkit/Input/Scripts/Cursor/Cursor.cs

+4
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ private void OnDestroy()
204204
/// </summary>
205205
protected virtual void RegisterManagers()
206206
{
207+
// This accounts for any input sources that were detected before we register as a global listener below.
208+
visibleHandsCount = (uint)InputManager.Instance.DetectedInputSources.Count;
209+
IsHandVisible = visibleHandsCount > 0;
210+
207211
// Register the cursor as a global listener, so that it can always get input events it cares about
208212
InputManager.Instance.AddGlobalListener(gameObject);
209213

0 commit comments

Comments
 (0)