,How do you make a vr pause menu?

Hello whoever is kind enough to read this. I have recently been working on a vr game for steam vr, using the XR interaction toolkit. I would like to know how to make a canvas that appears when you press the “pause” button, and disappears when you press it again. I would also like to know how to make the worldspace menu appear in front of you.

A good example of what I am talking about is the pause button and menu from Beatsaber. I do not know how to refer to the button as I do not know its name.

Sorry about my poor explanation.
Thank you to anyone who can help!,Hello whoever is kind enough to read this. I have recently been working on a vr game for steam vr, using the XR interaction toolkit. I would like to know how to make a canvas that appears when you press the “pause” button, and disappears when you press it again. I would also like to know how to make the worldspace menu appear in front of you.
A good example of what I am talking about is the pause button and menu from Beatsaber. I do not know how to refer to the button as I do not know its name.
Sorry about my poor explanation.
Thank you to anyone who can help!

To make the game pause you could use Time.timeScale = 0.0f;
And you should also cancel any input to the game.

To display a menu in front of where the player looks you could use this code.

Vector3 vHeadPos = Camera.main.transform.position;
Vector3 vGazeDir = Camera.main.transform.forward;
menuContainer.transform.position = (vHeadPos + vGazeDir * 3.0f) + new Vector3(0.0f, -.40f, 0.0f);
Vector3 vRot = Camera.main.transform.eulerAngles; vRot.z = 0;
menuContainer.transform.eulerAngles = vRot;