Here are the errors I'm getting in the Unity console:
Assets/leavingPlayableAreaScript.cs(16,74): error CS1729: The type 'UnityEngine.Rect' does not contain a constructor that takes '3' arguments
Assets/leavingPlayableAreaScript.cs(16,21): error CS1502: The best overloaded method match for `UnityEngine.GUI.DrawTexture(UnityEngine.Rect, UnityEngine.Texture)' has some invalid arguments
Assets/leavingPlayableAreaScript.cs(16,21): error CS1503: Argument '#1' cannot convert 'object' expression to type 'UnityEngine.Rect'
Here is my code:
using UnityEngine;
using System.Collections;
public class leavingPlayableAreaScript : MonoBehaviour
{
public GUIStyle Stylesheet;
public bool inTrigger;
void Update () {
}
void OnGUI()
{
GUI.DrawTexture(new Rect((Screen.width/2) -600, 500, 800), Stylesheet);
}
}