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
// FindObjectOfType() only search for active objects. The FindObjectOfType(bool includeInactive) variant is not available to Unity 2019.4 and earlier so cannot be used.
58
+
// We instead search for GameObject called AsyncCoroutineRunner and see if it has the component attached.
Debug.LogError($"GameObject {instance.gameObject.name} has an inactive AsyncCoroutineRunner attached and "+
64
-
"there is no active AsyncCoroutineRunner in the scene. There must be an active AsyncCoroutineRunner attached to a GameObject at the root of the scene.");
Debug.Log("[AsyncCoroutineRunner] Found a \"AsyncCoroutineRunner\" GameObject but didn't have the AsyncCoroutineRunner component attached. Attaching the script.");
Debug.LogWarning("[AsyncCoroutineRunner] Found a disabled AsyncCoroutineRunner component. Enabling the component.");
77
+
instance.enabled=true;
78
+
}
79
+
if(!instanceGameObject.activeSelf)
80
+
{
81
+
Debug.LogWarning("[AsyncCoroutineRunner] Found an AsyncCoroutineRunner attached to an inactive GameObject. Setting the GameObject active.");
82
+
instanceGameObject.SetActive(true);
83
+
}
84
+
}
66
85
}
67
86
}
68
87
69
88
if(instance==null)
70
89
{
71
-
Debug.LogWarning("There is no AsyncCoroutineRunner in the scene. Adding a GameObject with AsyncCoroutineRunner attached at the root of the scene.");
90
+
Debug.Log("[AsyncCoroutineRunner] There is no AsyncCoroutineRunner in the scene. Adding a GameObject with AsyncCoroutineRunner attached at the root of the scene.");
0 commit comments