When you open the script Level.cs
. You will see the following code:
using UnityEngine; namespace RunAndJump { public partial class Level : MonoBehaviour { [SerializeField] public int _totalTime = 60; [SerializeField] private float gravity = -30; [SerializeField] private AudioClip bgm; [SerializeField] private Sprite background; public int TotalTime { get { return _totalTime; } set { _totalTime = value; } } public float Gravity { get { return gravity; } set { gravity = value; } } public AudioClip Bgm { get { return bgm; } set { bgm = value; } } public Sprite Background { get { return background; } set { background = value; } } } }
This script holds the variables that you saw in the inspector and the properties to access and change these values.