Detailed Description

Provides general information about the screen such as where the corners are in world units. Note: The world origin is in the middle of the screen. The provided world screen origin is the top left corner.

Static Public Member Functions

static void Clear ()
 Causes all settings here to be refreshed on the next update. More...
 
static void Update ()
 Checks if the screen size changed and repaints if it did. Called by UI.Update. More...
 

Static Public Attributes

static int ScreenX
 The screen width in pixels. More...
 
static int ScreenY
 The screen height in pixels. More...
 
static float ScreenYFloat
 The height of the screen in pixels as a float. More...
 
static string ResolutionName
 The current resolution name of the UI. More...
 
static float DepthDepreciation
 How many pixels are gained/lost per unit depth on screen size. Varies with field of view. More...
 
static float ResolutionScale =1f
 The current resolution scale of the UI. More...
 
static Vector2 WorldSize =Vector2.zero
 The height/width of the screen in world units at zero depth. More...
 
static Vector2 WorldPerPixel =Vector2.zero
 The amount of world units per screen pixel at zero depth. More...
 
static Vector3 WorldScreenOrigin =Vector3.zero
 The location of the screen origin (top left corner) in world units at zero depth. More...
 

Properties

static ResolutionInfo Resolution [get, set]
 The current resolution of the UI. More...
 

Static Private Attributes

static ResolutionInfo CurrentResolution
 The current resolution of this document. More...
 

Member Function Documentation

static void PowerUI.ScreenInfo.Clear ( )
inlinestatic

Causes all settings here to be refreshed on the next update.

static void PowerUI.ScreenInfo.Update ( )
inlinestatic

Checks if the screen size changed and repaints if it did. Called by UI.Update.

Member Data Documentation

ResolutionInfo PowerUI.ScreenInfo.CurrentResolution
staticprivate

The current resolution of this document.

float PowerUI.ScreenInfo.DepthDepreciation
static

How many pixels are gained/lost per unit depth on screen size. Varies with field of view.

string PowerUI.ScreenInfo.ResolutionName
static

The current resolution name of the UI.

float PowerUI.ScreenInfo.ResolutionScale =1f
static

The current resolution scale of the UI.

int PowerUI.ScreenInfo.ScreenX
static

The screen width in pixels.

int PowerUI.ScreenInfo.ScreenY
static

The screen height in pixels.

float PowerUI.ScreenInfo.ScreenYFloat
static

The height of the screen in pixels as a float.

Vector2 PowerUI.ScreenInfo.WorldPerPixel =Vector2.zero
static

The amount of world units per screen pixel at zero depth.

Vector3 PowerUI.ScreenInfo.WorldScreenOrigin =Vector3.zero
static

The location of the screen origin (top left corner) in world units at zero depth.

Vector2 PowerUI.ScreenInfo.WorldSize =Vector2.zero
static

The height/width of the screen in world units at zero depth.

Property Documentation

ResolutionInfo PowerUI.ScreenInfo.Resolution
staticgetset

The current resolution of the UI.