- Home /
Question by
metalamen96 · Jan 27, 2017 at 06:38 PM ·
vrvirtualaudioplayaudio listener
I can mute in Unity Player but in exported VR Android version I cant
I can't make sound to mute in exported vr version but in Unity Player it's working properly.Any thoughts? thanks using System.Collections; using System.Collections.Generic; using UnityEngine;
public class mutesound : MonoBehaviour, IGvrGazeResponder {
//AudioSource audio;
//public string Nameofscenes;
float timer = 0;
public bool isentered = false;
float Gazeactivationtime = 2;
public Transform target;
public GameObject gameobject;
public GameObject gameobejectsetactive;
void Update () {
if (isentered) {
Temp ();
}
}
void Temp()
{
timer += Time.deltaTime;
if (timer >= Gazeactivationtime) {
AudioListener.volume = 0.0F;
//gameobject.SetActive (false);
//gameobejectsetactive.SetActive (true);
//timer = 0;
//isentered = false;
}
}
public void OnGazeEnter()
{
isentered = true;
//if (timer <= 0f) {
// SceneManager.LoadScene (Nameofscenes, LoadSceneMode.Single);
// timer = 3.00f;
//}
}
public void OnGazeExit()
{
isentered = false;
timer = 0;
// Time.deltaTime = 1;
}
public void OnGazeTrigger()
{
//isentered = true;
}
}
Comment
Your answer
Follow this Question
Related Questions
Change HTC Vive compositor progress panel image 1 Answer
Unable to find libaudiopluginvrunity 1 Answer
How do you disable primary game window rendering in VR so only 0 Answers
HTC Vive on iMac? 0 Answers