Over the weekend, I helped Microsoft as a mentor at HoloHack in Atlanta. While there, it was great watching folks who had never tried to work with the HoloLens before.

This week I received a question from one the members from Learn HoloLens. The issue was hiding an object by air tapping on it utilizing the HoloToolkit.

I created a video to answer the question and you can check it out here:

HideMe.cs

using HoloToolkit.Unity.InputModule;
using UnityEngine;

public class HideMe : MonoBehaviour, IInputClickHandler
{
     public void OnInputClicked(InputClickedEventData eventData)
     {
         gameObject.SetActive(false);
     }
}

ShowAll.cs

using HoloToolkit.Unity.InputModule;
using System.Collections.Generic;
using UnityEngine;

public class ShowAll : MonoBehaviour, IInputHandler
{
     public List<GameObject> GameObects;

    private void Start()
     {
     }

    public void OnInputDown(InputEventData eventData)
     {
     }

    public void OnInputUp(InputEventData eventData)
     {
         foreach(GameObject go in GameObects)
         {
             go.gameObject.SetActive(true);
         }
     }
}

Curious how this site was built?
Watch the 5-minute walkthrough at devnitro.com →

An AI built this blog (but not this post)

This entire blog system (domain models, database, services, UI, auth, etc.) was built by DevNitro on its own in 95 minutes. I recorded every second.

    We respect your privacy. Unsubscribe at any time.