You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
452 B
23 lines
452 B
namespace Mapbox.Unity.Utilities
|
|
{
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
[RequireComponent(typeof(Button))]
|
|
public class TelemetryConfigurationButton : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
bool _booleanValue;
|
|
|
|
protected virtual void Awake()
|
|
{
|
|
GetComponent<Button>().onClick.AddListener(SetPlayerPref);
|
|
}
|
|
|
|
void SetPlayerPref()
|
|
{
|
|
MapboxAccess.Instance.SetLocationCollectionState(_booleanValue);
|
|
PlayerPrefs.Save();
|
|
}
|
|
}
|
|
} |