Example #1
0
        public override void Cleanup()
        {
            base.Cleanup();

            avatarRenderer.CleanupAvatar();

            if (poolableObject != null)
            {
                poolableObject.OnRelease -= Cleanup;
            }

            onPointerDown.OnPointerDownReport            -= PlayerClicked;
            CommonScriptableObjects.worldOffset.OnChange -= OnWorldReposition;

            if (entity != null)
            {
                entity.OnTransformChange = null;
                entity = null;
            }

            var model = (AvatarModel)this.model;

            if (model != null)
            {
                avatarUserInfo.userId = model.id;
            }
            MinimapMetadataController.i?.UpdateMinimapUserInformation(avatarUserInfo, true);
        }
        public override void Cleanup()
        {
            base.Cleanup();

            if (disableFacialFeatureRoutine != null)
            {
                StopCoroutine(disableFacialFeatureRoutine);
                disableFacialFeatureRoutine = null;
            }

            if (playerStatus != null)
            {
                DataStore.i.player.otherPlayersStatus.Remove(playerStatus.id);
                playerStatus = null;
            }

            avatarRenderer.CleanupAvatar();

            if (poolableObject != null)
            {
                poolableObject.OnRelease -= Cleanup;
            }

            onPointerDown.OnPointerDownReport -= PlayerClicked;

            if (entity != null)
            {
                entity.OnTransformChange = null;
                entity = null;
            }
        }
Example #3
0
        public override void Cleanup()
        {
            base.Cleanup();

            avatarRenderer.CleanupAvatar();

            if (poolableObject != null)
            {
                poolableObject.OnRelease -= Cleanup;
            }

            onPointerDown.OnPointerDownReport -= PlayerClicked;
            DCLCharacterController.i.characterPosition.OnPrecisionAdjust -= PrecisionAdjust;

            if (entity != null)
            {
                entity.OnTransformChange = null;
                entity = null;
            }

            avatarUserInfo.userId = model.id;
            MinimapMetadataController.i?.UpdateMinimapUserInformation(avatarUserInfo, true);
        }