When I enter the trigger of the collider nothing happens. Though the boolean works but the GUI box does not appear im using Unity 5 Hope its not a bug T-T I tried it also with OnMouseDown/Up still no avail
but when I try to use Application.LoadLevel(); it works :((((
using UnityEngine;
using System.Collections;
public class Terminal : MonoBehaviour {
public int winscreenWidth, winscreenHeight;
public bool showWinScreen = false;
void Start()
{
}
void Update()
{
}
public void OnTriggerEnter()
{
if (transform.tag == "Terminal")
{
showWinScreen = true;
//Application.LoadLevel(0);
}
}
public void OnTriggerExit()
{
if (transform.tag == "Terminal")
{
showWinScreen = false;
}
}
void OnGui (){
if (showWinScreen == true) {
Rect winscreenrect = new Rect (Screen.width, Screen.height, winscreenWidth, winscreenHeight);
GUI.Box(winscreenrect, "DAMN");
}
}
}