How to set value of Dropdown by using Playerprefs ?

Hi guys,

I have a dropdown menu which lets player to pick any color before game starts. I used playerprefs function to save the name of picked color’s value then call it on next scene. So far it works good.

Where i’m stuck on is that when game starts over, dropdown must be set to the color which was picked lastly by player. But i couldn’t make it set to the last value on Start() method. Can you help me to solve this problem?

I also saved int value of selection as well. So i can set the last selection by using this value when game starts over. Thanks noone… :wink:

public Dropdown dropDownMagic;

    private void Awake()
    {
        dropDownMagic.value = PlayerPrefs.GetInt("magicInt", 0);
    }
1 Like

Intresting same problem