I’m coding an Equipment screen GUI and so far i’m having problems with square one. my script should display a button on the screen when the “e” key is pressed however it is not doing this.
using UnityEngine;
using System.Collections;
public class Equipment : MonoBehaviour
{
public string Kill = "";
void OnGUI()
{
Display();
}
void Display()
{
if(Input.GetKeyDown("e"))
{
GUI.Button(new Rect(200, 200, 200, 200), Kill);
}
}
}