public void Start() { if (m_cognitoIdentity == null || string.IsNullOrEmpty(m_analyticsAppId)) { Debug.LogWarning("MobileAnalytics: Analytics manager is not initialized"); return; } m_analyticsManager = MobileAnalyticsManager.GetOrCreateInstance(m_analyticsAppId, m_cognitoIdentity.Credentials, AWSRegionHelpers.GetByEnum(m_region)); }
public void Awake() { if (string.IsNullOrEmpty(m_identityPoolId)) { Status = LoginStatus.Uninitialized; return; } m_credentials = new CognitoAWSCredentials(m_identityPoolId, AWSRegionHelpers.GetByEnum(m_region)); m_credentials.IdentityChangedEvent += HandleIdentityChangedEvent; string key = COGNITO_GUESTNAMES_CACHE_KEY + ":" + m_identityPoolId; m_guestIdCache = new GuestIdCache(key); m_guestIdCache.RetrieveGuestIds(); Logout(); }