コード例 #1
0
ファイル: DDNA.cs プロジェクト: Rogue-Harbour/unity-sdk
        /// <summary>
        /// Clears the persistent data, such as user id. The SDK should be stopped
        /// before this method is called.
        ///
        /// Useful for testing purposes.
        /// </summary>
        public void ClearPersistentData()
        {
            if (HasStarted)
            {
                Logger.LogWarning("SDK has not been stopped before clearing persistent data");
            }

            PlayerPrefs.DeleteKey(PF_KEY_USER_ID);
            PlayerPrefs.DeleteKey(PF_KEY_FIRST_SESSION);
            PlayerPrefs.DeleteKey(PF_KEY_LAST_SESSION);
            PlayerPrefs.DeleteKey(PF_KEY_CROSS_GAME_USER_ID);
            PlayerPrefs.DeleteKey(PF_KEY_ADVERTISING_ID);
            PlayerPrefs.DeleteKey(PF_KEY_FORGET_ME);
            PlayerPrefs.DeleteKey(PF_KEY_FORGOTTEN);
            PlayerPrefs.DeleteKey(PF_KEY_STOP_TRACKING_ME);
            PlayerPrefs.DeleteKey(PF_KEY_ACTIONS_SALT);

            delegated.ClearPersistentData();

            lock (_lock) {
                if (delegated is DDNANonTracking)
                {
                    delegated = new DDNAImpl(this);
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Clears the persistent data, such as user id. The SDK should be stopped
        /// before this method is called.
        ///
        /// Useful for testing purposes.
        /// </summary>
        public void ClearPersistentData()
        {
            if (HasStarted)
            {
                Logger.LogWarning("SDK has not been stopped before clearing persistent data");
            }

            PlayerPrefs.DeleteKey(PF_KEY_USER_ID);
            PlayerPrefs.DeleteKey(PF_KEY_FORGET_ME);
            PlayerPrefs.DeleteKey(PF_KEY_FORGOTTEN);

            delegated.ClearPersistentData();

            lock (_lock) {
                if (delegated is DDNANonTracking)
                {
                    delegated = new DDNAImpl(this);
                }
            }
        }