34 lines
1,007 B
C#
34 lines
1,007 B
C#
using SystemUI;
|
|
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Settings
|
|
{
|
|
public class DebugEnvironmentScreen : MonoBehaviour
|
|
{
|
|
public InputField BuildIdField;
|
|
public InputField OnlineServerField;
|
|
|
|
private void Start()
|
|
{
|
|
BuildIdField.text = PlayerPrefs.GetString("DebugBuildId", string.Empty);
|
|
OnlineServerField.text = PlayerPrefs.GetString("DebugOnlineServer", string.Empty);
|
|
}
|
|
|
|
public void Reset()
|
|
{
|
|
PlayerPrefs.DeleteKey("DebugBuildId");
|
|
PlayerPrefs.DeleteKey("DebugOnlineServer");
|
|
UiManager.Instance.ShowSettings();
|
|
}
|
|
|
|
public void OnOkPressed()
|
|
{
|
|
PlayerPrefs.SetString("DebugBuildId", BuildIdField.text);
|
|
PlayerPrefs.SetString("DebugOnlineServer", OnlineServerField.text);
|
|
Toast.ShowToast("Please restart the app to apply the changes");
|
|
UiManager.Instance.ShowSettings();
|
|
}
|
|
}
|
|
}
|