AR recognition don't work after ipad deep sleep ver2.2 preview-3 Unity2019.1.14f1
void OnApplicationFocus(bool hasFocus)
{
if (hasFocus) { session.Reset(); }
session.enabled = hasFocus;
}
I try to do like this, but after maybe half hour sleep then wake up, recognition don't work anymore!
Any idea? or solution?
void OnApplicationFocus(bool hasFocus)
{
if (hasFocus)
{
StartCoroutine(DoReload());
}
}
IEnumerator DoReload()
{
Destroy(session.gameObject);
yield return null;
if (sessionPrefab != null)
{
session = Instantiate(sessionPrefab).GetComponent<ARSession>();
}
}
Also try reload, but if i do like this, camera will not work!
I want AR Recognition can work correct after wake up, whatever sleep how long time, for now maybe sleep 5minutes is ok, but half hour is not ok!
private void OnApplicationFocus(bool hasFocus)
{
if (hasFocus)
{
if (loseFocus)
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
loseFocus = false;
}
else
{
loseFocus = true;
}
}
Reload scene also have camera dont work problem!
Unity2019.2.10f1 Xcode11-beta5 ARFoundation 3.0-preview4
reload scene fixed!!! cool
but even I reload scene, after sleep still can't recognition
Unity2019.2.10f1 Xcode11.2-beta2 ARFoundation 3.0-preview4 iPad_Fall_2018_13.2_17B5077a_Restore
test 20minutes worked
Fixed in Unity2019.2.10f1