Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Static s_initialized value not supported for Domain Reload #66

Open
Mefodei opened this issue Feb 4, 2024 · 0 comments
Open

Static s_initialized value not supported for Domain Reload #66

Mefodei opened this issue Feb 4, 2024 · 0 comments

Comments

@Mefodei
Copy link

Mefodei commented Feb 4, 2024

Hi, there.

if project disable Domain Reload on Scene loading when the s initialized variable not resetting. You need to add to AppMetrica monobehaviour script:

public class AppMetrica : MonoBehaviour
{
    public const string VERSION = "5.2.0";

    private static bool s_isInitialized;

    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
    private static void ResetStaticData()
    {
        s_isInitialized = false;
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant