Screen Set Resolution#
Screen / Screen Set Resolution Width, Height, Fullscreen
Description#
Executes the Set Resolution static method of the Screen class
Parameters#
| Name | Description |
|---|---|
| Width | |
| Height | |
| Fullscreen |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("Screen Set Resolution")]
[Category("Screen/Set Resolution", "Width, Height, Fullscreen")]
[Description("Executes the Set Resolution static method of the Screen class")]
[Image(typeof(IconScreen), ColorTheme.Type.TextLight)]
[Keywords("Display, Resolution, Window, Monitor")]
[Parameter("Width")]
[Parameter("Height")]
[Parameter("Fullscreen")]
[Serializable]
public class GenInstructionScreen_SetResolution_3_IntWidth_IntHeight_BoolFullscreen : Instruction
{
[SerializeField] private GetInteger m_Width = new GetInteger();
[SerializeField] private GetInteger m_Height = new GetInteger();
[SerializeField] private GetBool m_Fullscreen = new GetBool();
protected override string GetTitle(GameObject source)
{
string className = TextUtils.ThemeAsKeyword("Screen");
string method = TextUtils.ThemeAsKeyword("Set Resolution");
return $"{className} {method} ({this.m_Width}, {this.m_Height}, {this.m_Fullscreen})";
}
protected override Awaitable Run(Args args)
{
Screen.SetResolution(
(int) this.m_Width.Get(args),
(int) this.m_Height.Get(args),
(bool) this.m_Fullscreen.Get(args)
);
return Done;
}
}
}