Skip to content

Commit 0cebc45

Browse files
authored
Merge pull request #5317 from decentraland/release/2025-09-09
release: 2025-09-09
2 parents 8eb6d3c + ed5b95f commit 0cebc45

439 files changed

Lines changed: 38196 additions & 6083 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Explorer/Assets/AddressableAssetsData/AssetGroups/Essentials.asset

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ MonoBehaviour:
1515
m_GroupName: Essentials
1616
m_GUID: 47f803e1e9c5079449bd106df98a0b7d
1717
m_SerializeEntries:
18-
- m_GUID: 0009549658aa1be40bbed401477fbd48
19-
m_Address: Assets/DCL/Infrastructure/ECS/Unity/Materials/MaterialReference/ShapeMaterial.mat
20-
m_ReadOnly: 0
21-
m_SerializedLabels: []
22-
FlaggedDuringContentUpdateRestriction: 0
2318
- m_GUID: 00657accebbe6c348b5208e385e5ec73
2419
m_Address: Assets/DCL/AvatarRendering/AvatarShape/Assets/Avatar_Facial_Features.mat
2520
m_ReadOnly: 0
@@ -115,13 +110,13 @@ MonoBehaviour:
115110
m_ReadOnly: 0
116111
m_SerializedLabels: []
117112
FlaggedDuringContentUpdateRestriction: 0
118-
- m_GUID: 5de5609d1e6c441b5a7c56a77903cab7
119-
m_Address: F_Mouth_00
113+
- m_GUID: 594ae6e7cd408424cb8433ddba60315d
114+
m_Address: Assets/DCL/Notifications/Assets/NotificationDefaultThumbnails.asset
120115
m_ReadOnly: 0
121116
m_SerializedLabels: []
122117
FlaggedDuringContentUpdateRestriction: 0
123-
- m_GUID: 60d3d51407bdce5449781acd4ee86781
124-
m_Address: Assets/DCL/Infrastructure/ECS/Unity/Materials/MaterialReference/BasicShapeMaterial.mat
118+
- m_GUID: 5de5609d1e6c441b5a7c56a77903cab7
119+
m_Address: F_Mouth_00
125120
m_ReadOnly: 0
126121
m_SerializedLabels: []
127122
FlaggedDuringContentUpdateRestriction: 0

Explorer/Assets/DCL/AssetsProvision/Tests/DuplicateAddressablesTest.cs

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,29 @@ public void CheckResourcesDuplicateAddressables()
4646
$"Unexpected duplicated addressable assets detected:\n{string.Join("\n", unexpected)}");
4747
}
4848

49-
[Test]
50-
public void CheckSceneDuplicateAddressables()
51-
{
52-
var settings = AddressableAssetSettingsDefaultObject.Settings;
53-
54-
// Create rule
55-
var rule = new CheckSceneDupeDependencies();
56-
var results = rule.RefreshAnalysis(settings);
57-
58-
59-
var unexpected = results
60-
.Where(r => r.severity == MessageType.Warning)
61-
.Select(r => r.resultName)
62-
// This one is unavoidable :(
63-
.Where(p => !p.EndsWith("Packages/com.unity.shadergraph/Editor/Resources/Shaders/FallbackError.shader"))
64-
.ToList();
65-
66-
Assert.IsEmpty(unexpected,
67-
$"Unexpected duplicated addressable assets detected:\n{string.Join("\n", unexpected)}");
68-
}
49+
// issues reported related to transparencies:
50+
// https://github.com/decentraland/unity-explorer/issues/5286
51+
// https://github.com/decentraland/unity-explorer/issues/5247
52+
// TODO: enable this test once we properly solve the material references as addressables at MaterialsPlugin
53+
// [Test]
54+
// public void CheckSceneDuplicateAddressables()
55+
// {
56+
// var settings = AddressableAssetSettingsDefaultObject.Settings;
57+
//
58+
// // Create rule
59+
// var rule = new CheckSceneDupeDependencies();
60+
// var results = rule.RefreshAnalysis(settings);
61+
//
62+
//
63+
// var unexpected = results
64+
// .Where(r => r.severity == MessageType.Warning)
65+
// .Select(r => r.resultName)
66+
// // This one is unavoidable :(
67+
// .Where(p => !p.EndsWith("Packages/com.unity.shadergraph/Editor/Resources/Shaders/FallbackError.shader"))
68+
// .ToList();
69+
//
70+
// Assert.IsEmpty(unexpected,
71+
// $"Unexpected duplicated addressable assets detected:\n{string.Join("\n", unexpected)}");
72+
// }
6973
}
7074
}

Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetSceneEmoteFromRealmIntention.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using AssetManagement;
33
using CommunicationData.URLHelpers;
44
using DCL.AvatarRendering.Loading.Components;
5+
using DCL.Ipfs;
56
using ECS.Prioritization.Components;
67
using ECS.StreamableLoading;
78
using ECS.StreamableLoading.AssetBundles;
@@ -21,18 +22,18 @@ public struct GetSceneEmoteFromRealmIntention : IEquatable<GetSceneEmoteFromReal
2122

2223
public CancellationTokenSource CancellationTokenSource { get; }
2324
public string SceneId { get; }
24-
public SceneAssetBundleManifest AssetBundleManifest { get; }
2525
public string EmoteHash { get; }
2626
public bool Loop { get; }
2727
public AssetSource PermittedSources { get; }
2828
public BodyShape BodyShape { get; }
29-
public bool IsAssetBundleProcessed { get; set; }
29+
30+
private AssetBundleManifestVersion SceneAssetBundleManifestVersion;
3031

3132
public LoadTimeout Timeout { get; private set; }
3233

3334
public GetSceneEmoteFromRealmIntention(
3435
string sceneId,
35-
SceneAssetBundleManifest assetBundleManifest,
36+
AssetBundleManifestVersion sceneAssetBundleManifestVersion,
3637
string emoteHash,
3738
bool loop,
3839
BodyShape bodyShape,
@@ -41,13 +42,13 @@ public GetSceneEmoteFromRealmIntention(
4142
) : this()
4243
{
4344
SceneId = sceneId;
44-
AssetBundleManifest = assetBundleManifest;
4545
EmoteHash = emoteHash;
4646
Loop = loop;
4747
CancellationTokenSource = new CancellationTokenSource();
4848
PermittedSources = permittedSources;
4949
BodyShape = bodyShape;
5050
Timeout = new LoadTimeout(timeout, 0);
51+
SceneAssetBundleManifestVersion = sceneAssetBundleManifestVersion;
5152
}
5253

5354
public bool Equals(GetSceneEmoteFromRealmIntention other) =>
@@ -100,10 +101,11 @@ public void CreateAndAddPromiseToWorld(World world, IPartitionComponent partitio
100101
var promise = AssetBundlePromise.Create(world,
101102
GetAssetBundleIntention.FromHash(typeof(GameObject),
102103
this.EmoteHash + PlatformUtils.GetCurrentPlatform(),
104+
assetBundleManifestVersion: SceneAssetBundleManifestVersion,
105+
parentEntityID: SceneId,
103106
permittedSources: this.PermittedSources,
104107
customEmbeddedSubDirectory: customStreamingSubdirectory.Value,
105-
cancellationTokenSource: this.CancellationTokenSource,
106-
manifest: this.AssetBundleManifest),
108+
cancellationTokenSource: this.CancellationTokenSource),
107109
partitionComponent);
108110

109111
world.Create(promise, emote, this.BodyShape);

Explorer/Assets/DCL/AvatarRendering/Emotes/EmbeddedEmotes/EmbeddedEmotesData.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using DCL.AvatarRendering.Loading.Assets;
22
using DCL.AvatarRendering.Loading.Components;
33
using DCL.AvatarRendering.Loading.DTO;
4+
using DCL.Ipfs;
45
using ECS.StreamableLoading;
56
using ECS.StreamableLoading.AudioClips;
67
using ECS.StreamableLoading.Common.Components;
@@ -46,7 +47,7 @@ public IEnumerable<IEmote> GenerateEmotes()
4647
model.id = embeddedEmote.id;
4748

4849
// No content hashes available
49-
model.content = Array.Empty<AvatarAttachmentDTO.Content>();
50+
model.content = Array.Empty<ContentDefinition>();
5051
model.pointers = new[] { embeddedEmote.id };
5152
model.type = "emote";
5253
model.version = "v3";

Explorer/Assets/DCL/AvatarRendering/Emotes/Emote.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void UpdateLoadingStatus(bool isLoading)
3636
}
3737

3838
public bool IsOnChain() =>
39-
IsOnChain(id: ((IAvatarAttachment<EmoteDTO>)this).GetUrn().ToString());
39+
IsOnChain(id: this.GetUrn().ToString());
4040

4141
public static bool IsOnChain(string id) =>
4242
id.StartsWith("urn:") && !id.StartsWith("urn:decentraland:off-chain:");

Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/EmoteDTO.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using DCL.AvatarRendering.Loading;
22
using DCL.AvatarRendering.Loading.DTO;
3+
using DCL.Ipfs;
34
using Newtonsoft.Json;
45
using System;
56
using System.Collections.Generic;
@@ -58,14 +59,14 @@ public class BuilderEmoteMetadataDto : EmoteMetadataDto, IBuilderLambdaResponseE
5859

5960
public BuilderEmoteDTO BuildElementDTO(string contentDownloadUrl)
6061
{
61-
Content[] parsedContent = new Content[contents.Count];
62+
ContentDefinition[] parsedContent = new ContentDefinition[contents.Count];
6263

6364
using (var enumerator = contents.GetEnumerator())
6465
{
6566
for (int i = 0; i < parsedContent.Length; i++)
6667
{
6768
enumerator.MoveNext();
68-
parsedContent[i] = new Content()
69+
parsedContent[i] = new ContentDefinition()
6970
{
7071
file = enumerator.Current.Key,
7172
hash = enumerator.Current.Value

Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EmoteComponentsUtils.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@ namespace DCL.AvatarRendering.Emotes
77
{
88
public static class EmoteComponentsUtils
99
{
10-
public static GetEmotesByPointersIntention CreateGetEmotesByPointersIntention(BodyShape bodyShape, IReadOnlyCollection<string> emotes)
11-
{
12-
List<URN> pointers = POINTERS_POOL.Get()!;
13-
14-
foreach (URN emote in emotes)
15-
if (!emote.IsNullOrEmpty())
16-
pointers.Add(emote);
17-
18-
return new GetEmotesByPointersIntention(pointers, bodyShape);
19-
}
20-
2110
public static GetEmotesByPointersIntention CreateGetEmotesByPointersIntention(BodyShape bodyShape, IReadOnlyCollection<URN> emotes)
2211
{
2312
List<URN> pointers = POINTERS_POOL.Get()!;

Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteLoadingSystem.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
using ECS.StreamableLoading.GLTF;
1818
using SceneRunner.Scene;
1919
using System;
20-
using AssetBundleManifestPromise = ECS.StreamableLoading.Common.AssetPromise<SceneRunner.Scene.SceneAssetBundleManifest, DCL.AvatarRendering.Wearables.Components.GetWearableAssetBundleManifestIntention>;
2120
using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise<ECS.StreamableLoading.AssetBundles.AssetBundleData, ECS.StreamableLoading.AssetBundles.GetAssetBundleIntention>;
2221
using AudioPromise = ECS.StreamableLoading.Common.AssetPromise<ECS.StreamableLoading.AudioClips.AudioClipData, ECS.StreamableLoading.AudioClips.GetAudioClipIntention>;
2322
using EmotesFromRealmPromise = ECS.StreamableLoading.Common.AssetPromise<DCL.AvatarRendering.Emotes.EmotesDTOList, DCL.AvatarRendering.Emotes.GetEmotesByPointersFromRealmIntention>;
@@ -37,34 +36,12 @@ public partial class FinalizeEmoteLoadingSystem : FinalizeElementsLoadingSystem<
3736
protected override void Update(float t)
3837
{
3938
FinalizeEmoteDTOQuery(World);
40-
FinalizeAssetBundleManifestLoadingQuery(World);
4139
FinalizeAssetBundleLoadingQuery(World);
4240
FinalizeGltfLoadingQuery(World);
4341
FinalizeAudioClipPromiseQuery(World);
4442
ConsumeAndDisposeFinishedEmotePromiseQuery(World);
4543
}
4644

47-
[Query]
48-
private void FinalizeAssetBundleManifestLoading(
49-
Entity entity,
50-
ref AssetBundleManifestPromise promise,
51-
ref IEmote emote
52-
)
53-
{
54-
if (promise.IsCancellationRequested(World))
55-
{
56-
emote.ResetManifest();
57-
World.Destroy(entity);
58-
return;
59-
}
60-
61-
if (promise.SafeTryConsume(World, GetReportCategory(), out StreamableLoadingResult<SceneAssetBundleManifest> result))
62-
{
63-
emote.UpdateManifest(result);
64-
World.Destroy(entity);
65-
}
66-
}
67-
6845
[Query]
6946
private void FinalizeEmoteDTO(
7047
Entity entity,

Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadEmotesByPointersSystem.cs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using DCL.AvatarRendering.Loading.Systems.Abstract;
1010
using DCL.AvatarRendering.Wearables.Helpers;
1111
using DCL.Diagnostics;
12+
using DCL.Ipfs;
1213
using DCL.SDKComponents.AudioSources;
1314
using DCL.WebRequests;
1415
using ECS;
@@ -124,7 +125,7 @@ IEnumerable<IEmote> emotes
124125

125126
foreach (IEmote emote in emotes)
126127
{
127-
if (emote.ManifestResult is { Exception: not null } || emote.Model is { Exception: not null })
128+
if (emote.DTO.assetBundleManifestVersion is { assetBundleManifestRequestFailed: true } || emote.Model is { Exception: not null })
128129
{
129130
emotesWithResponse++;
130131
continue;
@@ -161,7 +162,7 @@ private bool RequestMissingPointers(ICollection<URN> missingPointers, IPartition
161162
var promise = EmotesFromRealmPromise.Create(
162163
World!,
163164
new GetEmotesByPointersFromRealmIntention(missingPointers.ToList(),
164-
new CommonLoadingArguments(realmData.Ipfs.EntitiesActiveEndpoint)
165+
new CommonLoadingArguments(realmData.Ipfs.AssetBundleRegistry)
165166
),
166167
partitionComponent
167168
);
@@ -209,23 +210,11 @@ RepoolableList<IEmote> resolvedEmotes
209210

210211
private bool CreateAssetBundlePromiseIfRequired(IEmote component, in GetEmotesByPointersIntention intention, IPartitionComponent partitionComponent)
211212
{
212-
// Manifest is required for Web loading only
213-
if (component.ManifestResult == null
214-
&& EnumUtils.HasFlag(intention.PermittedSources, AssetSource.WEB)
215-
216-
// Skip processing manifest for embedded emotes which do not start with 'urn'
217-
&& component.GetUrn().IsValid())
218-
219-
// The resolution of the AB promise will be finalized by FinalizeEmoteAssetBundleSystem
220-
return component.CreateAssetBundleManifestPromise(World!, intention.BodyShape, intention.CancellationTokenSource, partitionComponent);
221-
222213
if (!component.TryGetMainFileHash(intention.BodyShape, out string? hash))
223214
return false;
224215

225216
if (component.AssetResults[intention.BodyShape] == null)
226217
{
227-
SceneAssetBundleManifest? manifest = !EnumUtils.HasFlag(intention.PermittedSources, AssetSource.WEB) ? null : component.ManifestResult?.Asset;
228-
229218
// The resolution of the AB promise will be finalized by FinalizeEmoteAssetBundleSystem
230219
var promise = AssetBundlePromise.Create(
231220
World!,
@@ -234,8 +223,9 @@ private bool CreateAssetBundlePromiseIfRequired(IEmote component, in GetEmotesBy
234223
hash! + PlatformUtils.GetCurrentPlatform(),
235224
permittedSources: intention.PermittedSources,
236225
customEmbeddedSubDirectory: customStreamingSubdirectory,
237-
manifest: manifest,
238-
cancellationTokenSource: intention.CancellationTokenSource
226+
cancellationTokenSource: intention.CancellationTokenSource,
227+
assetBundleManifestVersion: component.DTO.assetBundleManifestVersion,
228+
parentEntityID: component.DTO.id
239229
),
240230
partitionComponent
241231
);
@@ -252,9 +242,9 @@ private bool CreateAssetBundlePromiseIfRequired(IEmote component, in GetEmotesBy
252242

253243
private void TryCreateAudioClipPromises(IEmote component, BodyShape bodyShape, IPartitionComponent partitionComponent)
254244
{
255-
AvatarAttachmentDTO.Content[]? content = component.Model.Asset!.content;
245+
ContentDefinition[]? content = component.Model.Asset!.content;
256246

257-
foreach (AvatarAttachmentDTO.Content item in content ?? Array.Empty<AvatarAttachmentDTO.Content>())
247+
foreach (ContentDefinition item in content)
258248
{
259249
var audioType = item.file.ToAudioType();
260250

Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/CharacterEmoteSystem.cs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -196,30 +196,28 @@ private void ConsumeEmoteIntent(Entity entity, ref CharacterEmoteComponent emote
196196
return;
197197

198198
// emote failed to load? remove intent
199-
if (emote.ManifestResult is { IsInitialized: true, Succeeded: false })
199+
if (emote.Model is { IsInitialized: true, Succeeded: false })
200200
{
201-
ReportHub.LogError(GetReportData(), $"Cant play emote {emoteId} since it failed loading \n {emote.ManifestResult} the manifest");
201+
ReportHub.LogError(GetReportData(), $"Cant play emote {emoteId} since it failed loading \n the DTO");
202202
World.Remove<CharacterEmoteIntent>(entity);
203203
return;
204204
}
205205

206206
// emote failed to load? remove intent
207-
if (emote.Model is { IsInitialized: true, Succeeded: false })
207+
if (emote.DTO.assetBundleManifestVersion is { assetBundleManifestRequestFailed: true } and { IsLSDAsset: false })
208208
{
209-
ReportHub.LogError(GetReportData(), $"Cant play emote {emoteId} since it failed loading \n {emote.ManifestResult} the DTO");
209+
ReportHub.LogError(GetReportData(), $"Cant play emote {emoteId} since it failed loading the manifest");
210210
World.Remove<CharacterEmoteIntent>(entity);
211211
return;
212212
}
213213

214214
BodyShape bodyShape = avatarShapeComponent.BodyShape;
215-
StreamableLoadingResult<AttachmentRegularAsset>? streamableAsset = emote.AssetResults[bodyShape];
216215

217-
// the emote is still loading? don't remove the intent yet, wait for it
218-
//TODO (JUANI) : This will go away when the manifest request is out.
219-
if (streamableAsset == null)
216+
//Loading not complete
217+
if (emote.AssetResults[bodyShape] == null)
220218
return;
221219

222-
StreamableLoadingResult<AttachmentRegularAsset> streamableAssetValue = streamableAsset.Value;
220+
StreamableLoadingResult<AttachmentRegularAsset> streamableAssetValue = emote.AssetResults[bodyShape].Value;
223221
GameObject? mainAsset;
224222

225223
if (streamableAssetValue is { Succeeded: false } || (mainAsset = streamableAssetValue.Asset?.MainAsset) == null)
@@ -234,7 +232,7 @@ private void ConsumeEmoteIntent(Entity entity, ref CharacterEmoteComponent emote
234232
AudioClip? audioClip = audioAssetResult?.Asset;
235233

236234
if (!emotePlayer.Play(mainAsset, audioClip, emote.IsLooping(), emoteIntent.Spatial, in avatarView, ref emoteComponent))
237-
ReportHub.LogWarning(GetReportData(), $"Emote {emote.Model.Asset?.metadata.name} cant be played, AB version: {emote.ManifestResult?.Asset?.GetVersion()} should be >= 16");
235+
ReportHub.LogWarning(GetReportData(), $"Emote {emote.Model.Asset?.metadata.name} cant be played, AB version: {emote.DTO.assetBundleManifestVersion.GetAssetBundleManifestVersion()} should be >= 16");
238236

239237
World.Remove<CharacterEmoteIntent>(entity);
240238
}
@@ -284,9 +282,9 @@ private void CreateEmotePromise(URN urn, BodyShape bodyShape)
284282
if (GetSceneEmoteFromRealmIntention.TryParseFromURN(urn, out string sceneId, out string emoteHash, out bool loop))
285283
{
286284
if (!scenesCache.TryGetBySceneId(sceneId, out ISceneFacade? scene)) return;
287-
285+
288286
SceneEmoteFromRealmPromise.Create(World,
289-
new GetSceneEmoteFromRealmIntention(sceneId, scene!.SceneData.AssetBundleManifest, emoteHash, loop, bodyShape),
287+
new GetSceneEmoteFromRealmIntention(sceneId, scene!.SceneData.SceneEntityDefinition.assetBundleManifestVersion!, emoteHash, loop, bodyShape),
290288
PartitionComponent.TOP_PRIORITY);
291289
}
292290
else

0 commit comments

Comments
 (0)