Save & Load Data using PlayerPrefs


SaveLoadPrefs.cs
using UnityEngine;
using UnityEngine.UI;

public class SaveLoadPrefs : MonoBehaviour
{
    public InputField profileInputField;
    public Slider volumeSlider;
    public Dropdown qualityDropdown;

    public void SavePrefs()
    {
        PlayerPrefs.SetString("key_profile", profileInputField.text);
        PlayerPrefs.SetFloat("key_volume", volumeSlider.value);
        PlayerPrefs.SetInt("key_quality", qualityDropdown.value);
    }

    public void LoadPrefs()
    {
        profileInputField.text = PlayerPrefs.GetString("key_profile", "");  // "" => value if key not found.
        volumeSlider.value = PlayerPrefs.GetFloat("key_volume", 0f);
        qualityDropdown.value = PlayerPrefs.GetInt("key_quality", 0);
    }
}