Hi All,
I have this weird thing goining on. I use OnBecameInvisible when my character is no longer seen by the main camera. When it is not visible bu the main camera I start a coroutine:
void OnBecameInvisible()
{
someComponent.enabled = false;
StartCoroutine(SomeCoroutine());
}
It works great utill I stop running the game in the editor (when I press the play button again to stop running the game)
and I get this console error :
Coroutine couldn’t be started because the the game object ‘guy’ is inactive!
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
guy is the name of my character where the script is attcahed.
Any ideas?
Thank u in advance