blob: 439279d363e8bbb7fceb4bfa24cc80c423a871da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using TMPro;
using UnityEngine;
public class RegionSelector : MonoBehaviour
{
private TMP_Dropdown dropDown;
public static string region = "";
private void Start()
{
dropDown = GetComponent<TMP_Dropdown>();
region = dropDown.options[PlayerPrefs.GetInt("Region", 0)].text;
dropDown.value = PlayerPrefs.GetInt("Region", 0);
NetworkConnectionHandler.instance.hasRegionSelect = true;
}
public void OnValueChanged()
{
PlayerPrefs.SetInt("Region", dropDown.value);
region = dropDown.options[dropDown.value].text;
}
}
|