Skip to content

Commit dd5f140

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents a279162 + 2a328ab commit dd5f140

File tree

5 files changed

+35
-8
lines changed

5 files changed

+35
-8
lines changed

Assets/HoloToolkit/Input/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Input System Diagrams:
33
![alt text](/External/ReadMeImages/InputSystemDiagram.png)
44
![alt text](/External/ReadMeImages/CursorSystemDiagram.PNG)
55

6-
##Scripts that leverage HoloLens input features namely Gaze, Gesture and Voice.
6+
## Scripts that leverage HoloLens input features namely Gaze, Gesture and Voice.
77

88
This contains a fully-featured **input module**, which allows you to handle various types of input and send them to any game object being currently gazed at, or any fallback object. It also includes a **cursor** similar to the HoloLens shell cursor that fully leverages the Unity's animation system.
99

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,14 @@ private void Update()
180180
/// <summary>
181181
/// Override for enable functions
182182
/// </summary>
183-
protected virtual void OnEnable() { }
183+
protected virtual void OnEnable()
184+
{
185+
if (gazeManager)
186+
{
187+
OnFocusedObjectChanged(null, gazeManager.HitObject);
188+
}
189+
OnCursorStateChange(CursorStateEnum.None);
190+
}
184191

185192
/// <summary>
186193
/// Override for disable functions
@@ -190,6 +197,8 @@ protected virtual void OnDisable()
190197
TargetedObject = null;
191198
TargetedCursorModifier = null;
192199
visibleHandsCount = 0;
200+
IsHandVisible = false;
201+
OnCursorStateChange(CursorStateEnum.Contextual);
193202
}
194203

195204
private void OnDestroy()

Assets/HoloToolkit/SpatialUnderstanding/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Edit -> Project Settings -> Player -> Settings for Windows Store -> Publishing S
88
or in your Visual Studio Package.appxmanifest capabilities.
99

1010
### Microsoft HoloLens Documentation
11-
- [Spatial Mapping In Unity](https://developer.microsoft.com/en-us/windows/holographic/spatial_mapping_in_unity)
12-
- [Spatial Understanding In Unity](https://developer.microsoft.com/en-us/windows/holographic/spatial_mapping_in_unity#holotoolkit.spatialunderstanding)
11+
- [Spatial Mapping In Unity](https://developer.microsoft.com/en-us/windows/mixed-reality/spatial_mapping_in_unity)
12+
- [Spatial Understanding In Unity](https://developer.microsoft.com/en-us/windows/mixed-reality/spatial_mapping_in_unity#holotoolkit.spatialunderstanding)
1313

1414
### Case studies
15-
- [Expanding the spatial mapping capabilities of HoloLens](https://developer.microsoft.com/en-us/windows/holographic/case_study_-_expanding_the_spatial_mapping_capabilities_of_hololens)
15+
- [Expanding the spatial mapping capabilities of HoloLens](https://developer.microsoft.com/en-us/windows/mixed-reality/case_study_-_expanding_the_spatial_mapping_capabilities_of_hololens)
1616

1717
### [Plugins](Plugins)
1818
SpatialUnderstanding addon that can be used for topology, object detection, and object placement.

Assets/HoloToolkit/Utilities/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Utilitiy Scripts.
2323
Editor Specific Scripts.
2424

2525
##### AutoConfigureMenu.cs
26-
Configuration options derived from Microsoft Documentation [Configuring a Unity Project for HoloLens](https://developer.microsoft.com/en-us/windows/holographic/unity_development_overview#Configuring_a_Unity_project_for_HoloLens).
26+
Configuration options derived from Microsoft Documentation [Configuring a Unity Project for HoloLens](https://developer.microsoft.com/en-us/windows/mixed-reality/unity_development_overview#Configuring_a_Unity_project_for_HoloLens).
2727

2828
##### AutoConfigureWindow.cs
2929
Base class for auto configuration build windows.

Assets/HoloToolkit/Utilities/Scripts/FpsDisplay.cs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
using UnityEngine;
5+
using UnityEngine.UI;
56

67
namespace HoloToolkit.Unity
78
{
@@ -11,10 +12,14 @@ namespace HoloToolkit.Unity
1112
[RequireComponent(typeof(TextMesh))]
1213
public class FpsDisplay : MonoBehaviour
1314
{
14-
[Tooltip("Reference to Text UI control where the FPS should be displayed.")]
15+
[Tooltip("Reference to TextMesh component where the FPS should be displayed.")]
1516
[SerializeField]
1617
private TextMesh textMesh;
1718

19+
[Tooltip("Reference to uGUI text component where the FPS should be displayed.")]
20+
[SerializeField]
21+
private Text uGUIText;
22+
1823
[Tooltip("How many frames should we consider into our average calculation?")]
1924
[SerializeField]
2025
private int frameRange = 60;
@@ -53,7 +58,15 @@ private void Update()
5358

5459
private void InitBuffer()
5560
{
56-
textMesh = GetComponent<TextMesh>();
61+
if (textMesh == null)
62+
{
63+
textMesh = GetComponent<TextMesh>();
64+
}
65+
66+
if (uGUIText == null)
67+
{
68+
uGUIText = GetComponent<Text>();
69+
}
5770

5871
if (frameRange <= 0)
5972
{
@@ -72,6 +85,11 @@ private void UpdateTextDisplay(int fps)
7285
{
7386
textMesh.text = displayString;
7487
}
88+
89+
if (uGUIText != null)
90+
{
91+
uGUIText.text = displayString;
92+
}
7593
}
7694

7795
private void UpdateFrameBuffer()

0 commit comments

Comments
 (0)