| | 1 | | using System; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using System.Linq; |
| | 4 | | using System.Runtime.ExceptionServices; |
| | 5 | | using System.Threading; |
| | 6 | | using AvatarSystem; |
| | 7 | | using Cysharp.Threading.Tasks; |
| | 8 | | using DCL.Components; |
| | 9 | | using DCL.Configuration; |
| | 10 | | using DCL.Controllers; |
| | 11 | | using DCL.Emotes; |
| | 12 | | using DCL.Helpers; |
| | 13 | | using DCL.Interface; |
| | 14 | | using DCL.Models; |
| | 15 | | using GPUSkinning; |
| | 16 | | using UnityEngine; |
| | 17 | | using LOD = AvatarSystem.LOD; |
| | 18 | |
|
| | 19 | | namespace DCL.ECSComponents |
| | 20 | | { |
| | 21 | | public interface IAvatarShape |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// This will initialize the AvatarShape and set |
| | 25 | | /// </summary> |
| | 26 | | void Init(); |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Clean up the avatar shape so we can reutilizate it using the pool |
| | 30 | | /// </summary> |
| | 31 | | void Cleanup(); |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// Apply the model of the avatar, it will reload if necessary |
| | 35 | | /// </summary> |
| | 36 | | /// <param name="scene"></param> |
| | 37 | | /// <param name="entity"></param> |
| | 38 | | /// <param name="newModel"></param> |
| | 39 | | void ApplyModel(IParcelScene scene, IDCLEntity entity, PBAvatarShape newModel); |
| | 40 | |
|
| | 41 | | /// <summary> |
| | 42 | | /// Get the transform of the avatar shape |
| | 43 | | /// </summary> |
| | 44 | | Transform transform { get; } |
| | 45 | | } |
| | 46 | |
|
| | 47 | | public class AvatarShape : MonoBehaviour, IHideAvatarAreaHandler, IPoolableObjectContainer, IAvatarShape, IPoolLifec |
| | 48 | | { |
| | 49 | | private const float AVATAR_Y_AXIS_OFFSET = -0.72f; |
| | 50 | | private const float MINIMUM_PLAYERNAME_HEIGHT = 2.7f; |
| | 51 | | private const string CURRENT_PLAYER_ID = "CurrentPlayerInfoCardId"; |
| | 52 | | internal const string IN_HIDE_AREA = "IN_HIDE_AREA"; |
| | 53 | |
|
| | 54 | | [SerializeField] private GameObject avatarContainer; |
| | 55 | | [SerializeField] internal Collider avatarCollider; |
| | 56 | | [SerializeField] private Transform avatarRevealContainer; |
| | 57 | | [SerializeField] private GameObject armatureContainer; |
| | 58 | |
|
| | 59 | | [SerializeField] internal AvatarOnPointerDown onPointerDown; |
| | 60 | | [SerializeField] internal AvatarOutlineOnHoverEvent outlineOnHover; |
| | 61 | | [SerializeField] internal GameObject playerNameContainer; |
| | 62 | |
|
| | 63 | | internal IAvatarMovementController avatarMovementController; |
| | 64 | | internal IPlayerName playerName; |
| | 65 | | internal IAvatarReporterController avatarReporterController; |
| | 66 | |
|
| | 67 | | private StringVariable currentPlayerInfoCardId; |
| | 68 | |
|
| | 69 | | internal bool initializedPosition = false; |
| | 70 | |
|
| | 71 | | internal Player player = null; |
| 19 | 72 | | internal BaseDictionary<string, Player> otherPlayers => DataStore.i.player.otherPlayers; |
| | 73 | |
|
| 11 | 74 | | private IAvatarAnchorPoints anchorPoints = new AvatarAnchorPoints(); |
| | 75 | | internal IAvatar avatar; |
| | 76 | | internal CancellationTokenSource loadingCts; |
| | 77 | | private ILazyTextureObserver currentLazyObserver; |
| | 78 | | private IUserProfileBridge userProfileBridge; |
| 11 | 79 | | private bool isGlobalSceneAvatar = true; |
| | 80 | |
|
| 17 | 81 | | public IPoolableObject poolableObject { get; set; } |
| | 82 | | internal PBAvatarShape model; |
| | 83 | | internal IDCLEntity entity; |
| | 84 | |
|
| | 85 | | private void Awake() |
| | 86 | | { |
| 8 | 87 | | avatarMovementController = GetComponent<IAvatarMovementController>(); |
| | 88 | | // TODO: avoid instantiation, user profile bridge should be retrieved from the service locator |
| 8 | 89 | | userProfileBridge = new UserProfileWebInterfaceBridge(); |
| | 90 | |
|
| 8 | 91 | | currentPlayerInfoCardId = Resources.Load<StringVariable>(CURRENT_PLAYER_ID); |
| 8 | 92 | | Visibility visibility = new Visibility(); |
| 8 | 93 | | avatarMovementController.SetAvatarTransform(transform); |
| | 94 | |
|
| | 95 | | // Right now the avatars that are not part of the global scene of avatar are not using LOD since |
| | 96 | | // AvatarsLodController are no taking them into account. It needs product definition and a refactor to inclu |
| 8 | 97 | | LOD avatarLOD = new LOD(avatarContainer, visibility, avatarMovementController); |
| 8 | 98 | | AvatarAnimatorLegacy animator = GetComponentInChildren<AvatarAnimatorLegacy>(); |
| 8 | 99 | | BaseAvatar baseAvatar = new BaseAvatar(avatarRevealContainer, armatureContainer, avatarLOD); |
| 8 | 100 | | avatar = new AvatarWithHologram( |
| | 101 | | baseAvatar, |
| | 102 | | new AvatarCurator(new WearableItemResolver(), Environment.i.serviceLocator.Get<IEmotesCatalogService>()) |
| | 103 | | new Loader(new WearableLoaderFactory(), avatarContainer, new AvatarMeshCombinerHelper()), |
| | 104 | | animator, |
| | 105 | | visibility, |
| | 106 | | avatarLOD, |
| | 107 | | new SimpleGPUSkinning(), |
| | 108 | | new GPUSkinningThrottler(), |
| | 109 | | new EmoteAnimationEquipper(animator, DataStore.i.emotes)); |
| | 110 | |
|
| 8 | 111 | | if (avatarReporterController == null) |
| 8 | 112 | | avatarReporterController = new AvatarReporterController(Environment.i.world.state); |
| | 113 | |
|
| 8 | 114 | | onPointerDown.OnPointerDownReport += PlayerClicked; |
| 8 | 115 | | onPointerDown.OnPointerEnterReport += PlayerPointerEnter; |
| 8 | 116 | | onPointerDown.OnPointerExitReport += PlayerPointerExit; |
| 8 | 117 | | outlineOnHover.OnPointerEnterReport += PlayerPointerEnter; |
| 8 | 118 | | outlineOnHover.OnPointerExitReport += PlayerPointerExit; |
| 8 | 119 | | } |
| | 120 | |
|
| | 121 | | public void Init() |
| | 122 | | { |
| | 123 | | // The avatars have an offset in the Y axis, so we set the offset after the avatar has been restored from th |
| 0 | 124 | | transform.position = new UnityEngine.Vector3(transform.position.x, AVATAR_Y_AXIS_OFFSET, transform.position. |
| 0 | 125 | | SetPlayerNameReference(); |
| 0 | 126 | | } |
| | 127 | |
|
| | 128 | | private void SetPlayerNameReference() |
| | 129 | | { |
| 5 | 130 | | if (playerName != null) |
| 0 | 131 | | return; |
| 5 | 132 | | playerName = GetComponentInChildren<IPlayerName>(); |
| 5 | 133 | | playerName?.Hide(true); |
| 5 | 134 | | } |
| | 135 | |
|
| | 136 | | private void PlayerClicked() |
| | 137 | | { |
| 0 | 138 | | if (model == null) |
| 0 | 139 | | return; |
| 0 | 140 | | currentPlayerInfoCardId.Set(model.Id); |
| 0 | 141 | | } |
| | 142 | |
|
| | 143 | | public void OnDestroy() |
| | 144 | | { |
| 8 | 145 | | Cleanup(); |
| | 146 | |
|
| 8 | 147 | | if (poolableObject != null && poolableObject.isInsidePool) |
| 0 | 148 | | poolableObject.RemoveFromPool(); |
| 8 | 149 | | } |
| | 150 | |
|
| | 151 | | public async void ApplyModel(IParcelScene scene, IDCLEntity entity, PBAvatarShape newModel) |
| | 152 | | { |
| 4 | 153 | | this.entity = entity; |
| | 154 | |
|
| 4 | 155 | | isGlobalSceneAvatar = scene.sceneData.sceneNumber == EnvironmentSettings.AVATAR_GLOBAL_SCENE_NUMBER; |
| | 156 | |
|
| 4 | 157 | | DisablePassport(); |
| | 158 | |
|
| 4 | 159 | | bool needsLoading = !AvatarUtils.HaveSameWearablesAndColors(model,newModel); |
| 4 | 160 | | model = newModel; |
| | 161 | |
|
| | 162 | | #if UNITY_EDITOR |
| 4 | 163 | | gameObject.name = $"Avatar Shape {model.GetName()}"; |
| | 164 | | #endif |
| | 165 | |
|
| | 166 | | // To deal with the cases in which the entity transform was configured before the AvatarShape |
| 4 | 167 | | if (!initializedPosition) |
| | 168 | | { |
| 4 | 169 | | OnEntityTransformChanged(entity.gameObject.transform.localPosition, |
| | 170 | | entity.gameObject.transform.localRotation, true); |
| | 171 | | } |
| | 172 | |
|
| | 173 | | // NOTE: we subscribe here to transform changes since we might "lose" the message |
| | 174 | | // if we subscribe after a any yield |
| 4 | 175 | | entity.OnTransformChange -= OnEntityTransformChanged; |
| 4 | 176 | | entity.OnTransformChange += OnEntityTransformChanged; |
| | 177 | |
|
| 4 | 178 | | var wearableItems = model.GetWereables().ToList(); |
| 4 | 179 | | wearableItems.Add(model.GetBodyShape()); |
| | 180 | |
|
| | 181 | | // temporarily hardcoding the embedded emotes until the user profile provides the equipped ones |
| 4 | 182 | | var embeddedEmotesSo = Resources.Load<EmbeddedEmotesSO>("EmbeddedEmotes"); |
| 128 | 183 | | wearableItems.AddRange(embeddedEmotesSo.emotes.Select(x => x.id)); |
| 4 | 184 | | HashSet<string> emotes = new HashSet<string>(); |
| 128 | 185 | | emotes.UnionWith(embeddedEmotesSo.emotes.Select(x => x.id)); |
| | 186 | |
|
| 4 | 187 | | if (avatar.status != IAvatar.Status.Loaded || needsLoading) |
| | 188 | | { |
| 4 | 189 | | loadingCts?.Cancel(); |
| 4 | 190 | | loadingCts?.Dispose(); |
| 4 | 191 | | loadingCts = new CancellationTokenSource(); |
| | 192 | | try |
| | 193 | | { |
| 4 | 194 | | await LoadAvatar(wearableItems,emotes); |
| 4 | 195 | | } |
| 0 | 196 | | catch (Exception e) |
| | 197 | | { |
| | 198 | | // If the load of the avatar fails, we do it silently so the scene continue to operate. |
| | 199 | | // The LoadAvatar function will show the error in console already so in order to avoid noise, we jus |
| 0 | 200 | | } |
| | 201 | | } |
| | 202 | |
|
| | 203 | | // If the model contains a value for expressionTriggerId then we try it, if value doesn't exist, we skip |
| 4 | 204 | | if(model.HasExpressionTriggerId) |
| 4 | 205 | | avatar.PlayEmote(model.ExpressionTriggerId, model.GetExpressionTriggerTimestamp()); |
| | 206 | |
|
| 4 | 207 | | UpdatePlayerStatus(entity, model); |
| | 208 | |
|
| 4 | 209 | | onPointerDown.Initialize( |
| | 210 | | new OnPointerDown.Model() |
| | 211 | | { |
| | 212 | | type = OnPointerDown.NAME, |
| | 213 | | button = WebInterface.ACTION_BUTTON.POINTER.ToString(), |
| | 214 | | hoverText = "View Profile" |
| | 215 | | }, |
| | 216 | | entity, player |
| | 217 | | ); |
| | 218 | |
|
| 4 | 219 | | outlineOnHover.Initialize(new OnPointerDown.Model(), entity, player.avatar); |
| | 220 | |
|
| 4 | 221 | | avatarCollider.gameObject.SetActive(true); |
| | 222 | |
|
| 4 | 223 | | EnablePassport(); |
| | 224 | |
|
| 4 | 225 | | onPointerDown.SetColliderEnabled(isGlobalSceneAvatar); |
| 4 | 226 | | onPointerDown.SetOnClickReportEnabled(isGlobalSceneAvatar); |
| 4 | 227 | | } |
| | 228 | |
|
| | 229 | | private async UniTask LoadAvatar(List<string> wearableItems, HashSet<string> emotes) |
| | 230 | | { |
| | 231 | | try |
| | 232 | | { |
| | 233 | | //TODO Add Collider to the AvatarSystem |
| | 234 | | //TODO Without this the collider could get triggered disabling the avatar container, |
| | 235 | | // this would stop the loading process due to the underlying coroutines of the AssetLoader not starting |
| 4 | 236 | | avatarCollider.gameObject.SetActive(false); |
| | 237 | |
|
| 4 | 238 | | SetImpostor(model.Id); |
| 4 | 239 | | UserProfile profile = userProfileBridge.Get(model.Id); |
| 4 | 240 | | playerName.SetName(model.GetName(), profile?.hasClaimedName ?? false, profile?.isGuest ?? false); |
| 4 | 241 | | playerName.Show(true); |
| 4 | 242 | | await avatar.Load(wearableItems, emotes.ToList(),new AvatarSettings |
| | 243 | | { |
| | 244 | | playerName = model.GetName(), |
| | 245 | | bodyshapeId = model.GetBodyShape(), |
| | 246 | | eyesColor = model.GetEyeColor().ToUnityColor(), |
| | 247 | | skinColor = model.GetSkinColor().ToUnityColor(), |
| | 248 | | hairColor = model.GetHairColor().ToUnityColor(), |
| | 249 | | }, loadingCts.Token); |
| 4 | 250 | | } |
| 0 | 251 | | catch (OperationCanceledException) |
| | 252 | | { |
| 0 | 253 | | Cleanup(); |
| 0 | 254 | | throw; |
| | 255 | | } |
| 0 | 256 | | catch (Exception e) |
| | 257 | | { |
| 0 | 258 | | Cleanup(); |
| 0 | 259 | | Debug.Log($"Avatar.Load failed with wearables:[{string.Join(",", wearableItems)}] for bodyshape:{model.B |
| 0 | 260 | | if (e.InnerException != null) |
| 0 | 261 | | ExceptionDispatchInfo.Capture(e.InnerException).Throw(); |
| | 262 | | else |
| 0 | 263 | | throw; |
| 0 | 264 | | } |
| | 265 | | finally |
| | 266 | | { |
| 4 | 267 | | loadingCts?.Dispose(); |
| 4 | 268 | | loadingCts = null; |
| | 269 | | } |
| 4 | 270 | | } |
| | 271 | |
|
| | 272 | | public void SetImpostor(string userId) |
| | 273 | | { |
| 4 | 274 | | currentLazyObserver?.RemoveListener(avatar.SetImpostorTexture); |
| 4 | 275 | | if (string.IsNullOrEmpty(userId)) |
| 0 | 276 | | return; |
| | 277 | |
|
| 4 | 278 | | UserProfile userProfile = UserProfileController.GetProfileByUserId(userId); |
| 4 | 279 | | if (userProfile == null) |
| 4 | 280 | | return; |
| | 281 | |
|
| 0 | 282 | | currentLazyObserver = userProfile.bodySnapshotObserver; |
| 0 | 283 | | currentLazyObserver.AddListener(avatar.SetImpostorTexture); |
| 0 | 284 | | } |
| | 285 | |
|
| 0 | 286 | | private void PlayerPointerExit() { playerName?.SetForceShow(false); } |
| | 287 | |
|
| 0 | 288 | | private void PlayerPointerEnter() { playerName?.SetForceShow(true); } |
| | 289 | |
|
| | 290 | | internal void UpdatePlayerStatus(IDCLEntity entity, PBAvatarShape model) |
| | 291 | | { |
| | 292 | | // Remove the player status if the userId changes |
| 5 | 293 | | if (player != null && (player.id != model.Id || player.name != model.GetName())) |
| 0 | 294 | | otherPlayers.Remove(player.id); |
| | 295 | |
|
| 5 | 296 | | if (isGlobalSceneAvatar && string.IsNullOrEmpty(model?.GetName())) |
| 0 | 297 | | return; |
| | 298 | |
|
| 5 | 299 | | bool isNew = player == null; |
| 5 | 300 | | if (isNew) |
| 5 | 301 | | player = new Player(); |
| | 302 | |
|
| 5 | 303 | | bool isNameDirty = player.name != model.GetName(); |
| | 304 | |
|
| 5 | 305 | | player.id = model.Id; |
| 5 | 306 | | player.name = model.GetName(); |
| 5 | 307 | | player.isTalking = model.Talking; |
| 5 | 308 | | player.worldPosition = entity.gameObject.transform.position; |
| 5 | 309 | | player.avatar = avatar; |
| 5 | 310 | | player.onPointerDownCollider = onPointerDown; |
| 5 | 311 | | player.collider = avatarCollider; |
| | 312 | |
|
| 5 | 313 | | if (isNew) |
| | 314 | | { |
| 5 | 315 | | player.playerName = playerName; |
| 5 | 316 | | player.playerName.Show(); |
| 5 | 317 | | player.anchorPoints = anchorPoints; |
| 5 | 318 | | if (isGlobalSceneAvatar) |
| | 319 | | { |
| | 320 | | // TODO: Note: This is having a problem, sometimes the users has been detected as new 2 times and it |
| | 321 | | // we should investigate this |
| 5 | 322 | | if (otherPlayers.ContainsKey(player.id)) |
| 3 | 323 | | otherPlayers.Remove(player.id); |
| 5 | 324 | | otherPlayers.Add(player.id, player); |
| | 325 | | } |
| 5 | 326 | | avatarReporterController.ReportAvatarRemoved(); |
| | 327 | | } |
| | 328 | |
|
| 5 | 329 | | avatarReporterController.SetUp(entity.scene.sceneData.sceneNumber, player.id); |
| | 330 | |
|
| 5 | 331 | | float height = AvatarSystemUtils.AVATAR_Y_OFFSET + avatar.extents.y; |
| | 332 | |
|
| 5 | 333 | | anchorPoints.Prepare(avatarContainer.transform, avatar.GetBones(), height); |
| | 334 | |
|
| 5 | 335 | | player.playerName.SetIsTalking(model.Talking); |
| 5 | 336 | | player.playerName.SetYOffset(Mathf.Max(MINIMUM_PLAYERNAME_HEIGHT, height)); |
| | 337 | |
|
| 5 | 338 | | if (isNameDirty) |
| | 339 | | { |
| 5 | 340 | | UserProfile profile = userProfileBridge.Get(model.Id); |
| 5 | 341 | | player.playerName.SetName(model.GetName(), profile?.hasClaimedName ?? false, profile?.isGuest ?? false); |
| | 342 | | } |
| 5 | 343 | | } |
| | 344 | |
|
| | 345 | | private void Update() |
| | 346 | | { |
| 0 | 347 | | if (player == null || entity == null) |
| 0 | 348 | | return; |
| | 349 | |
|
| 0 | 350 | | player.worldPosition = entity.gameObject.transform.position; |
| 0 | 351 | | player.forwardDirection = entity.gameObject.transform.forward; |
| 0 | 352 | | avatarReporterController.ReportAvatarPosition(player.worldPosition); |
| 0 | 353 | | } |
| | 354 | |
|
| | 355 | | public void DisablePassport() |
| | 356 | | { |
| 4 | 357 | | if (onPointerDown.collider == null) |
| 0 | 358 | | return; |
| | 359 | |
|
| 4 | 360 | | onPointerDown.SetPassportEnabled(false); |
| 4 | 361 | | } |
| | 362 | |
|
| | 363 | | public void EnablePassport() |
| | 364 | | { |
| 4 | 365 | | if (onPointerDown.collider == null) |
| 0 | 366 | | return; |
| | 367 | |
|
| 4 | 368 | | onPointerDown.SetPassportEnabled(true); |
| 4 | 369 | | } |
| | 370 | |
|
| | 371 | | private void OnEntityTransformChanged(object newModel) |
| | 372 | | { |
| 0 | 373 | | DCLTransform.Model newTransformModel = (DCLTransform.Model)newModel; |
| 0 | 374 | | OnEntityTransformChanged(newTransformModel.position, newTransformModel.rotation, !initializedPosition); |
| 0 | 375 | | } |
| | 376 | |
|
| | 377 | | private void OnEntityTransformChanged(in UnityEngine.Vector3 position, in Quaternion rotation, bool inmediate) |
| | 378 | | { |
| 4 | 379 | | if (entity == null) |
| 0 | 380 | | return; |
| | 381 | |
|
| 4 | 382 | | if (isGlobalSceneAvatar) |
| | 383 | | { |
| 4 | 384 | | avatarMovementController.OnTransformChanged(position, rotation, inmediate); |
| | 385 | | } |
| | 386 | | else |
| | 387 | | { |
| 0 | 388 | | var scenePosition = DCL.Helpers.Utils.GridToWorldPosition(entity.scene.sceneData.basePosition.x, entity. |
| 0 | 389 | | avatarMovementController.OnTransformChanged(scenePosition + position, rotation, inmediate); |
| | 390 | | } |
| 4 | 391 | | initializedPosition = true; |
| 4 | 392 | | } |
| | 393 | |
|
| | 394 | | public void OnPoolRelease() |
| | 395 | | { |
| 0 | 396 | | Cleanup(); |
| 0 | 397 | | } |
| | 398 | |
|
| | 399 | | public void OnPoolGet() |
| | 400 | | { |
| 5 | 401 | | initializedPosition = false; |
| 5 | 402 | | model = new PBAvatarShape(); |
| 5 | 403 | | player = null; |
| 5 | 404 | | SetPlayerNameReference(); |
| 5 | 405 | | } |
| | 406 | |
|
| | 407 | | public void ApplyHideAvatarModifier() |
| | 408 | | { |
| 1 | 409 | | avatar.AddVisibilityConstraint(IN_HIDE_AREA); |
| 1 | 410 | | onPointerDown.gameObject.SetActive(false); |
| 1 | 411 | | playerNameContainer.SetActive(false); |
| 1 | 412 | | } |
| | 413 | |
|
| | 414 | | public void RemoveHideAvatarModifier() |
| | 415 | | { |
| 1 | 416 | | avatar.RemoveVisibilityConstrain(IN_HIDE_AREA); |
| 1 | 417 | | onPointerDown.gameObject.SetActive(true); |
| 1 | 418 | | playerNameContainer.SetActive(true); |
| 1 | 419 | | } |
| | 420 | |
|
| | 421 | | public void Cleanup() |
| | 422 | | { |
| 9 | 423 | | playerName?.Hide(true); |
| 9 | 424 | | if (player != null) |
| | 425 | | { |
| 5 | 426 | | otherPlayers.Remove(player.id); |
| 5 | 427 | | player = null; |
| | 428 | | } |
| | 429 | |
|
| 9 | 430 | | loadingCts?.Cancel(); |
| 9 | 431 | | loadingCts?.Dispose(); |
| 9 | 432 | | loadingCts = null; |
| | 433 | |
|
| 9 | 434 | | currentLazyObserver?.RemoveListener(avatar.SetImpostorTexture); |
| 9 | 435 | | avatar.Dispose(); |
| | 436 | |
|
| 9 | 437 | | if (poolableObject != null) |
| | 438 | | { |
| 0 | 439 | | poolableObject.OnRelease -= Cleanup; |
| | 440 | | } |
| | 441 | |
|
| 9 | 442 | | onPointerDown.OnPointerDownReport -= PlayerClicked; |
| 9 | 443 | | onPointerDown.OnPointerEnterReport -= PlayerPointerEnter; |
| 9 | 444 | | onPointerDown.OnPointerExitReport -= PlayerPointerExit; |
| 9 | 445 | | outlineOnHover.OnPointerEnterReport -= PlayerPointerEnter; |
| 9 | 446 | | outlineOnHover.OnPointerExitReport -= PlayerPointerExit; |
| | 447 | |
|
| 9 | 448 | | if (entity != null) |
| | 449 | | { |
| 4 | 450 | | entity.OnTransformChange = null; |
| 4 | 451 | | entity = null; |
| | 452 | | } |
| | 453 | |
|
| 9 | 454 | | avatarReporterController.ReportAvatarRemoved(); |
| 9 | 455 | | } |
| | 456 | |
|
| | 457 | | [ContextMenu("Print current profile")] |
| 0 | 458 | | private void PrintCurrentProfile() { Debug.Log(JsonUtility.ToJson(model)); } |
| | 459 | | } |
| | 460 | | } |
| | 461 | |
|