unity – Start Couroutine in the newly activated gameObject

I am working on a user interface system that animates the properties of an element with the help of coroutines. Each element to be animated has a component called AnimationUIElement which provides the function Enter().
Function Enter() just start the coroutines according to the chosen animation settings, but only after call Activate(), which activates the gameObject with gameObject.SetActive (true);, updates its component references and makes the element interactive.

public class AnimatedUIElement: MonoBehaviour {
private CanvasGroup canvasGroup;
// ...

public void Enter () {
// ...
TriggerEntry ();

TriggerEntry () {private {
PlayChildrenEntry (); // call Enter () on all animated children
StartCoroutine (SomeAnimation (...));

private empty Enable () {
gameObject.SetActive (true);
Init ();
canvasGroup.interactable = true;
canvasGroup.blocksRaycasts = true;

private void Init () {
canvasGroup = GetComponent();
// ...

IEnumerator private SomeAnimation (...) {...}

Now, I want to open the options panel by clicking a button in the game's UI. The panel is inactive (unchecked) at the beginning, while the AnimationUIElement component is enabled.

Screen capture of the hierarchy of the user interface
UI Hierarchy: Options Button Calls Enter() on the Options panel.

But clicking the button throws the following exception:

Coroutine could not be started because the object of the game's Main Menu Button & # 39; is inactive!
UnityEngine.MonoBehaviour: StartCoroutine (IEnumerator)
AnimatedUIElement: AnimatePosition (Vector2, Vector2, Single, AnimationCurve) (under Active / Animated User Interface Elements / AnimatedUIElement.cs: 265)
AnimationUIElement: TriggerEntry () (at Assets / Animated UI Elements / AnimatedUIElement.cs: 93)
AnimatedUIElement: Enter () (at Assets / Animated UI Elements / AnimatedUIElement.cs: 73)
AnimationUIElement: PlayChildrenEntry (Transform) (at Assets / Animated UI Elements / AnimatedUIElement.cs: 219)
AnimatedUIElement: TriggerEntry () (at Assets / Animated UI Elements / AnimatedUIElement.cs: 79)
AnimatedUIElement: Enter () (at Assets / Animated UI Elements / AnimatedUIElement.cs: 73)
UnityEngine.EventSystems.EventSystem: Update ()

In this trace, you can see that the options panel did not launch the routines because no animation was defined in its component, but called Enter() on his children, who are animated.

Using the debug logs, I discovered that although Init () is called immediately after Enter(), Awake() is called after the errors (which occur later in the course of the program). This gives the impression that the object is not available instantly after the call. setActive (true).

Is there an explanation and possibly a solution to this problem?