Unity 5.2 using dropdown for screen resolutions

I am currently trying to use the new [Dropdown][1] feature included in Unity 5.2 and I would like to use it to enable a user to change their screen resolution upon selecting an option but I am having some issues. This can apparently be achieved using onValueChanged, when I select a resolution, it shows as selected, but does not change it as show below, I am running 1920 x 1080 even though 640 is selected:

[54158-screenshot-2015-09-12-114833.png*_|54158]

#EDIT
So i’ve been playing around with it for a while and managed to get it changing resolutions but when I change it, this happens [pic below] and the mouse position is completely out of sync with the screen, not sure what’s causing it.

[54160-screenshot-2015-09-12-135946.png*_|54160]

public class ScreenResolutions : MonoBehaviour
{
    Resolution[] resolutions;
    public Dropdown dropdownMenu;

    void Start()
    {
        resolutions = Screen.resolutions;

        //Screen.SetResolution(1920, 1080, true);

        for (int i = 0; i < resolutions.Length; i++)
        {
            dropdownMenu.options_.text = ResToString(resolutions*);*_

dropdownMenu.value = i;

dropdownMenu.onValueChanged.AddListener(delegate { Screen.SetResolution(resolutions[dropdownMenu.value].width, resolutions[dropdownMenu.value].height, true); });
}
}

string ResToString(Resolution res)
{
return res.width + " x " + res.height;
}
}
_[1]: http://docs.unity3d.com/ScriptReference/UI.Dropdown.html*_
_

_*

This appears to be an issue with the new version 5.2.0f3.

I just downloaded the new version in order to help you and got same strange issue.
The older version 5.1.3f that i’ve had doesn’t do that, everything works fine, just tested it again.

Besides that, few notes:

  • In each iteration, you add a new listener to the dropdown. In the end, you’ll have resolutions.Length equal subscriber to that event, which means you’ll change the game’s resolution ‘resolution.Length’ times (15-20 times approx.)

=> Add it once (either before or after the loop).

  • Do not set the value property, otherwise you’ll programmatically set the selected option.

  • You have to be careful with simply setting the options text, as there are only 3 by default. If you added them in the inspector, this might still cause exceptions when someone has more resolutions available.

=> You should call options.Clear() first and then add all options using options.Add(new Dropdown.OptionData(“your resolution as string”)).