Ejemplo n.º 1
0
        /// <summary>
        /// Delete local avatar files and request server to delete all data permanently. Can't undo this.
        /// </summary>
        private IEnumerator DeleteAvatarRoutine(string avatarCode)
        {
            var deleteRequest = avatarProvider.DeleteAvatarAsync(avatarCode);

            yield return(deleteRequest);

            yield return(UpdateAvatarListRoutine());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Delete local avatar files and request server to delete all data permanently. Can't undo this.
        /// </summary>
        private IEnumerator DeleteAvatar(string avatarCode)
        {
            AvatarPreview preview = avatarPreviews[avatarCode];

            avatarPreviews.Remove(avatarCode);
            preview.CleanUp();
            Destroy(preview.gameObject);

            var deleteRequest = avatarProvider.DeleteAvatarAsync(avatarCode);

            yield return(deleteRequest);

            yield return(UpdateAvatarList());
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Delete local avatar files and request server to delete all data permanently. Can't undo this.
        /// </summary>
        private IEnumerator DeleteAvatarRoutine(GalleryAvatar avatar)
        {
            GameObject sceneAvatar = GameObject.Find(avatar.name);

            if (sceneAvatar != null && sceneAvatar.GetComponent <AvatarInfo>() != null)
            {
                DestroyImmediate(sceneAvatar);
            }

            var deleteRequest = avatarProvider.DeleteAvatarAsync(avatar.code);

            yield return(deleteRequest);

            yield return(UpdateAvatarListRoutine());
        }