lock camera to when open popup screen

hello there…i have gym environment here which is every equipment inside the environment got button attached…when i click the button it will show popup GUI window…my question is how to prevent my camera view moving around while i explore the popup window?? pic shown is the popup screen…when i want to play the the video while my cursor go into play button i want the camera not moving around follow my cursor…sorry if u cant understand me…my English too bad…help me

here’s my popup gui window script i use to attached at the button “click here”

using UnityEngine;
using System.Collections;

public class eq1 : MonoBehaviour {
	
	// Use this for initialization
	private bool PopUp;
	public string Info;
	public MovieTexture movie_eq1;


	void OnMouseDown()
	{
		PopUp = true;

	}
	
	void DrawInfo()
	{
		//Rect rect = new Rect (20,20, 600, 400);
		Rect close = new Rect (800,20,20,20);
		Rect play = new Rect (100, 360, 50, 25);
		Rect pause = new Rect (150, 360, 50, 25);
		Rect stop = new Rect (200, 360, 50, 25);

			
		if (PopUp)
		{
			//GUI.BeginGroup (new Rect (Screen.width, Screen.height, 800, 400));
			//content
			GUI.Box(new Rect(20, 20, 800, 400), "Lat Pulldown");
			//GUI.Box(rect, Info);
			GUI.DrawTexture(new Rect(30, 50, 400, 300), movie_eq1);
			GUI.Box(new Rect (450,50,300,200), "A weight machine is an exercise machine used

for weight training that uses gravity as the
primary source of resistance and a combination
of simple machines to convey that resistance to
the person using the machine. Each of the simple
machines (pulley, lever, wheel, incline) changes
the mechanical advantage of the overall machine
relative to the weight.");

			//playbutton
			if (GUI.Button(play,"play"))
			{
				//Debug.Log("playvideo");
				//renderer.material.mainTexture = movie_eq1;
				movie_eq1.Play();
			}
			//pause
			if (GUI.Button(pause,"pause"))
			{
				//renderer.material.mainTexture = movie_eq1;
				movie_eq1.Pause();
			}
			//stopbutton
			if (GUI.Button(stop,"stop"))
			{

				movie_eq1.Stop();
			}
			//guiTexture.texture.Play();
			if (GUI.Button(close,"X"))
			{
				PopUp = false;
				movie_eq1.Stop();
				//Debug.Log("close");
			}

			//GUI.EndGroup ();
		}
	}


	void OnGUI()
	{
		DrawInfo();

	}
}

You can disable the screen from moving by putting in a variable that turns on when the popup comes up. Then wherever you have the mouse input code just put:

if(PopUp = false) return;

That is the easiest fix that I can think of at the moment.

p.s. you will also need to make the PopUp variable accessible by both classes.

You should just get the main camera and disable the FPS script if Popup is true. In eq1:

if(Popup) {
Camera.main.GetComponent<YourFPSScript>().enabled = false;
//rest of your code
} 
else
{
Camera.main.GetComponent<YourFPSScript>().enabled = true;
}

how to disable the camera movement while the variable of the camera from the other script which is FPS script??this is the script…

//rotationmouse
		float rotleftright = Input.GetAxis ("Mouse X")*mouseSensitivity;

		transform.Rotate (0, rotleftright, 0);

		verticalRotation -= Input.GetAxis("Mouse Y") * mouseSensitivity;
		verticalRotation = Mathf.Clamp(verticalRotation, -upDownRange, upDownRange);
		Camera.main.transform.localRotation = Quaternion.Euler(verticalRotation, 0, 0);

i have no idea how to disable it and make the class variable can accessible both classes