AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
TapResponder.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using System;
5 using UnityEngine;
6 
7 namespace HoloToolkit.Unity.InputModule.Tests
8 {
13  public class TapResponder : MonoBehaviour, IInputClickHandler
14  {
15  public void OnInputClicked(InputClickedEventData eventData)
16  {
17  // Increase the scale of the object just as a response.
18  gameObject.transform.localScale += 0.05f * gameObject.transform.localScale;
19 
20  eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers.
21  }
22  }
23 }
This class implements IInputClickHandler to handle the tap gesture. It increases the scale of the obj...
Definition: TapResponder.cs:13
void OnInputClicked(InputClickedEventData eventData)
Definition: TapResponder.cs:15
Interface to implement to react to simple click input.
Describes an input event that involves a tap.