Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sequential emotes #5725

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cec3e0d
Emotes extra content is now being loaded
Kinerius Aug 24, 2023
3f98721
Big refactor
Kinerius Aug 29, 2023
d05a9a1
Fix legacy tests
Kinerius Aug 30, 2023
1ef0d6d
fixed null reference during test tear down
Kinerius Aug 30, 2023
6d1deaa
Fixed issues when changing emotes
Kinerius Aug 31, 2023
30e84e7
Added support for audio sources
Kinerius Aug 31, 2023
e72fbfe
Fixed the audio container and 3d spatial settings
Kinerius Aug 31, 2023
87f739a
Fix nre
Kinerius Aug 31, 2023
88a8f46
fixed emotes not stopping, spatial not working and hiccup during emot…
Kinerius Aug 31, 2023
ef4f7d5
Bugfixes
Kinerius Sep 1, 2023
51a270a
Emotes sound are now tied to an Audio Container which uses the Avatar…
Kinerius Sep 5, 2023
90336ab
Added audio clip disposal
Kinerius Sep 5, 2023
aa007bb
Fix emotes not looping
Kinerius Sep 6, 2023
5fd1868
Changed emotes audio mixed bus to see if it works in build
Kinerius Sep 6, 2023
a2609ca
test: always trigger loop emotes
Kinerius Sep 6, 2023
35f0769
Fixed backpack snapshot texture being taken when not having the avata…
Kinerius Sep 6, 2023
e81017c
Fixed looped emotes not playing after user connects near a user that …
Kinerius Sep 6, 2023
c0c0935
Fix emote not stopping when avatar is rebuilt, fix emote wheel not se…
Kinerius Sep 7, 2023
b1c44bd
Slight refactor for code review
Kinerius Sep 11, 2023
d49ecdf
Fixed tests
Kinerius Sep 11, 2023
b9c717b
Add sound texture. Update and rename corner rarity asset.
RominaMarchetti Sep 11, 2023
a91c645
Fixed avatar audio not working
Kinerius Sep 11, 2023
4b3eefe
Add sound icon to emote item
RominaMarchetti Sep 11, 2023
d2a9d1d
Polish info card and emote selected card
RominaMarchetti Sep 11, 2023
47bf873
Forgot to push this
Kinerius Sep 11, 2023
34130d4
Wired up sound icon in emote cards
Kinerius Sep 11, 2023
c3d7b94
Fixed sound not working on WebgL
Kinerius Sep 12, 2023
e6649a4
Tweaked emotes section anchors and margins
Kinerius Sep 13, 2023
2ab3670
Rollback margin
Kinerius Sep 13, 2023
cf4d95d
Update wearable item: send highlight asset backward and swap new and …
RominaMarchetti Sep 13, 2023
a49e495
Fixed emotes with different animation order or nomenclature not worki…
Kinerius Sep 18, 2023
89bde91
Fixed loop emotes being out of sync
Kinerius Sep 18, 2023
da0f93a
Post rebase fix
Kinerius Sep 18, 2023
1ea95d5
Backpack emotes now will not occlude their renderers
Kinerius Sep 19, 2023
4f9a553
Added sequential emotes support
Kinerius Sep 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ MonoBehaviour:
m_Address: VRMExporter
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: fd6cf4a6f210c0b44945d9f5f646cd99
m_Address: EmoteAudioSource
m_ReadOnly: 0
m_SerializedLabels: []
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 436e0d4fdc1cdfa4aaef13be2e8bcef8, type: 2}
m_SchemaSet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public async void ApplyModel(IParcelScene scene, IDCLEntity entity, PBAvatarShap

// If the model contains a value for expressionTriggerId then we try it, if value doesn't exist, we skip
if(model.HasExpressionTriggerId)
avatar.PlayEmote(model.ExpressionTriggerId, model.GetExpressionTriggerTimestamp());
avatar.GetEmotesController().PlayEmote(model.ExpressionTriggerId, model.GetExpressionTriggerTimestamp());

UpdatePlayerStatus(entity, model);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"GUID:ce5ce184029b7f34c9188d4ae2aeb3d7",
"GUID:6c1761dc8f737004198eb333521bd665",
"GUID:c8ea72e806cd2ab47b539b37895b86b7",
"GUID:9cccce9925d3495d8a5e4fa5b25f54a5"
"GUID:9cccce9925d3495d8a5e4fa5b25f54a5",
"GUID:2d39cc535b437e749965d4a8258f0c13"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Cysharp.Threading.Tasks;
using DCL.Controllers;
using DCL.Emotes;
using DCL.Helpers;
using DCL.Models;
using DCLServices.MapRendererV2;
using NSubstitute;
Expand All @@ -21,6 +20,7 @@ public class AvatarShapeShould
private IParcelScene scene;
private AvatarShape avatarShape;
private GameObject gameObject;
private IAvatarEmotesController emotesController;

[SetUp]
public void SetUp()
Expand All @@ -29,13 +29,15 @@ public void SetUp()
entity = Substitute.For<IDCLEntity>();
scene = Substitute.For<IParcelScene>();
avatar = Substitute.For<IAvatar>();
emotesController = Substitute.For<IAvatarEmotesController>();
avatar.GetEmotesController().Returns(emotesController);
avatarReporterController = Substitute.For<IAvatarReporterController>();
movementController = Substitute.For<IAvatarMovementController>();

Environment.Setup(InitializeServiceLocator());

AvatarShape avatarShapePrefab = Resources.Load<AvatarShape>("NewAvatarShape");
avatarShape = GameObject.Instantiate(avatarShapePrefab);
avatarShape = Object.Instantiate(avatarShapePrefab);
avatarShape.OnPoolGet();
avatarShape.avatar = avatar;
avatarShape.avatarReporterController = avatarReporterController;
Expand Down Expand Up @@ -70,8 +72,8 @@ private async UniTask<EmbeddedEmotesSO> GetEmbeddedEmotesSO()
[TearDown]
protected void TearDown()
{
GameObject.Destroy(gameObject);
GameObject.Destroy(avatarShape.gameObject);
Helpers.Utils.SafeDestroy(gameObject);
Helpers.Utils.SafeDestroy(avatarShape.gameObject);
}

[Test]
Expand All @@ -84,11 +86,11 @@ public void ApplyModelCorrectly()
avatarShape.ApplyModel(scene, entity, model);

// Assert
Assert.AreEqual(entity,avatarShape.entity);
Assert.AreEqual(entity, avatarShape.entity);
Assert.IsTrue(avatarShape.initializedPosition);

avatar.Received(1).PlayEmote(model.ExpressionTriggerId, model.ExpressionTriggerTimestamp);
movementController.Received(1).OnTransformChanged(Arg.Any<UnityEngine.Vector3>(), Arg.Any<Quaternion>(), Arg.Any<bool>());
emotesController.Received(1).PlayEmote(model.ExpressionTriggerId, model.ExpressionTriggerTimestamp);
movementController.Received(1).OnTransformChanged(Arg.Any<Vector3>(), Arg.Any<Quaternion>(), Arg.Any<bool>());
}

[Test]
Expand All @@ -101,12 +103,12 @@ public void UpdatePlayerStatusCorrectly()
avatarShape.UpdatePlayerStatus(entity, model);

// Assert
Assert.AreEqual(model.Id,avatarShape.player.id);
Assert.AreEqual(model.Name,avatarShape.player.name);
Assert.AreEqual(model.Talking,avatarShape.player.isTalking);
Assert.AreEqual(avatar,avatarShape.player.avatar);
Assert.AreEqual(model.Id, avatarShape.player.id);
Assert.AreEqual(model.Name, avatarShape.player.name);
Assert.AreEqual(model.Talking, avatarShape.player.isTalking);
Assert.AreEqual(avatar, avatarShape.player.avatar);
Assert.AreEqual(avatarShape.avatarCollider, avatarShape.player.collider);
Assert.AreEqual(avatarShape.onPointerDown,avatarShape.player.onPointerDownCollider);
Assert.AreEqual(avatarShape.onPointerDown, avatarShape.player.onPointerDownCollider);
}

[Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
"GUID:0acc523941302664db1f4e527237feb3",
"GUID:a3ceb534947fac14da25035bc5c24788",
"GUID:b308ae946900fa04080222d7daf47d9a",
"GUID:bf449696eeb8a48adb5d063bf6fb0d91",
"GUID:97d8897529779cb49bebd400c7f402a6",
"GUID:a881b57670b1d2747a6d7f9e32b63230",
"GUID:1dd0780aa6be12b428c8005d0bee46b8",
"GUID:3c42479e53c24ab098ea7aa54c818b2e",
"GUID:3f9bd7dfada994a3ca114055e53e2c1f",
"GUID:f8a3a0af3ed28474c885e04c605a7962",
"GUID:37d2c04574c1d480d8c817e2a7c578e7",
Expand Down Expand Up @@ -45,20 +43,19 @@
"GUID:a871c50d0a774d2b8594d36cb4766e5e",
"GUID:8796c22c84974ce385f8d79b1ae08e1b"
],
"includePlatforms": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"nunit.framework.dll",
"NSubstitute.dll",
"System.Threading.Tasks.Extensions.dll",
"Google.Protobuf.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
13 changes: 0 additions & 13 deletions unity-renderer/Assets/DCLPlugins/EmoteAnimations.meta

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading