Game Settings

The game settings is currently empty but can be expanded upon if you wish to use it. It will hold all settings data that will be changed during runtime, such as score or player's name.

Adding a new property

  1. To add a new property you can add the following:

    [SerializeField] public int MaxMoves = 30;
  2. You will notice that you can't edit this in the inspector. The only way to edit it is inside a script by calling the following:

    GameSettings.Set(s => s.MaxMoves = 100);
  3. To later get the value, you can type:

    GameSettings.Get<int>(s => s.MaxMoves);

Last updated