This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace SweatyChair | |
{ | |
public static class SettingManager | |
{ | |
/// <summary> | |
/// Sets the resolution to the specific values, call this on Awake. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace SweatyChair | |
{ | |
[CreateAssetMenu(fileName = "SettingSettings", menuName = "Sweaty Chair/Setting Settings")] | |
public class SettingSettings : ScriptableObjectSingleton<SettingSettings> | |
{ | |
[Tooltip("Manual screen width in Windows, 0 to disable, used for standalone only")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace SweatyChair | |
{ | |
/// <summary> | |
/// Remove the letterbox when switching windows mode to full screen mode, set the windows to manual screen width (if | |
/// speicified) when switching full screen mode to windows mode. Standalone only. | |
/// </summary> | |
public class ScreenModeSwitcher : PersistentSingleton<ScreenModeSwitcher> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Window Mode | Full-screen Mode | ||
---|---|---|---|
Screen.width | Window width | Width in current resolution (Window width set before, or width set in Screen.SetResolution) | |
Screen.height | Window height | Width in current resolution (Window height set before, or height set in Screen.SetResolution) | |
Screen.currentResolution.width | Same as Screen.width | Same as Screen.width | |
Screen.currentResolution.height | Same as Screen.height | Same as Screen.height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace SweatyChair | |
{ | |
/// <summary> | |
/// Remove the letterbox when switching windows mode to full screen mode, set the windows to manual screen width (if | |
/// speicified) when switching full screen mode to windows mode. Standalone only. | |
/// </summary> | |
public class ScreenModeSwitcher : PersistentSingleton<ScreenModeSwitcher> |