Advertisement
LittleAngel

OverGUI

Oct 19th, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. void OnGUI () {
  2. if (sliderRect.Contains (Event.current.mousePosition)) {
  3. // if (sliderRect.Contains (Input.mousePosition)) {
  4. overGUI = true;
  5. } else {
  6. overGUI = false;
  7. }
  8. }
  9.  
  10. void Update () {
  11. if (!overGUI) {
  12. DoSomething ();
  13. }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement