Skip to content

Commit 0d9ef0a

Browse files
Outfits (#5676)
* feat: backpack rearrangement (wip) * Move backpack folder and update assets * chore: outline for the backpack management * feat: add outfits slots and ui logic (wip) * fix: cleanup * Update ProfileWidget.prefab * Update CommunitiesBrowser_Header.prefab * Update Backpack.prefab * Update ExplorePanelUI.prefab * Update backpack buttons scale animation * Update explore panel animation * Polish header UI * Polish Mask and item info panel sizes * Adjust slots, grid, and pagination positions * chore: cleanup avatar controller * Polish outfit slot * Polish banner UI * Toggle on emotes and categories * Update textures * Fix outfits buttons and toggle on emotes from backpack * Fix wearables tabs * Update OutfitSlot.prefab * Update hotkeys button animation. Move in Y the grid panel. * Update empty slots silhouettes * feat: first draft of getting, saving and deleting an outfit * Cleanup backpack prefab * Rename tab selector * Decrease size of the delete texture. Update Gallery prefab * Update hints button selected color * fix: fixes for outfits management * feat: avatar screenshot service * Fix close button position * fix: clean up and refactor * feat: add outfits analytics * feat: handle ui for equipped outfit * feat: update to how outfits are saved/deleted/equipped - preview thumbnail by clicking on the outfit slot (if not equipped, going back will restore the previous one) - equip thumbnail only on equip button - saving the already saved outfit will give you an error popup - missing thumbnail will be generated when previewing or equipping (in meanwhile original silhouette will be shown) - various cleanups and optimizations * chore: extract method for generating missing thumbnails * chore: remove Debug.Log for failing tests * fix: reset the previewed outfit before closing the explorer * feat: introduce feature flag for outfits * chore: added .gitkeep in empty folder RarityBackgrounds to make test pass * chore: change the name of the outfit feature flag to "alpha-outfits" * feat: use new logic for extra slots * chore: remove checking duplicate outfits and current equipped outfit * chore: set transparency of the screenshot to 100% opaque - do not store feature flags * fix: apply a gamma curve to screenshots so they don't appear dark - prepare for tab animation effects * fix: improve tab hover, selected, not selected states * fix: avatar tab navigation * feat: sounds for outfit preview, outfit delete, outfit hover (same as in categories section of wearable items) * fix: emotes are reset when we equip a new outfit feat: play random emote when we equip outfit * feat: if all outfit slots are empty, set the first one into ready to save state (indication to the user that it can be clicked on the slot for outfit to be saved) * fix: play random emote * fix: PR review fixes * fix: ignore empty outfits from the old system * Fix ProfileMenuView horizontal position in order to make it responsive depending screen resolution * fix: ui fixes and various cleanups * chore: debug logs for debugging outfits * fix: add short urns to save outfit event * fix: PR review fixes AvatarScreenshotService optimizations * chore: cleanup * chore: enable debug log for outfits * fix: stores on chain wearables to the registry (resolves missing tokenId when trying to update profile or save outfit with wearables for which id is missing) * fix: properly manage forced wearables (one source of through moved to EquippedWearables * fix: correctly save a force render list for equipped outfit when previewing other outfits * fix: save outfit sends array of wearables saved in the outfit * fix: delete OutfitsExtensions and extend ProfileExtensions * chore: cleanup * fix: cleanup * feat: add sounds for save and delete outfit * fix: ignore 404 for getting outfits --------- Co-authored-by: Romina Marchetti <[email protected]>
1 parent 90fcc4c commit 0d9ef0a

File tree

344 files changed

+26344
-12461
lines changed

Some content is hidden

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

344 files changed

+26344
-12461
lines changed

Explorer/Assets/AddressableAssetsData/AddressableAssetSettings.asset

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ MonoBehaviour:
1515
m_DefaultGroup: 47f803e1e9c5079449bd106df98a0b7d
1616
m_currentHash:
1717
serializedVersion: 2
18-
Hash: 48ca44445a9b8f3500edf575c136972a
18+
Hash: 61fd69a6987cc3e7c8154fed97a91062
1919
m_OptimizeCatalogSize: 0
2020
m_BuildRemoteCatalog: 0
2121
m_CatalogRequestsTimeout: 0
@@ -33,6 +33,7 @@ MonoBehaviour:
3333
m_UniqueBundleIds: 0
3434
m_EnableJsonCatalog: 0
3535
m_NonRecursiveBuilding: 1
36+
m_AllowNestedBundleFolders: 0
3637
m_CCDEnabled: 0
3738
m_maxConcurrentWebRequests: 3
3839
m_UseUWRForLocalBundles: 0

Explorer/Assets/AddressableAssetsData/AssetGroups/UI.asset

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ MonoBehaviour:
6060
m_ReadOnly: 0
6161
m_SerializedLabels: []
6262
FlaggedDuringContentUpdateRestriction: 0
63+
- m_GUID: 0e0dc1c6390d85440bdf622928e144f5
64+
m_Address: Assets/Textures/Common/ModalDeleteImg_Addressable.png
65+
m_ReadOnly: 0
66+
m_SerializedLabels: []
67+
FlaggedDuringContentUpdateRestriction: 0
6368
- m_GUID: 0fce4c1a785b1495bbf861787a9a3224
6469
m_Address: Assets/DCL/UI/ErrorPopup/Assets/ErrorPopup.prefab
6570
m_ReadOnly: 0
@@ -675,6 +680,11 @@ MonoBehaviour:
675680
m_ReadOnly: 0
676681
m_SerializedLabels: []
677682
FlaggedDuringContentUpdateRestriction: 0
683+
- m_GUID: dd40e574a59d9b348a7c02ca96be6ae9
684+
m_Address: Assets/DCL/Backpack/AvatarSection/Outfits/Slots/OutfitSlot.prefab
685+
m_ReadOnly: 0
686+
m_SerializedLabels: []
687+
FlaggedDuringContentUpdateRestriction: 0
678688
- m_GUID: de88bd0dde8feda4393664330ac8afb4
679689
m_Address: Assets/DCL/UI/GenericContextMenu/Prefabs/ToggleWithTitleIconAndCheck.prefab
680690
m_ReadOnly: 0
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: ea799a483c3f4db8afbf38b0e6c08665, type: 3}
13+
m_Name: Backpack_OutfitDelete
14+
m_EditorClassIdentifier:
15+
audioClips:
16+
- {fileID: 8300000, guid: cd65f4b6efec96643b007cccb5848d22, type: 3}
17+
relativeVolume: 1
18+
audioCategory: 0
19+
pitchVariation: 0
20+
clipSelectionMode: 0

Explorer/Assets/DCL/Audio/AudioConfigs/Backpack_OutfitDelete.asset.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: ea799a483c3f4db8afbf38b0e6c08665, type: 3}
13+
m_Name: Backpack_OutfitSave
14+
m_EditorClassIdentifier:
15+
audioClips:
16+
- {fileID: 8300000, guid: dd25454bbe016694fb00b7931ce59934, type: 3}
17+
relativeVolume: 1
18+
audioCategory: 0
19+
pitchVariation: 0
20+
clipSelectionMode: 0

Explorer/Assets/DCL/Audio/AudioConfigs/Backpack_OutfitSave.asset.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,14 @@ private WearablePromise CreateWearablePromise(PBAvatarShape pbAvatarShape, Parti
140140
WearableComponentsUtils.CreateGetWearablesByPointersIntention(pbAvatarShape, pbAvatarShape.Wearables, Array.Empty<string>()),
141141
partition);
142142

143-
private WearablePromise CreateWearablePromise(Profile profile, PartitionComponent partition) =>
144-
143+
private WearablePromise CreateWearablePromise(Profile profile, PartitionComponent partition)
144+
{
145145
// profile.Avatar.Wearables should be shortened, but since GetWearablesByPointers already retrieves shortened-urns,
146146
// there is not need to convert
147-
WearablePromise.Create(World,
147+
return WearablePromise.Create(World,
148148
WearableComponentsUtils.CreateGetWearablesByPointersIntention(profile.Avatar.BodyShape, profile.Avatar.Wearables, profile.Avatar.ForceRender),
149149
partition);
150+
}
150151

151152
private void LoadAllEmotes(Profile profile, PartitionComponent partition)
152153
{

Explorer/Assets/DCL/AvatarRendering/Loading/Systems/LoadElementsByIntentionSystem.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using System.Buffers;
1717
using System.Collections.Generic;
1818
using System.Threading;
19+
using DCL.Diagnostics;
1920
using Utility.Multithreading;
2021

2122
namespace DCL.AvatarRendering.Loading.Systems.Abstract
@@ -129,6 +130,8 @@ private async UniTask<TAvatarElement> ProcessElementAsync(ILambdaResponseElement
129130
price
130131
)
131132
);
133+
134+
ReportHub.Log(ReportCategory.OUTFITS, $"<color=green>[WEARABLE_STORAGE_POPULATED]</color> Key: '{elementDTO.Metadata.id}' now maps to Value: '{individualData.id}' (Token: {individualData.tokenId})");
132135
}
133136

134137
return wearable;

Explorer/Assets/DCL/AvatarRendering/Wearables/Equipped/EquippedWearables.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using DCL.AvatarRendering.Loading.Components;
22
using DCL.AvatarRendering.Wearables.Components;
3-
using DCL.AvatarRendering.Wearables.Helpers;
43
using Runtime.Wearables;
54
using System;
65
using System.Collections.Generic;
@@ -11,6 +10,9 @@ namespace DCL.AvatarRendering.Wearables.Equipped
1110
public class EquippedWearables : IEquippedWearables
1211
{
1312
private readonly Dictionary<string, IWearable?> wearables = new ();
13+
private readonly HashSet<string> forceRenderCategories = new ();
14+
public IReadOnlyCollection<string> ForceRenderCategories => forceRenderCategories;
15+
1416
private Color hairColor;
1517
private Color eyesColor;
1618
private Color bodyshapeColor;
@@ -56,6 +58,12 @@ public void SetEyesColor(Color newColor) =>
5658
public void SetBodyshapeColor(Color newColor) =>
5759
bodyshapeColor = newColor;
5860

61+
public void SetForceRender(IReadOnlyCollection<string> categories)
62+
{
63+
forceRenderCategories.Clear();
64+
foreach (string category in categories) { forceRenderCategories.Add(category); }
65+
}
66+
5967
public IReadOnlyDictionary<string, IWearable?> Items() =>
6068
wearables;
6169
}

Explorer/Assets/DCL/AvatarRendering/Wearables/Equipped/IEquippedWearables.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Collections.Generic;
12
using DCL.AvatarRendering.Wearables.Components;
23
using UnityEngine;
34

@@ -16,5 +17,8 @@ public interface IEquippedWearables : IReadOnlyEquippedWearables
1617
void SetEyesColor(Color newColor);
1718

1819
void SetBodyshapeColor(Color newColor);
20+
21+
IReadOnlyCollection<string> ForceRenderCategories { get; }
22+
void SetForceRender(IReadOnlyCollection<string> categories);
1923
}
2024
}

0 commit comments

Comments
 (0)