How to make camera stop moving in pause menu?

I’ve got a pause menu for my game, but the camera still moves in the background making it difficult to click the buttons. Any suggestions?

What you could do is first to make a bool called pause and set it to true/false when you pause/unpause. I recommend a dedicated Pause () function:

void Pause () {
	pause = !pause;
	//and maybe some extra bells and whistles in here
}

Then you’d just have your camera code executed only if pause is false. To make things clearer, you could also move your camera code to another function named, like, CameraUpdate () or something and call it where your camera code used to be.

void Update () {
	if (!pause) CameraUpdate ();
}