| | 1 | | using System; |
| | 2 | | using DCL.Components; |
| | 3 | | using DCL.Interface; |
| | 4 | | using System.Collections; |
| | 5 | | using System.Collections.Generic; |
| | 6 | | using System.Linq; |
| | 7 | | using System.Threading; |
| | 8 | | using AvatarSystem; |
| | 9 | | using DCL.Configuration; |
| | 10 | | using DCL.Emotes; |
| | 11 | | using DCL.Helpers; |
| | 12 | | using DCL.Models; |
| | 13 | | using GPUSkinning; |
| | 14 | | using UnityEngine; |
| | 15 | | using Avatar = AvatarSystem.Avatar; |
| | 16 | | using LOD = AvatarSystem.LOD; |
| | 17 | |
|
| | 18 | | namespace DCL |
| | 19 | | { |
| | 20 | | public class AvatarShape : BaseComponent, IHideAvatarAreaHandler, IHidePassportAreaHandler |
| | 21 | | { |
| | 22 | | private const string CURRENT_PLAYER_ID = "CurrentPlayerInfoCardId"; |
| | 23 | | private const float MINIMUM_PLAYERNAME_HEIGHT = 2.7f; |
| | 24 | | private const float AVATAR_PASSPORT_TOGGLE_ALPHA_THRESHOLD = 0.9f; |
| | 25 | | private const string IN_HIDE_AREA = "IN_HIDE_AREA"; |
| | 26 | |
|
| | 27 | | public static event Action<IDCLEntity, AvatarShape> OnAvatarShapeUpdated; |
| | 28 | |
|
| | 29 | | public GameObject avatarContainer; |
| | 30 | | public Collider avatarCollider; |
| | 31 | | public AvatarMovementController avatarMovementController; |
| | 32 | | public StickersController stickersControllers; |
| | 33 | | [SerializeField] private Transform avatarRevealContainer; |
| | 34 | | [SerializeField] private GameObject armatureContainer; |
| | 35 | |
|
| | 36 | | [SerializeField] internal AvatarOnPointerDown onPointerDown; |
| | 37 | | [SerializeField] internal GameObject playerNameContainer; |
| | 38 | | internal IPlayerName playerName; |
| | 39 | | internal IAvatarReporterController avatarReporterController; |
| | 40 | |
|
| | 41 | | private StringVariable currentPlayerInfoCardId; |
| | 42 | |
|
| | 43 | | public bool everythingIsLoaded; |
| | 44 | |
|
| | 45 | | bool initializedPosition = false; |
| | 46 | |
|
| | 47 | | private Player player = null; |
| 0 | 48 | | private BaseDictionary<string, Player> otherPlayers => DataStore.i.player.otherPlayers; |
| | 49 | |
|
| 403 | 50 | | private IAvatarAnchorPoints anchorPoints = new AvatarAnchorPoints(); |
| | 51 | | internal IAvatar avatar; |
| 403 | 52 | | private readonly AvatarModel currentAvatar = new AvatarModel { wearables = new List<string>() }; |
| | 53 | | private CancellationTokenSource loadingCts; |
| | 54 | | private ILazyTextureObserver currentLazyObserver; |
| 403 | 55 | | private bool isGlobalSceneAvatar = true; |
| | 56 | | private BaseRefCounter<AvatarModifierAreaID> currentActiveModifiers; |
| | 57 | |
|
| 4 | 58 | | public override string componentName => "avatarShape"; |
| | 59 | |
|
| | 60 | | private void Awake() |
| | 61 | | { |
| 401 | 62 | | model = new AvatarModel(); |
| 401 | 63 | | currentPlayerInfoCardId = Resources.Load<StringVariable>(CURRENT_PLAYER_ID); |
| | 64 | |
|
| 401 | 65 | | if (DataStore.i.avatarConfig.useHologramAvatar.Get()) |
| 2 | 66 | | avatar = GetAvatarWithHologram(); |
| | 67 | | else |
| 399 | 68 | | avatar = GetStandardAvatar(); |
| | 69 | |
|
| 401 | 70 | | if (avatarReporterController == null) |
| | 71 | | { |
| 401 | 72 | | avatarReporterController = new AvatarReporterController(Environment.i.world.state); |
| | 73 | | } |
| 401 | 74 | | } |
| | 75 | |
|
| | 76 | | private Avatar GetStandardAvatar() |
| | 77 | | { |
| 399 | 78 | | Visibility visibility = new Visibility(); |
| 399 | 79 | | LOD avatarLOD = new LOD(avatarContainer, visibility, avatarMovementController); |
| 399 | 80 | | AvatarAnimatorLegacy animator = GetComponentInChildren<AvatarAnimatorLegacy>(); |
| 399 | 81 | | return new Avatar( |
| | 82 | | new AvatarCurator(new WearableItemResolver(), Environment.i.serviceLocator.Get<IEmotesCatalogService>()) |
| | 83 | | new Loader(new WearableLoaderFactory(), avatarContainer, new AvatarMeshCombinerHelper()), |
| | 84 | | animator, |
| | 85 | | visibility, |
| | 86 | | avatarLOD, |
| | 87 | | new SimpleGPUSkinning(), |
| | 88 | | new GPUSkinningThrottler(), |
| | 89 | | new EmoteAnimationEquipper(animator, DataStore.i.emotes)); |
| | 90 | | } |
| | 91 | |
|
| | 92 | | private AvatarWithHologram GetAvatarWithHologram() |
| | 93 | | { |
| 2 | 94 | | Visibility visibility = new Visibility(); |
| 2 | 95 | | LOD avatarLOD = new LOD(avatarContainer, visibility, avatarMovementController); |
| 2 | 96 | | AvatarAnimatorLegacy animator = GetComponentInChildren<AvatarAnimatorLegacy>(); |
| 2 | 97 | | BaseAvatar baseAvatar = new BaseAvatar(avatarRevealContainer, armatureContainer, avatarLOD); |
| 2 | 98 | | return new AvatarWithHologram( |
| | 99 | | baseAvatar, |
| | 100 | | new AvatarCurator(new WearableItemResolver(), Environment.i.serviceLocator.Get<IEmotesCatalogService |
| | 101 | | new Loader(new WearableLoaderFactory(), avatarContainer, new AvatarMeshCombinerHelper()), |
| | 102 | | animator, |
| | 103 | | visibility, |
| | 104 | | avatarLOD, |
| | 105 | | new SimpleGPUSkinning(), |
| | 106 | | new GPUSkinningThrottler(), |
| | 107 | | new EmoteAnimationEquipper(animator, DataStore.i.emotes)); |
| | 108 | | } |
| | 109 | |
|
| | 110 | | private void Start() |
| | 111 | | { |
| 1 | 112 | | playerName = GetComponentInChildren<IPlayerName>(); |
| 1 | 113 | | playerName?.Hide(true); |
| 1 | 114 | | currentActiveModifiers ??= new BaseRefCounter<AvatarModifierAreaID>(); |
| 1 | 115 | | } |
| | 116 | |
|
| | 117 | | private void PlayerClicked() |
| | 118 | | { |
| 0 | 119 | | if (model == null) |
| 0 | 120 | | return; |
| 0 | 121 | | currentPlayerInfoCardId.Set(((AvatarModel) model).id); |
| 0 | 122 | | } |
| | 123 | |
|
| | 124 | | public void OnDestroy() |
| | 125 | | { |
| 401 | 126 | | Cleanup(); |
| | 127 | |
|
| 401 | 128 | | if (poolableObject != null && poolableObject.isInsidePool) |
| 5 | 129 | | poolableObject.RemoveFromPool(); |
| 401 | 130 | | } |
| | 131 | |
|
| | 132 | | public override IEnumerator ApplyChanges(BaseModel newModel) |
| | 133 | | { |
| 5 | 134 | | isGlobalSceneAvatar = scene.sceneData.id == EnvironmentSettings.AVATAR_GLOBAL_SCENE_ID; |
| | 135 | |
|
| 5 | 136 | | DisablePassport(); |
| | 137 | |
|
| 5 | 138 | | var model = (AvatarModel) newModel; |
| | 139 | |
|
| 5 | 140 | | bool needsLoading = !model.HaveSameWearablesAndColors(currentAvatar); |
| 5 | 141 | | currentAvatar.CopyFrom(model); |
| | 142 | |
|
| 5 | 143 | | if (string.IsNullOrEmpty(model.bodyShape) || model.wearables.Count == 0) |
| 1 | 144 | | yield break; |
| | 145 | | #if UNITY_EDITOR |
| 4 | 146 | | gameObject.name = $"Avatar Shape {model.name}"; |
| | 147 | | #endif |
| 4 | 148 | | everythingIsLoaded = false; |
| | 149 | |
|
| | 150 | | bool avatarDone = false; |
| | 151 | | bool avatarFailed = false; |
| | 152 | |
|
| 4 | 153 | | yield return null; //NOTE(Brian): just in case we have a Object.Destroy waiting to be resolved. |
| | 154 | |
|
| | 155 | | // To deal with the cases in which the entity transform was configured before the AvatarShape |
| 0 | 156 | | if (!initializedPosition && scene.componentsManagerLegacy.HasComponent(entity, CLASS_ID_COMPONENT.TRANSFORM) |
| | 157 | | { |
| 0 | 158 | | initializedPosition = true; |
| 0 | 159 | | OnEntityTransformChanged(entity.gameObject.transform.localPosition, |
| | 160 | | entity.gameObject.transform.localRotation, true); |
| | 161 | | } |
| | 162 | |
|
| | 163 | | // NOTE: we subscribe here to transform changes since we might "lose" the message |
| | 164 | | // if we subscribe after a any yield |
| 0 | 165 | | entity.OnTransformChange -= OnEntityTransformChanged; |
| 0 | 166 | | entity.OnTransformChange += OnEntityTransformChanged; |
| | 167 | |
|
| 0 | 168 | | var wearableItems = model.wearables.ToList(); |
| 0 | 169 | | wearableItems.Add(model.bodyShape); |
| | 170 | |
|
| 0 | 171 | | if (avatar.status != IAvatar.Status.Loaded || needsLoading) |
| | 172 | | { |
| 0 | 173 | | HashSet<string> emotes = new HashSet<string>(currentAvatar.emotes.Select(x => x.urn)); |
| 0 | 174 | | var embeddedEmotesSo = Resources.Load<EmbeddedEmotesSO>("EmbeddedEmotes"); |
| 0 | 175 | | var embeddedEmoteIds = embeddedEmotesSo.emotes.Select(x => x.id); |
| | 176 | | //here we add emote ids to both new and old emote loading flow to merge the results later |
| | 177 | | //because some users might have emotes as wearables and others only as emotes |
| 0 | 178 | | foreach (var emoteId in embeddedEmoteIds) |
| | 179 | | { |
| 0 | 180 | | emotes.Add(emoteId); |
| 0 | 181 | | wearableItems.Add(emoteId); |
| | 182 | | } |
| | 183 | |
|
| | 184 | | //TODO Add Collider to the AvatarSystem |
| | 185 | | //TODO Without this the collider could get triggered disabling the avatar container, |
| | 186 | | // this would stop the loading process due to the underlying coroutines of the AssetLoader not starting |
| 0 | 187 | | avatarCollider.gameObject.SetActive(false); |
| | 188 | |
|
| 0 | 189 | | SetImpostor(model.id); |
| 0 | 190 | | loadingCts?.Cancel(); |
| 0 | 191 | | loadingCts?.Dispose(); |
| 0 | 192 | | loadingCts = new CancellationTokenSource(); |
| 0 | 193 | | if (DataStore.i.avatarConfig.useHologramAvatar.Get()) |
| | 194 | | { |
| 0 | 195 | | playerName.SetName(model.name); |
| 0 | 196 | | playerName.Show(true); |
| | 197 | | } |
| 0 | 198 | | avatar.Load(wearableItems, emotes.ToList(), new AvatarSettings |
| | 199 | | { |
| | 200 | | playerName = model.name, |
| | 201 | | bodyshapeId = model.bodyShape, |
| | 202 | | eyesColor = model.eyeColor, |
| | 203 | | skinColor = model.skinColor, |
| | 204 | | hairColor = model.hairColor, |
| | 205 | | }, loadingCts.Token); |
| | 206 | |
|
| | 207 | | // Yielding a UniTask doesn't do anything, we manually wait until the avatar is ready |
| 0 | 208 | | yield return new WaitUntil(() => avatar.status == IAvatar.Status.Loaded); |
| | 209 | | } |
| | 210 | |
|
| 0 | 211 | | avatar.PlayEmote(model.expressionTriggerId, model.expressionTriggerTimestamp); |
| | 212 | |
|
| 0 | 213 | | onPointerDown.OnPointerDownReport -= PlayerClicked; |
| 0 | 214 | | onPointerDown.OnPointerDownReport += PlayerClicked; |
| 0 | 215 | | onPointerDown.OnPointerEnterReport -= PlayerPointerEnter; |
| 0 | 216 | | onPointerDown.OnPointerEnterReport += PlayerPointerEnter; |
| 0 | 217 | | onPointerDown.OnPointerExitReport -= PlayerPointerExit; |
| 0 | 218 | | onPointerDown.OnPointerExitReport += PlayerPointerExit; |
| | 219 | |
|
| 0 | 220 | | UpdatePlayerStatus(model); |
| | 221 | |
|
| 0 | 222 | | onPointerDown.Initialize( |
| | 223 | | new OnPointerDown.Model() |
| | 224 | | { |
| | 225 | | type = OnPointerDown.NAME, |
| | 226 | | button = WebInterface.ACTION_BUTTON.POINTER.ToString(), |
| | 227 | | hoverText = "view profile" |
| | 228 | | }, |
| | 229 | | entity, player |
| | 230 | | ); |
| | 231 | |
|
| 0 | 232 | | avatarCollider.gameObject.SetActive(true); |
| | 233 | |
|
| 0 | 234 | | everythingIsLoaded = true; |
| 0 | 235 | | OnAvatarShapeUpdated?.Invoke(entity, this); |
| | 236 | |
|
| 0 | 237 | | EnablePasssport(); |
| | 238 | |
|
| 0 | 239 | | onPointerDown.SetColliderEnabled(isGlobalSceneAvatar); |
| 0 | 240 | | onPointerDown.SetOnClickReportEnabled(isGlobalSceneAvatar); |
| 0 | 241 | | } |
| | 242 | |
|
| | 243 | | public void SetImpostor(string userId) |
| | 244 | | { |
| 0 | 245 | | currentLazyObserver?.RemoveListener(avatar.SetImpostorTexture); |
| 0 | 246 | | if (string.IsNullOrEmpty(userId)) |
| 0 | 247 | | return; |
| | 248 | |
|
| 0 | 249 | | UserProfile userProfile = UserProfileController.GetProfileByUserId(userId); |
| 0 | 250 | | if (userProfile == null) |
| 0 | 251 | | return; |
| | 252 | |
|
| 0 | 253 | | currentLazyObserver = userProfile.bodySnapshotObserver; |
| 0 | 254 | | currentLazyObserver.AddListener(avatar.SetImpostorTexture); |
| 0 | 255 | | } |
| | 256 | |
|
| 0 | 257 | | private void PlayerPointerExit() { playerName?.SetForceShow(false); } |
| 0 | 258 | | private void PlayerPointerEnter() { playerName?.SetForceShow(true); } |
| | 259 | |
|
| | 260 | | private void UpdatePlayerStatus(AvatarModel model) |
| | 261 | | { |
| | 262 | | // Remove the player status if the userId changes |
| 0 | 263 | | if (player != null && (player.id != model.id || player.name != model.name)) |
| 0 | 264 | | otherPlayers.Remove(player.id); |
| | 265 | |
|
| 0 | 266 | | if (isGlobalSceneAvatar && string.IsNullOrEmpty(model?.id)) |
| 0 | 267 | | return; |
| | 268 | |
|
| 0 | 269 | | bool isNew = player == null; |
| 0 | 270 | | if (isNew) |
| | 271 | | { |
| 0 | 272 | | player = new Player(); |
| | 273 | | } |
| | 274 | |
|
| 0 | 275 | | bool isNameDirty = player.name != model.name; |
| | 276 | |
|
| 0 | 277 | | player.id = model.id; |
| 0 | 278 | | player.name = model.name; |
| 0 | 279 | | player.isTalking = model.talking; |
| 0 | 280 | | player.worldPosition = entity.gameObject.transform.position; |
| 0 | 281 | | player.avatar = avatar; |
| 0 | 282 | | player.onPointerDownCollider = onPointerDown; |
| 0 | 283 | | player.collider = avatarCollider; |
| | 284 | |
|
| 0 | 285 | | if (isNew) |
| | 286 | | { |
| 0 | 287 | | player.playerName = playerName; |
| 0 | 288 | | player.playerName.Show(); |
| 0 | 289 | | player.anchorPoints = anchorPoints; |
| 0 | 290 | | if (isGlobalSceneAvatar) |
| | 291 | | { |
| | 292 | | // TODO: Note: This is having a problem, sometimes the users has been detected as new 2 times and it |
| | 293 | | // we should investigate this |
| 0 | 294 | | if (otherPlayers.ContainsKey(player.id)) |
| 0 | 295 | | otherPlayers.Remove(player.id); |
| 0 | 296 | | otherPlayers.Add(player.id, player); |
| | 297 | | } |
| 0 | 298 | | avatarReporterController.ReportAvatarRemoved(); |
| | 299 | | } |
| | 300 | |
|
| 0 | 301 | | avatarReporterController.SetUp(entity.scene.sceneData.id, player.id); |
| | 302 | |
|
| 0 | 303 | | float height = AvatarSystemUtils.AVATAR_Y_OFFSET + avatar.extents.y; |
| | 304 | |
|
| 0 | 305 | | anchorPoints.Prepare(avatarContainer.transform, avatar.GetBones(), height); |
| | 306 | |
|
| 0 | 307 | | player.playerName.SetIsTalking(model.talking); |
| 0 | 308 | | player.playerName.SetYOffset(Mathf.Max(MINIMUM_PLAYERNAME_HEIGHT, height)); |
| 0 | 309 | | if (isNameDirty) |
| 0 | 310 | | player.playerName.SetName(model.name); |
| 0 | 311 | | } |
| | 312 | |
|
| | 313 | | private void Update() |
| | 314 | | { |
| 1 | 315 | | if (player != null) |
| | 316 | | { |
| 0 | 317 | | player.worldPosition = entity.gameObject.transform.position; |
| 0 | 318 | | player.forwardDirection = entity.gameObject.transform.forward; |
| 0 | 319 | | avatarReporterController.ReportAvatarPosition(player.worldPosition); |
| | 320 | | } |
| 1 | 321 | | } |
| | 322 | |
|
| | 323 | | private void OnEntityTransformChanged(object newModel) |
| | 324 | | { |
| 0 | 325 | | DCLTransform.Model newTransformModel = (DCLTransform.Model)newModel; |
| 0 | 326 | | OnEntityTransformChanged(newTransformModel.position, newTransformModel.rotation, !initializedPosition); |
| 0 | 327 | | } |
| | 328 | |
|
| | 329 | | private void OnEntityTransformChanged(in Vector3 position, in Quaternion rotation, bool inmediate) |
| | 330 | | { |
| 0 | 331 | | if (isGlobalSceneAvatar) |
| | 332 | | { |
| 0 | 333 | | avatarMovementController.OnTransformChanged(position, rotation, inmediate); |
| 0 | 334 | | } |
| | 335 | | else |
| | 336 | | { |
| 0 | 337 | | var scenePosition = Utils.GridToWorldPosition(entity.scene.sceneData.basePosition.x, entity.scene.sceneD |
| 0 | 338 | | avatarMovementController.OnTransformChanged(scenePosition + position, rotation, inmediate); |
| | 339 | | } |
| 0 | 340 | | initializedPosition = true; |
| 0 | 341 | | } |
| | 342 | |
|
| | 343 | | public override void OnPoolGet() |
| | 344 | | { |
| 5 | 345 | | base.OnPoolGet(); |
| | 346 | |
|
| 5 | 347 | | everythingIsLoaded = false; |
| 5 | 348 | | initializedPosition = false; |
| 5 | 349 | | model = new AvatarModel(); |
| 5 | 350 | | player = null; |
| 5 | 351 | | } |
| | 352 | |
|
| | 353 | | public void ApplyHideAvatarModifier() |
| | 354 | | { |
| 0 | 355 | | if (!currentActiveModifiers.ContainsKey(AvatarModifierAreaID.HIDE_AVATAR)) |
| | 356 | | { |
| 0 | 357 | | avatar.AddVisibilityConstrain(IN_HIDE_AREA); |
| 0 | 358 | | onPointerDown.gameObject.SetActive(false); |
| 0 | 359 | | playerNameContainer.SetActive(false); |
| 0 | 360 | | stickersControllers.ToggleHideArea(true); |
| | 361 | | } |
| 0 | 362 | | currentActiveModifiers.AddRefCount(AvatarModifierAreaID.HIDE_AVATAR); |
| 0 | 363 | | } |
| | 364 | |
|
| | 365 | | public void RemoveHideAvatarModifier() |
| | 366 | | { |
| 0 | 367 | | currentActiveModifiers.RemoveRefCount(AvatarModifierAreaID.HIDE_AVATAR); |
| 0 | 368 | | if (!currentActiveModifiers.ContainsKey(AvatarModifierAreaID.HIDE_AVATAR)) |
| | 369 | | { |
| 0 | 370 | | avatar.RemoveVisibilityConstrain(IN_HIDE_AREA); |
| 0 | 371 | | onPointerDown.gameObject.SetActive(true); |
| 0 | 372 | | playerNameContainer.SetActive(true); |
| 0 | 373 | | stickersControllers.ToggleHideArea(false); |
| | 374 | | } |
| 0 | 375 | | } |
| | 376 | |
|
| | 377 | | public void ApplyHidePassportModifier() |
| | 378 | | { |
| 0 | 379 | | if (!currentActiveModifiers.ContainsKey(AvatarModifierAreaID.DISABLE_PASSPORT)) |
| | 380 | | { |
| 0 | 381 | | DisablePassport(); |
| | 382 | | } |
| 0 | 383 | | currentActiveModifiers.AddRefCount(AvatarModifierAreaID.DISABLE_PASSPORT); |
| 0 | 384 | | } |
| | 385 | |
|
| | 386 | | public void RemoveHidePassportModifier() |
| | 387 | | { |
| 0 | 388 | | currentActiveModifiers.RemoveRefCount(AvatarModifierAreaID.DISABLE_PASSPORT); |
| 0 | 389 | | if (!currentActiveModifiers.ContainsKey(AvatarModifierAreaID.DISABLE_PASSPORT)) |
| | 390 | | { |
| 0 | 391 | | EnablePasssport(); |
| | 392 | | } |
| 0 | 393 | | } |
| | 394 | |
|
| | 395 | | private void EnablePasssport() |
| | 396 | | { |
| 0 | 397 | | if (onPointerDown.collider == null) |
| 0 | 398 | | return; |
| | 399 | |
|
| 0 | 400 | | onPointerDown.SetPassportEnabled(true); |
| 0 | 401 | | } |
| | 402 | |
|
| | 403 | | private void DisablePassport() |
| | 404 | | { |
| 5 | 405 | | if (onPointerDown.collider == null) |
| 0 | 406 | | return; |
| | 407 | |
|
| 5 | 408 | | onPointerDown.SetPassportEnabled(false); |
| 5 | 409 | | } |
| | 410 | |
|
| | 411 | | public override void Cleanup() |
| | 412 | | { |
| 411 | 413 | | base.Cleanup(); |
| | 414 | |
|
| 411 | 415 | | playerName?.Hide(true); |
| 411 | 416 | | if (player != null) |
| | 417 | | { |
| 0 | 418 | | otherPlayers.Remove(player.id); |
| 0 | 419 | | player = null; |
| | 420 | | } |
| | 421 | |
|
| 411 | 422 | | loadingCts?.Cancel(); |
| 411 | 423 | | loadingCts?.Dispose(); |
| 411 | 424 | | loadingCts = null; |
| 411 | 425 | | currentLazyObserver?.RemoveListener(avatar.SetImpostorTexture); |
| 411 | 426 | | avatar.Dispose(); |
| | 427 | |
|
| 411 | 428 | | if (poolableObject != null) |
| | 429 | | { |
| 15 | 430 | | poolableObject.OnRelease -= Cleanup; |
| | 431 | | } |
| | 432 | |
|
| 411 | 433 | | onPointerDown.OnPointerDownReport -= PlayerClicked; |
| 411 | 434 | | onPointerDown.OnPointerEnterReport -= PlayerPointerEnter; |
| 411 | 435 | | onPointerDown.OnPointerExitReport -= PlayerPointerExit; |
| | 436 | |
|
| 411 | 437 | | if (entity != null) |
| | 438 | | { |
| 5 | 439 | | entity.OnTransformChange = null; |
| 5 | 440 | | entity = null; |
| | 441 | | } |
| | 442 | |
|
| 411 | 443 | | avatarReporterController.ReportAvatarRemoved(); |
| 411 | 444 | | } |
| | 445 | |
|
| 1 | 446 | | public override int GetClassId() { return (int) CLASS_ID_COMPONENT.AVATAR_SHAPE; } |
| | 447 | |
|
| | 448 | | [ContextMenu("Print current profile")] |
| 0 | 449 | | private void PrintCurrentProfile() { Debug.Log(JsonUtility.ToJson(model)); } |
| | 450 | |
|
| | 451 | | } |
| | 452 | | } |