09-08-2022 01:56 AM
I tried the following source code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Pausa4 : MonoBehaviour
{
public bool bPause;
public Text pausat;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (OVRManager.hasInputFocus && OVRManager.hasVrFocus)
{
PauseGame();
}
else
{
ContinueGame();
}
}
private void PauseGame()
{
Time.timeScale = 0;
pausat.text = "Pausa :OFF";
bPause = true;
AudioListener.pause = false;
//Disable stuff that still work while timescale is set to 0
}
private void ContinueGame()
{
Time.timeScale = 1;
pausat.text = "Pausa :On";
bPause = false;
AudioListener.pause = true;
//enable the stuff again
}
}
On unity 2021 with the latest libraries or oculus it works. But once completed, if I put the viewer on the table, it pauses and if I wear it, the application remains paused.
How can I solve.
A thousand thanks
Did this answer your question? If it didn’t, use our search to find other topics or create your own and other members of the community will help out.
If you need an agent to help with your Meta device, please contact our store support team here.
Having trouble with a Facebook or Instagram account? The best place to go for help with those accounts is the Facebook Help Center or the Instagram Help Center. This community can't help with those accounts.
Check out some popular posts here:
Getting Help from the Meta Quest Community
Tips and Tricks: Charging your Meta Quest Headset