Hi!
I was wondering how you increse and decrease the quality of your game thorugh some scripting.
Now I have 3 planes that I’m using for buttons (I’m working with a main menu).
I’m using a tag system to check what plane you’re pressing, and that works perfectly.
Note! The “color.green”, “color, blue” etc is there so I can check if it’s working!
So what I need is to select what quality setting I want to use by pressing the buttons.
The script:
var HoverSound: AudioClip;
function OnMouseEnter()
{
renderer.material.color = Color.grey;
AudioSource.PlayClipAtPoint(HoverSound, transform.position);
}
function OnMouseDown ()
{
if (gameObject.tag == "Low")
{
renderer.material.color = Color.green;
AudioSource.PlayClipAtPoint(HoverSound, transform.position);
//Quality script goes here!
}
if (gameObject.tag == "Medium")
{
renderer.material.color = Color.blue;
AudioSource.PlayClipAtPoint(HoverSound, transform.position);
//Quality script goes here!
}
if (gameObject.tag == "High")
{
renderer.material.color = Color.red;
AudioSource.PlayClipAtPoint(HoverSound, transform.position);
//Quality script goes here!
}
}
function OnMouseExit()
{
renderer.material.color = Color.white;
}
Does anyone knnow how to do it?