I’m an intern training to be a TA and want to try and tackle this seemingly simple problem by myself! Sorry if it’s obvious, I can’t figure out where the error is being thrown.
Error:
Coroutine couldn’t be started because the game object is ‘CoreOverload_x_EffectContainer’ is inactive!
The error isn’t thrown at run time - only when the unit in questions comes into play. The delay is set to 2 seconds, for those interested. I’m pretty sure it’s something to do with these lines but if more info is needed, let me know.
Just to confirm - an inactive parent automatically sets it’s children to inactive, but an active parent can contain both active and inactive children based on their individual states? (i.e. enabling the parent might not actually enable the child too, if it’s been deactivated) …
I ask because I think the bundle is the parent, but I am trying to write a log to debug beforehand to double check it is in fact active. I also tried just ‘gameObject.SetActive(true)’ - talking to our lead atm so will post back with response
Thanks for your help Dantus - the answer lied a little deeper and thus was not contained in any of the information I posted. I apologize for this.
Turns out in our bundle script which we use to import the game stuff never actually instantiated the game objects.
The below lines of code in a related script which the script in question pulled information from fixed it.
…
foreach(EffectContainer e in effects)
{
fxCon = EffectContainer.Instantiate(e) as EffectContainer;
fxCon.PerformEffect(this);
fxCon.transform.parent = transform;
}