This is my first post here, sorry if I forget to post useful information that could help resolve this issue but I will try my best.
So I started creating an option menu in my 2D game for Android and when I got to the quality settings, I was not able to change it by script (C#) even if I copy/paste the script from the Unity Scripting API.
All I have is that this line of code is not recognised : QualitySettings.SetQualityLevel(int someQualityLevel);
Saying “Error CS0117 ‘QualitySettings’ does not contain a definition for ‘SetQualityLevel’”
Maybe it is a dumb mistake I did but I really can’t figure out what the problem is…
I tried to google it but no one seems to have had an issue with that, I don’t want to report a bug before I know it is an issue to others.
Thanks for the reply, here’s the code, it’s just a simple button to apply the quality settings the user chose :
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ApplySettings : MonoBehaviour { public GameObject optionPanel; public Color clickColor; public Color startColor; public int qualityIndex; private Text rend; void Start() { rend = GetComponent(); } void OnMouseDown() { rend.color = clickColor; } void OnMouseUp() { rend.color = startColor; QualitySettings.SetQualityLevel(qualityIndex, true); optionPanel.SetActive(false); } }
Unity 2017.2.0f3 (64-bit) not find the QualitySettings API
error CS0117: QualitySettings' does not contain a definition for antiAliasing’
error CS0117: QualitySettings' does not contain a definition for SetQualityLevel’