GUI.DragWindow() Refuses to work

I’m not entirely sure what I’m doing wrong, as everything in my code looks right, but I can’t seem to get GUI.DragWindow() to work… If anyone could tell me what I’m doing wrong, I would greatly appreciate it.

using UnityEngine;
using System.Collections;

public class Interface : MonoBehaviour {
	Rect statusWindow = new Rect(15,15,300,300);
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnGUI()
	{
		GUI.Window (0,statusWindow,StatusWindow,"Status");
	}
	void StatusWindow(int windowID)
	{
		GUI.DragWindow(new Rect(0,0,10000,10000));
	}
}

GUI.Window returns the new position for the window, you are merely forcing the window to appear in the same position all of the time. To fix your issue simply change your line to the following:

statusWindow = GUI.Window(0, statusWindow, StatusWindow, "Status");

Edit: You can also just call GUI.DragWindow() with no other parameters.