Screen DPI#
Screen / Screen DPI
Can Read
Cannot Write
Description#
The amount of dots per inch of the current display. Zero when it is unknown
Code#
using System;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Screen DPI")]
[Category("Screen/Screen DPI")]
[Description("The amount of dots per inch of the current display. Zero when it is unknown")]
[Image(typeof(IconMobile), ColorTheme.Type.Gray)]
[Keywords("Resolution", "Density", "Pixels", "Inch", "Display", "Device")]
[Serializable]
public class TypeNumberScreenDPI : TypeNumber
{
public override double Get(Args args)
{
return UnityEngine.Screen.dpi;
}
public override string ToString()
{
return "Screen DPI";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}