Exemplo n.º 1
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;

            DontDestroyOnLoad(gameObject);

            Skillz.Init(Application.unityVersion);

            if (enableGCM)
            {
                if (!Skillz.IsGCMRegistered())
                {
                    Skillz.RegisterGCM();
                }
            }

            if (enableLocalytics)
            {
                SkillzLocalytics.Instance.Open();
                SkillzLocalytics.Instance.Upload();
            }
        }
        else if (instance != this)
        {
            DestroyObject(gameObject);
        }
    }
Exemplo n.º 2
0
    void Awake()
    {
        if (instance == null) {
            instance = this;

            DontDestroyOnLoad(gameObject);

            Skillz.Init(Application.unityVersion);

            if (enableGCM) {
                if (!Skillz.IsGCMRegistered()) {
                    Skillz.RegisterGCM();
                }
            }

            if (enableLocalytics) {
                SkillzLocalytics.Instance.Open();
                SkillzLocalytics.Instance.Upload();
            }

        } else if (instance != this) {
            DestroyObject(gameObject);
        }
    }