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
After investigating for a bit, we can "save" the thread in any MonoBehaviour.Start. As a possible approach, we can create GameObject during SentryInitialization.Init, assign our MonoBehaviour and "save the thread" from there (static holder?).
That sounds like a good plan. We have a MonoBehavior that @bitsandfoxes created. We discussed renaming it to a more generic thing like SentryUnityMonoBehavior or something. And have event we can subscribe/unsubscribe from the SDK to do things.
I see we have SentryBehavior already in. Is that used?
Keeping the reference to the main thread from a MonoBehavior is a good approach. It would need to be nullable and while processing events we'd need consider the fact that the field wasn't set yet (MonoBehavior wasn't called yet or failed to hook)
We have the following line in
ApplicationAdapter
It seems we cant rely on
ManagedThreadId == 1
, suggested approach https://stackoverflow.com/questions/26452609/find-out-if-im-on-the-unity-thread. From Unity answers https://answers.unity.com/questions/62631/i-wonder-about-thread-id-plz-answer-me.htmlAlso, should we store this info on
IApplication
or put it somewhere else?The text was updated successfully, but these errors were encountered: