void Awake()
{
lock (_lock)
{
if (_instance == null)
{
_instance = this;
DontDestroyOnLoad(this);
InitializeDriver();
if (mainThread == null)
mainThread = new Queue<Action>();
if (Results == null)
Results = new Queue<string>();
#if UNITY_EDITOR || UNITY_IOS
StartTests();
#endif
}
else
{
if (this != _instance)
{
//destroy the new instance
DestroyObject(this);
}
}
}
}