Closed mana-break closed 3 years ago
Hello! There are no such methods even in native SDKs. Do you send an event right after activation on the same thread? If not, I guess you have to synchronize this whole process yourself.
In Unity, the order of initialization of game objects on the scene is undefined. I use the main thread. Other objects can send events before AppMetrica was activated and I can't check it. I can only catch exceptions.
AppMetrica activates in the Awake
method. You cannot send events from the Awake
method from other objects, because there is no guarantee that AppMetrica was previously activated. But you can begin sending events from Start
methods. If this is not the case, make sure to add Prefab to the scene. If you need to send events from Awake
, then you have to activate AppMetrica yourself before sending events using AppMetrica.Instance.ActivateWithConfiguration ()
.
How can I check if it is already possible to send events? Now, when sending events early, the application throws an exception. Need IsActivated() method.