You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debug.Assert(instances.Length<=1,"[AsyncCoroutineRunner] There should only be one AsyncCoroutineRunner in the scene.");
58
+
instance=instances.Length==1?instances[0]:null;
59
+
if(instance!=null&&!instance.enabled)
60
+
{
61
+
Debug.LogWarning("[AsyncCoroutineRunner] Found a disabled AsyncCoroutineRunner component. Enabling the component.");
62
+
instance.enabled=true;
63
+
}
55
64
}
56
65
57
-
// FindObjectOfType() only search for active objects. The FindObjectOfType(bool includeInactive) variant is not available to Unity 2019.4 and earlier so cannot be used.
66
+
// FindObjectOfType() only search for objects attached to active GameObjects. The FindObjectOfType(bool includeInactive) variant is not available to Unity 2019.4 and earlier so cannot be used.
58
67
// We instead search for GameObject called AsyncCoroutineRunner and see if it has the component attached.
0 commit comments