public void MedSettingsDefault()
    {
        GraphicsSettings.renderPipelineAsset = medQuality;

        NoDestroyVariables.lowOn  = false;
        NoDestroyVariables.medOn  = true;
        NoDestroyVariables.highOn = false;

        NoDestroyVariables.SaveGraphicsPrefs();
    }
 private void Awake()
 {
     if (NoDestroyInstance == null)
     {
         NoDestroyInstance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
    //Set high settings
    public void HighSettings()
    {
        audioManager.PlaySound("buttonSound");

        GraphicsSettings.renderPipelineAsset = highQuality;

        NoDestroyVariables.lowOn  = false;
        NoDestroyVariables.medOn  = false;
        NoDestroyVariables.highOn = true;

        canvas.enabled = false;
        Canvas.ForceUpdateCanvases();
        canvas.enabled = true;

        NoDestroyVariables.SaveGraphicsPrefs();
        FindObjectOfType <GraphincsLevelsMarkersController>().UpdateMarkers();
    }
Example #4
0
    /// <summary>
    /// Update current graphic settings markers
    /// </summary>
    public void UpdateMarkers()
    {
        NoDestroyVariables.LoadPlayerPrefs();

        if (NoDestroyVariables.lowOn)
        {
            lowMarkers.SetActive(true);
            medMarkers.SetActive(false);
            highMarkers.SetActive(false);
        }
        else if (NoDestroyVariables.medOn)
        {
            lowMarkers.SetActive(false);
            medMarkers.SetActive(true);
            highMarkers.SetActive(false);
        }
        else if (NoDestroyVariables.highOn)
        {
            lowMarkers.SetActive(false);
            medMarkers.SetActive(false);
            highMarkers.SetActive(true);
        }
    }