-
-
Save Enigo/6b3d82320bb289c34665b9c9f5526f51 to your computer and use it in GitHub Desktop.
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
public static class PlayerPrefsUtils | |
{ | |
private const string Orientation = "Orientation"; | |
public static bool IsPortrait() | |
{ | |
return PlayerPrefs.GetInt(Orientation, 1) == 1; | |
} | |
public static bool HasOrientation() | |
{ | |
return PlayerPrefs.HasKey(Orientation); | |
} | |
public static void SavePortrait(bool isPortrait) | |
{ | |
PlayerPrefs.SetInt(Orientation, isPortrait ? 1 : 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment