Last active
March 1, 2021 00:12
-
-
Save sweatyc/21109701f2b66f954c2138bc1f086daf to your computer and use it in GitHub Desktop.
The setting scipts for Settings in game.
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")] | |
public int manualScreenWidthWin; | |
[Tooltip("Manual screen width in macOS, 0 to disable, used for standalone only")] | |
public int manualScreenWidthOsx = 1920; | |
public int manualScreenWidth { | |
get { | |
#if UNITY_STANDALONE_WIN | |
return manualScreenWidthWin; | |
#elif UNITY_STANDALONE_OSX | |
return manualScreenWidthOsx; | |
#else | |
return 0; | |
#endif | |
} | |
} | |
#if UNITY_EDITOR | |
[UnityEditor.MenuItem("Sweaty Chair/Setting Settings")] | |
private static void OpenSettingSettings() | |
{ | |
current.OpenAssetsFile(); | |
} | |
#endif | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment