---
tags:
    - "Resolution"
    - "Ratio"
    - "Proportion"
    - "Window"
    - "Display"
    - "Wide"
---

# Screen Aspect

[Screen](index.md) / **Screen Aspect**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

The width of the game window divided by its height

## Code

```cs
using System;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Screen Aspect")]
    [Category("Screen/Screen Aspect")]

    [Description("The width of the game window divided by its height")]
    [Image(typeof(IconAspectRatioFitter), ColorTheme.Type.Gray)]

    [Keywords("Resolution", "Ratio", "Proportion", "Window", "Display", "Wide")]

    [Serializable]
    public class TypeNumberScreenAspect : TypeNumber
    {
        public override double Get(Args args)
        {
            int height = UnityEngine.Screen.height;
            return height != 0 ? UnityEngine.Screen.width / (double) height : 0f;
        }

        public override string ToString()
        {
            return "Screen Aspect";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

```

