23 lines
390 B
C#
23 lines
390 B
C#
|
|
using System;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class DebugScreenMono: MonoBehaviour
|
||
|
|
{
|
||
|
|
private void OnGUI()
|
||
|
|
{
|
||
|
|
DrawSafeAreaRect();
|
||
|
|
}
|
||
|
|
|
||
|
|
private void DrawSafeAreaRect()
|
||
|
|
{
|
||
|
|
var rect = Screen.safeArea;
|
||
|
|
rect.height = -rect.height;
|
||
|
|
rect.y = Screen.height - rect.y;
|
||
|
|
GUI.Box(rect, "");
|
||
|
|
}
|
||
|
|
|
||
|
|
private void OnDestroy()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|