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();
}
}