using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour
{
public Texture test;
public Rect rect;
// Use this for initialization
void Start()
{
rect = new Rect(0, 0, 400, 400);
}
// Update is called once per frame
void Update()
{
}
void OnGUI()
{
//GUI.DrawTexture(new Rect(0, 0, 405,397), test);
rect = GUI.Window(0, rect, DoMyWindow, "Test");
}
void DoMyWindow(int windowID)
{
GUI.DrawTexture(new Rect(0, 0, 405, 397), test);
GUI.DragWindow(new Rect(0, 0, 400, 400));
//
}
}