Unity在屏幕上绘制一个矩形框
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GUIClass_Test : MonoBehaviour {
// 用于测试GUI
void Start ()
{
}
// Update is called once per frame
void Update ()
{
}
private void OnGUI()
{
GUI.backgroundColor = Color.blue;
GUI.color = Color.yellow;
GUI.Box(new Rect(20, 20, 200, 250), "我帮你绘制了个 Rect Box");
}
}