Question by
Arslan_97680 · Nov 01, 2017 at 05:16 PM ·
uitoggletoggle button
I want Toggle Group Savescript. When i restart the game. the game disable all toggle.
using System.Collections;
using UnityEngine.UI;
using UnityEngine;
public class Graphics_setting : MonoBehaviour {
public Toggle low;
public Toggle medium;
public Toggle high;
void Awake()
{
ActiveToggle ();
}
public void ActiveToggle ()
{
if (low.isOn)
{
QualitySettings.SetQualityLevel (0, true);
FindObjectOfType<AudioManager>().Play("Click");
}
else if (medium.isOn)
{
QualitySettings.SetQualityLevel (3, true);
FindObjectOfType<AudioManager>().Play("Click");
}
else if (high.isOn)
{
QualitySettings.SetQualityLevel (5, true);
FindObjectOfType<AudioManager>().Play("Click");
}
}
}
when i select graphic setting in game. it's all working but when i close the game and restart the toggle is off and unity use it's own quality setting. i want save graphic setting. Please give me script not references i already search and apply too many of them.
Comment