- Home /
How to make UI button work on HoloLens?
Hi, I'm new to Unity, I have a question, the button setting I used above only works in Unity, but not in Hololens. I think I need to use a script like this for Hololens, but don't know how to add that GameObject (which has the code to open an url). Thanks!
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using HoloToolkit.Unity.InputModule;
public class Tap : MonoBehaviour, IInputClickHandler
{
public void OnInputClicked(InputClickedEventData eventData)
{
//GameObject
}
}
Answer by Lawlets · Oct 25, 2019 at 09:46 AM
Do you have download and install the MixedRealityToolkit from microsoft ? :)
It really help for Hololens development. It provide you multiple class to handle inputs, camera, SpatialMapping etc... Try it, it will probably help you a lot :)
Your answer
Follow this Question
Related Questions
Highlight images in buttons children 0 Answers
Button Action Triggering Multiple Times Per Click? 1 Answer
Unity multiple button on click 1 Answer
How do i make the perfect button? 1 Answer
How to create a button and delay it 0 Answers