Hey guys the GUI Buttons are not Displaying in the currently creating a Test Game, I am a current Newbie at using Unity and a C#, C++ Programmer whois just learning the Documentation. Here is the Code in C#
using UnityEngine;
using System.Collections;
public class Pause_Menu : MonoBehaviour
{
bool paused = false;
void Update()
{
if (Input.GetButtonDown("Pause"))
{
if (!paused)
{
Time.timeScale = 0;
paused = true;
}
else
{
Time.timeScale = 1;
paused = false;
OnGui();
}
}
}
void OnGui()
{
if (paused)
{
if (GUI.Button(new Rect(10, 50, 100, 30), "Resume"))
{
Time.timeScale = 1.0f;
paused = false;
}
if (GUI.Button(new Rect(10, 90, 100, 30), "options"))
{
}
if (GUI.Button(new Rect(10, 130, 100, 30), "Quit"))
{
}
}
}
}
The Game Pauses Correctly the Buttons are not showing up when I it Pauses though