Skip to content

Commit

Permalink
Merge pull request #2215 from keveleigh/CursorStateFix
Browse files Browse the repository at this point in the history
[Cursor] Properly track sources that were detected before registering as a global listener
  • Loading branch information
David Kline authored May 30, 2018
2 parents e36c610 + 5677810 commit 8061a80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/HoloToolkit/Input/Scripts/Cursor/Cursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ private void OnDestroy()
/// </summary>
protected virtual void RegisterManagers()
{
// This accounts for any input sources that were detected before we register as a global listener below.
visibleHandsCount = (uint)InputManager.Instance.DetectedInputSources.Count;
IsHandVisible = visibleHandsCount > 0;

// Register the cursor as a global listener, so that it can always get input events it cares about
InputManager.Instance.AddGlobalListener(gameObject);

Expand Down

0 comments on commit 8061a80

Please sign in to comment.