Skip to content

Commit 3f6c4be

Browse files
authored
Merge pull request #6149 from decentraland/release/2025-11-11
release: 2025-11-11
2 parents aba3c49 + 42aab89 commit 3f6c4be

173 files changed

Lines changed: 4343 additions & 1964 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.

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
2626
UNITY_LICENSE: ${{ secrets.UNITY_PERSONAL_LICENSE }}
2727
UNITY_IMAGE_FLAVOR: linux-il2cpp
28-
UNITY_IMAGE_VERSION: 3.1.0
28+
UNITY_IMAGE_VERSION: 3.2.0
2929
GHCR_IMAGE_NAME: unityci-editor
3030

3131
concurrency:

Explorer/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-English (en).asset

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ MonoBehaviour:
1515
m_GroupName: Localization-Assets-English (en)
1616
m_GUID: bbf196456d6041d4e9cb25f216e21f0c
1717
m_SerializeEntries:
18+
- m_GUID: 210b7be0b68974749a69a635945ff9f2
19+
m_Address: MusicFestival
20+
m_ReadOnly: 1
21+
m_SerializedLabels:
22+
- Locale-en
23+
FlaggedDuringContentUpdateRestriction: 0
1824
- m_GUID: 2475d2ea34b451047936aaecb0ef9ad3
1925
m_Address: Assets/DCL/SceneLoadingScreens/Assets/Textures/BringYourVibe.png
2026
m_ReadOnly: 1

Explorer/Assets/DCL/Audio/Systems/LandscapeAudioCullingSystem.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ namespace DCL.Audio.Systems
2626
/// </summary>
2727
[LogCategory(ReportCategory.AUDIO)]
2828
[UpdateInGroup(typeof(PresentationSystemGroup))]
29-
[UpdateAfter(typeof(LandscapeTerrainCullingSystem))]
3029
public partial class LandscapeAudioCullingSystem : BaseUnityLoopSystem
3130
{
3231
private readonly TerrainGenerator terrainGenerator;

Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs

Lines changed: 8 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using DCL.SceneLoadingScreens.SplashScreen;
1717
using DCL.Settings.Utils;
1818
using DCL.UI;
19+
using Global.AppArgs;
1920
using DCL.Utilities;
2021
using DCL.Web3;
2122
using DCL.Web3.Authenticators;
@@ -61,9 +62,6 @@ private enum ViewState
6162
}
6263

6364
private const int ANIMATION_DELAY = 300;
64-
private const float WINDOWED_RESOLUTION_RESIZE_COEFFICIENT = .75f;
65-
private const int MAX_WINDOWED_WIDTH = 2560;
66-
private const FullScreenMode DEFAULT_SCREEN_MODE = FullScreenMode.FullScreenWindow;
6765

6866
private const string REQUEST_BETA_ACCESS_LINK = "https://68zbqa0m12c.typeform.com/to/y9fZeNWm";
6967

@@ -81,6 +79,7 @@ private enum ViewState
8179
private readonly List<Resolution> possibleResolutions = new ();
8280
private readonly AudioClipConfig backgroundMusic;
8381
private readonly SentryTransactionManager sentryTransactionManager;
82+
private readonly IAppArgs appArgs;
8483

8584
private const string LOADING_TRANSACTION_NAME = "loading_process";
8685

@@ -112,7 +111,8 @@ public AuthenticationScreenController(
112111
AuthScreenEmotesSettings emotesSettings,
113112
IInputBlock inputBlock,
114113
AudioClipConfig backgroundMusic,
115-
SentryTransactionManager sentryTransactionManager)
114+
SentryTransactionManager sentryTransactionManager,
115+
IAppArgs appArgs)
116116
: base(viewFactory)
117117
{
118118
this.web3Authenticator = web3Authenticator;
@@ -129,6 +129,7 @@ public AuthenticationScreenController(
129129
this.inputBlock = inputBlock;
130130
this.backgroundMusic = backgroundMusic;
131131
this.sentryTransactionManager = sentryTransactionManager;
132+
this.appArgs = appArgs;
132133

133134
possibleResolutions.AddRange(ResolutionUtils.GetAvailableResolutions());
134135
}
@@ -319,7 +320,7 @@ private void StartLoginFlowUntilEnd()
319320

320321
// Checks the current screen mode because it could have been overridden with Alt+Enter
321322
if (Screen.fullScreenMode != FullScreenMode.Windowed)
322-
ForceResolutionAndWindowedMode();
323+
WindowModeUtils.ApplyWindowedMode();
323324

324325
loginCancellationToken = new CancellationTokenSource();
325326
StartLoginFlowUntilEndAsync(loginCancellationToken.Token).Forget();
@@ -593,66 +594,13 @@ private static void ResetAnimator(Animator animator)
593594
animator.gameObject.SetActive(false);
594595
}
595596

596-
private void ForceResolutionAndWindowedMode()
597-
{
598-
Resolution current = Screen.currentResolution;
599-
600-
// To avoid ultra-wide window on ultra-wide screens
601-
int targetWidth = Mathf.Min((int)(current.width * WINDOWED_RESOLUTION_RESIZE_COEFFICIENT), MAX_WINDOWED_WIDTH);
602-
int targetHeight = (int)(current.height * WINDOWED_RESOLUTION_RESIZE_COEFFICIENT);
603-
604-
Screen.SetResolution(targetWidth, targetHeight, FullScreenMode.Windowed, current.refreshRateRatio);
605-
}
606-
607597
private void RestoreResolutionAndScreenMode()
608598
{
609-
Resolution targetResolution = GetTargetResolution();
610-
FullScreenMode targetScreenMode = GetTargetScreenMode();
599+
Resolution targetResolution = WindowModeUtils.GetTargetResolution(possibleResolutions);
600+
FullScreenMode targetScreenMode = WindowModeUtils.GetTargetScreenMode(appArgs.HasFlag(AppArgsFlags.WINDOWED_MODE));
611601
Screen.SetResolution(targetResolution.width, targetResolution.height, targetScreenMode, targetResolution.refreshRateRatio);
612602
}
613603

614-
private Resolution GetTargetResolution()
615-
{
616-
return DCLPlayerPrefs.HasKey(DCLPrefKeys.SETTINGS_RESOLUTION)
617-
? GetSavedResolution()
618-
: GetDefaultResolution();
619-
620-
Resolution GetSavedResolution()
621-
{
622-
int index = DCLPlayerPrefs.GetInt(DCLPrefKeys.SETTINGS_RESOLUTION);
623-
return possibleResolutions[index];
624-
}
625-
626-
Resolution GetDefaultResolution()
627-
{
628-
int defaultIndex = 0;
629-
630-
for (var index = 0; index < possibleResolutions.Count; index++)
631-
{
632-
Resolution resolution = possibleResolutions[index];
633-
634-
if (!ResolutionUtils.IsDefaultResolution(resolution))
635-
continue;
636-
637-
defaultIndex = index;
638-
break;
639-
}
640-
641-
return possibleResolutions[defaultIndex];
642-
}
643-
}
644-
645-
private FullScreenMode GetTargetScreenMode()
646-
{
647-
return DCLPlayerPrefs.HasKey(DCLPrefKeys.SETTINGS_WINDOW_MODE) ? GetSavedScreenMode() : DEFAULT_SCREEN_MODE;
648-
649-
FullScreenMode GetSavedScreenMode()
650-
{
651-
int index = DCLPlayerPrefs.GetInt(DCLPrefKeys.SETTINGS_WINDOW_MODE);
652-
return FullscreenModeUtils.Modes[index];
653-
}
654-
}
655-
656604
private void CancelLoginProcess()
657605
{
658606
loginCancellationToken?.SafeCancelAndDispose();

Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenFlow.asmdef

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"GUID:1d75b3d8691c845b1a51082e81433dfc",
3737
"GUID:54d33bbd50a28174e8ba0110106203c2",
3838
"GUID:d28a7e4beeca475418c15757abf1b6f1",
39-
"GUID:4794e238ed0f65142a4aea5848b513e5"
39+
"GUID:4794e238ed0f65142a4aea5848b513e5",
40+
"GUID:8baf705856414dad9a73b3f382f1bc8b"
4041
],
4142
"includePlatforms": [],
4243
"excludePlatforms": [],

Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@ protected override void Update(float t)
5454
AddPlayerCachedVisibilityComponentQuery(World, camera.GetCameraComponent(World));
5555
AddOthersCachedVisibilityComponentQuery(World);
5656

57+
UpdateMainPlayerVisibilityStateQuery(World, camera.GetCameraComponent(World));
5758
UpdateMainPlayerAvatarVisibilityOnCameraDistanceQuery(World);
5859
UpdateNonPlayerAvatarVisibilityOnCameraDistanceQuery(World);
5960
BlockAvatarsQuery(World);
6061
BanAvatarsQuery(World);
6162
UpdateAvatarsVisibilityStateQuery(World);
63+
UpdateMainPlayerAvatarVisibilityStateQuery(World, camera.GetCameraComponent(World));
6264
GetAvatarsVisibleWithOutlineQuery(World);
6365
}
6466

@@ -178,6 +180,43 @@ private void SetHiddenComponent(Entity entity, bool hiddenValue, HiddenPlayerCom
178180
}
179181

180182
[Query]
183+
private void UpdateMainPlayerVisibilityState([Data] in CameraComponent cameraComponent, ref AvatarShapeComponent avatarShape, in PlayerComponent playerComponent, ref AvatarCachedVisibilityComponent avatarCachedVisibility)
184+
{
185+
bool shouldBeHidden = false;
186+
187+
if (cameraComponent.Mode == CameraMode.FirstPerson)
188+
{
189+
if (cameraComponent.IsTransitioningToFirstPerson)
190+
{
191+
float currentDistance = (playerComponent.CameraFocus.position - playerCamera.transform.position).magnitude;
192+
shouldBeHidden = currentDistance < startFadeDithering;
193+
}
194+
else
195+
{
196+
shouldBeHidden = true;
197+
}
198+
}
199+
else
200+
{
201+
float currentDistance = (playerComponent.CameraFocus.position - playerCamera.transform.position).magnitude;
202+
shouldBeHidden = currentDistance < startFadeDithering;
203+
}
204+
205+
UpdateVisibilityState(ref avatarShape, ref avatarCachedVisibility, shouldBeHidden);
206+
}
207+
208+
[Query]
209+
[All(typeof(PlayerComponent))]
210+
private void UpdateMainPlayerAvatarVisibilityState([Data] in CameraComponent cameraComponent, in Entity entity, ref AvatarShapeComponent avatarShape, ref AvatarCachedVisibilityComponent avatarCachedVisibility)
211+
{
212+
if (cameraComponent.Mode == CameraMode.FirstPerson) return;
213+
214+
bool shouldBeHidden = avatarShape.HiddenByModifierArea || World.Has<HiddenPlayerComponent>(entity);
215+
UpdateVisibilityState(ref avatarShape, ref avatarCachedVisibility, shouldBeHidden);
216+
}
217+
218+
[Query]
219+
[None(typeof(PlayerComponent))]
181220
private void UpdateAvatarsVisibilityState(in Entity entity, ref AvatarShapeComponent avatarShape, ref AvatarCachedVisibilityComponent avatarCachedVisibility)
182221
{
183222
bool shouldBeHidden = avatarShape.HiddenByModifierArea || World.Has<HiddenPlayerComponent>(entity);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using CommunicationData.URLHelpers;
22
using DCL.AvatarRendering.Loading;
3+
using System;
34
using System.Collections.Generic;
45

56
namespace DCL.AvatarRendering.Emotes
@@ -8,5 +9,6 @@ public interface IEmoteStorage : IAvatarElementStorage<IEmote, EmoteDTO>
89
{
910
List<URN> EmbededURNs { get; }
1011
void AddEmbeded(URN urn, IEmote emote);
12+
bool TryGetLatestTransferredAt(URN nftUrn, out DateTime latestTransferredAt);
1113
}
1214
}

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using DCL.Optimization.PerformanceBudgeting;
55
using ECS.StreamableLoading.AudioClips;
66
using ECS.StreamableLoading.Common.Components;
7+
using System;
78
using System.Collections.Generic;
89
using Utility.Multithreading;
910

@@ -122,6 +123,31 @@ public void ClearOwnedNftRegistry()
122123
}
123124
}
124125

126+
public bool TryGetLatestTransferredAt(URN nftUrn, out DateTime latestTransferredAt)
127+
{
128+
lock (lockObject)
129+
{
130+
if (!ownedNftsRegistry.TryGetValue(nftUrn, out Dictionary<URN, NftBlockchainOperationEntry> registry) || registry.Count == 0)
131+
{
132+
latestTransferredAt = default;
133+
return false;
134+
}
135+
136+
DateTime latestDate = DateTime.MinValue;
137+
138+
foreach (var entry in registry.Values)
139+
{
140+
if (entry.TransferredAt > latestDate)
141+
{
142+
latestDate = entry.TransferredAt;
143+
}
144+
}
145+
146+
latestTransferredAt = latestDate;
147+
return true;
148+
}
149+
}
150+
125151
private IEmote AddEmote(URN urn, IEmote wearable, bool qualifiedForUnloading)
126152
{
127153
emotes.Add(urn, wearable);

Explorer/Assets/DCL/AvatarRendering/Emotes/Tests/FinalizeEmoteLoadingSystemShould.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,11 @@ public void ClearOwnedNftRegistry()
572572
{
573573
throw new NotImplementedException();
574574
}
575+
576+
public bool TryGetLatestTransferredAt(URN nftUrn, out DateTime latestTransferredAt)
577+
{
578+
throw new NotImplementedException();
579+
}
575580
}
576581

577582
public class MockEmote : IEmote
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
using DCL.AvatarRendering.Loading;
1+
using CommunicationData.URLHelpers;
2+
using DCL.AvatarRendering.Loading;
23
using DCL.AvatarRendering.Wearables.Components;
4+
using System;
35

46
namespace DCL.AvatarRendering.Wearables.Helpers
57
{
@@ -8,5 +10,6 @@ namespace DCL.AvatarRendering.Wearables.Helpers
810
/// </summary>
911
public interface IWearableStorage : IAvatarElementStorage<IWearable, WearableDTO>
1012
{
13+
bool TryGetLatestTransferredAt(URN nftUrn, out DateTime latestTransferredAt);
1114
}
1215
}

0 commit comments

Comments
 (0)