Skip to content

[General]: UnityMainThreadDispatch uses [RuntimeInitializeOnLoadMethod] #542

@Arikaton

Description

@Arikaton

What's on your mind?

In OneSignal started from version 3 UnityMainThreadDispatch uses when we call OneSignal.Default.GetTags() in Android platform. The problem is that context getting with [RuntimeInitializeOnLoadMethod] attribute. According to Unity documentation [RuntimeInitializeOnLoadMethod] methods are executed after Awake() event. If we initialize OneSignal in awake and then trying to GetTags we instantly get an exception.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions