The current destruction of the only MapboxConvenience instance was happening after I built for a standalone exe. I've addressed this with the following changes:
public override void Awake()
{
/*
if (s_instance != null)
{
Destroy(gameObject);
return;
}
*/
base.Awake();
if (s_instance != this)
{
Destroy(gameObject);
return;
}
if (string.IsNullOrEmpty(_token))
{
throw new InvalidTokenException("Please get a token from mapbox.com");
}
if (_fileSource == null)
{
_fileSource = new FileSource(this);
_fileSource.AccessToken = _token;
}
}
The current destruction of the only MapboxConvenience instance was happening after I built for a standalone exe. I've addressed this with the following changes: