gameoptions - eisclimber/ExPresS-XR GitHub Wiki
Class in ExPresSXR.Misc.Options
Inherits from UnityEngine.MonoBehaviour
!ATTENTION! This is just a demo implementation with demo values. You'll need to adjust this class to your needs. Also keep in mind that this is not a full save system, rather lets you store some simple values easily.
public class GameOptions : MonoBehaviour| Name | Description |
|---|---|
| ExperienceType | Available types of experiences. |
| GameOptionConditionals | Add boolean values here to be used with GameOptionsConditionalElement. |
| Make sure to add a return value in GetValueOfConditional() too. |
| Name | Description |
|---|---|
| EXPRESSXR_MADE_WITH_NAME | Constant for checking if a game was made with ExPresS XR. |
| MADE_WITH_PLAYER_PREF | Key for the made with value. |
| SELECTED_EXPERIENCE_PLAYER_PREF | Key for the selected player experience. |
| SUBTITLES_PLAYER_PREF | Key for storing if subtitles should be enabled. |
| Name | Description |
|---|---|
| GetValueOfConditional(GameOptionConditionals) | Returns the conditional value saved in the PlayerPrefs. |
| Name | Description |
|---|---|
| MadeWith | Stores simple strings (floats and ints are possible too). |
| MadeWithExPresSXR | Values can be converted to booleans like this. |
| SelectedExperience | Enum values must be converted to integers. |
| SelectedExperienceType | The actual enums can still be used in code like this. |
| SubtitlesEnabled | Storing booleans as 0 and 1 integers. |