Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

GUI script still shows GUI on different camera

$
0
0
private var enter : boolean; var mySkin : GUISkin; function OnGUI() { GUI.skin = mySkin; if(enter) { GUI.Label(new Rect(Screen.width/2 - 75, Screen.height - 100, 200, 200), "TEXT"); } } function OnTriggerEnter (other : Collider) { if (other.gameObject.tag == "Player") { enter = true; } } function OnTriggerExit (other : Collider) { if (other.gameObject.tag == "Player") { enter = false; } } So I have this script which works pretty well, however, whenever I turn off my first person controller and switch to a different camera the GUI still shows on screen? How would I get it to not show on a different camera?

Viewing all articles
Browse latest Browse all 827

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>