示例#1
0
        /// <summary>
        /// Handles an <c>onUserProfileUpdated</c> event
        /// </summary>
        /// <param name="message">Will contain a JSON representation of a <c>UserProfile</c></param>
        public void onUserProfileUpdated(String message)
        {
            SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onUserProfileUpdated");

            JSONObject  eventJson   = new JSONObject(message);
            UserProfile userProfile = new UserProfile(eventJson ["userProfile"]);

            ProfileEvents.OnUserProfileUpdated(userProfile);
        }
示例#2
0
        protected virtual void _storeUserProfile(UserProfile userProfile, bool notify)
        {
#if UNITY_EDITOR
            string key = keyUserProfile(userProfile.Provider);
            string val = userProfile.toJSONObject().ToString();
            SoomlaUtils.LogDebug(TAG, "key/val:" + key + "/" + val);
            PlayerPrefs.SetString(key, val);

            if (notify)
            {
                ProfileEvents.OnUserProfileUpdated(userProfile);
            }
#endif
        }