Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

GazeHandler

Hi,
I'm a newbie in HoloLens and trying to create an app in which user can mute and unmute two video clips by using gaze. I've followed some similar examples, like this but because I'm using newer versions of unity and Holo Toolkit, those examples are not quite useful (I have unity 2017.3.1p4 and HoloToolkit-Unity-2017.2.1.3). I have this GazeHandler class:

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

public class GazeHandler : Singleton<GazeHandler>
{
    // Use this for initialization
    void Start()
    {
    }

    // Update is called once per frame
    void Update()
    {
    }

    void OnGazeEnter()
    {
        var com = gameObject.GetComponent<AudioSource>();
        com.mute = false;
    }

    void OnGazeExit()
    {
        var com = gameObject.GetComponent<AudioSource>();
        com.mute = true;
    }
}

But I don't know where in the GazeManager.cs should I change to get that use my handler. Does that make sense?

Thanks

Sign In or Register to comment.