Screen Width#
Screen / Screen Width
Can Read
Cannot Write
Description#
The width in pixels of the game window
Code#
using System;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Screen Width")]
[Category("Screen/Screen Width")]
[Description("The width in pixels of the game window")]
[Image(typeof(IconFullscreen), ColorTheme.Type.Gray, typeof(BadgeX))]
[Keywords("Resolution", "Pixels", "Window", "Display", "Size", "Horizontal")]
[Serializable]
public class TypeNumberScreenWidth : TypeNumber
{
public override double Get(Args args)
{
return UnityEngine.Screen.width;
}
public override string ToString()
{
return "Screen Width";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}