Click or drag to resize

OSGetScreenScale Method

Return the scale factor of the specified screen by index. If screen is [/code]-1[/code] (the default value), the current screen will be used.

Note: On macOS returned value is 2.0 for hiDPI (Retina) screen, and 1.0 for all other cases.

Note: This method is implemented on macOS.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static float GetScreenScale(
	int screen = -1
)

Parameters

screen (Optional)
Type: SystemInt32

[Missing <param name="screen"/> documentation for "M:Godot.OS.GetScreenScale(System.Int32)"]

Return Value

Type: Single

[Missing <returns> documentation for "M:Godot.OS.GetScreenScale(System.Int32)"]

See Also