You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
761 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InfoDisplay : MonoBehaviour
{
private string[] _names;
void Start()
{
_names = QualitySettings.names;
int currentQuality = QualitySettings.GetQualityLevel();
Debug.Log($"Quality profile is currently set to: {_names[currentQuality]}");
}
void OnGUI()
{
if (_names == null)
return;
float scale = Screen.height / 720f;
if (scale > Mathf.Epsilon)
{
GUI.matrix = Matrix4x4.Scale(new Vector3(scale, scale, scale));
}
int currentQuality = QualitySettings.GetQualityLevel();
GUILayout.Label(_names[currentQuality]);
}
}