diff --git a/.github/workflows/build-unitycloud.yml b/.github/workflows/build-unitycloud.yml index f565ed6c8c..8ac95cf1a8 100644 --- a/.github/workflows/build-unitycloud.yml +++ b/.github/workflows/build-unitycloud.yml @@ -51,13 +51,13 @@ on: required: true type: string default: 'none' - cache: + clean_build: required: true default: true type: boolean cache_strategy: required: true - default: 'workspace' + default: 'library' type: string version: required: true @@ -144,7 +144,7 @@ jobs: elif [ "${{ inputs.cache_strategy }}" ]; then cache_strategy=${{ inputs.cache_strategy }} else - cache_strategy='workspace' + cache_strategy='library' fi echo "cache_strategy=${cache_strategy}" >> $GITHUB_OUTPUT @@ -178,7 +178,7 @@ jobs: name: Build runs-on: ubuntu-latest needs: prebuild - timeout-minutes: 180 + timeout-minutes: 360 strategy: fail-fast: false matrix: @@ -228,7 +228,20 @@ jobs: run: python -u scripts/cloudbuild/build.py - - name: Upload artifact + - name: 'Tar artifact to maintain original permissions' + if: matrix.target == 'macos' + run: tar --exclude='build/Decentraland_BackUpThisFolder_ButDontShipItWithYourGame' -cvf build.tar build + + - name: Upload artifact for macOS + if: matrix.target == 'macos' + uses: actions/upload-artifact@v4 + with: + name: Decentraland_${{ matrix.target }} + path: build.tar + if-no-files-found: error + + - name: Upload artifact for Windows + if: matrix.target == 'windows64' uses: actions/upload-artifact@v4 with: name: Decentraland_${{ matrix.target }} @@ -237,6 +250,15 @@ jobs: !build/**/*_BackUpThisFolder_ButDontShipItWithYourGame !build/**/*_BurstDebugInformation_DoNotShip if-no-files-found: error + + - name: Upload debug symbols + uses: actions/upload-artifact@v4 + with: + name: Decentraland_${{ matrix.target }}_debug_symbols + path: | + build/**/*_BackUpThisFolder_ButDontShipItWithYourGame + build/**/*_BurstDebugInformation_DoNotShip + if-no-files-found: error # Will run always (even if failing) - name: Upload cloud logs @@ -252,6 +274,22 @@ jobs: if: always() run: cat unity_cloud_log.log + # Will run always (even if failing) + - name: Generate Shader Compilation Report + if: always() + shell: pwsh + run: | + ./scripts/Generate-ShaderReport.ps1 -InputLog "unity_cloud_log.log" -OutputReport "shader_compilation_report.log" + + # Upload Shader Compilation Report + - name: Upload Shader Compilation Report + if: always() + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.target }}_shader_compilation_report + path: shader_compilation_report.log + if-no-files-found: error + # Will run on cancel or timeout only - name: Cancel Unity Cloud build if: ${{ cancelled() }} diff --git a/.github/workflows/trigger_clean_build.yml b/.github/workflows/trigger_clean_build.yml new file mode 100644 index 0000000000..d2f2ec1e11 --- /dev/null +++ b/.github/workflows/trigger_clean_build.yml @@ -0,0 +1,35 @@ +name: Trigger Clean Build + +on: + workflow_dispatch: + inputs: + branch_name: + description: 'Branch name to build' + required: true + type: string + +jobs: + trigger_clean_build: + runs-on: ubuntu-latest + steps: + - name: Trigger Unity Cloud Build workflow + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + try { + console.log('Attempting to dispatch workflow for branch: ${{ github.event.inputs.branch_name }}'); + const result = await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'build-unitycloud.yml', + ref: '${{ github.event.inputs.branch_name }}', + inputs: { + clean_build: 'true' + } + }); + console.log('Workflow dispatch result:', result.status); + } catch (error) { + console.error('Error dispatching workflow:', error.message); + core.setFailed(error.message); + } diff --git a/Explorer/Assets/AddressableAssetsData/AssetGroups/Essentials.asset b/Explorer/Assets/AddressableAssetsData/AssetGroups/Essentials.asset index b13e59b942..69cf38f56d 100644 --- a/Explorer/Assets/AddressableAssetsData/AssetGroups/Essentials.asset +++ b/Explorer/Assets/AddressableAssetsData/AssetGroups/Essentials.asset @@ -17,153 +17,158 @@ MonoBehaviour: m_SerializedData: [] m_GUID: 47f803e1e9c5079449bd106df98a0b7d m_SerializeEntries: - - m_GUID: 654e496ed12f12e4f80243ab9f1d97c7 - m_Address: Character Camera + - m_GUID: 04a7ffcd277754f7c91237894604f522 + m_Address: NftRarityBackgrounds m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 0eecf14978c1aa74381023946dde5c78 - m_Address: Character Object + - m_GUID: 0703f7736b8c9b244953ae7c6ff9a037 + m_Address: LODSettings.asset m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: e8cf73ccd47a385498b71ec58534d03c - m_Address: Assets/DCL/AvatarRendering/AvatarShape/Assets/ComputeShaderSkinning.compute + - m_GUID: 08d42937d0bc54b48baaa23c8c520175 + m_Address: AuthenticationScreen m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 3efe8a48fc3905f47a0648abd6859394 - m_Address: MapCameraObject + - m_GUID: 0ae66608be2735a4f96e0f1aa9b3a75b + m_Address: PlayerMarkerObject m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: b54d9d4189903c2438fa811308f14ceb - m_Address: MapConfiguration + - m_GUID: 0eecf14978c1aa74381023946dde5c78 + m_Address: Character Object m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 7e150ada146ad0749b39e65968780157 - m_Address: MapParcelHighlightMarker + - m_GUID: 0fce4c1a785b1495bbf861787a9a3224 + m_Address: Assets/DCL/UI/ErrorPopup/Assets/ErrorPopup.prefab m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 0ae66608be2735a4f96e0f1aa9b3a75b - m_Address: PlayerMarkerObject + - m_GUID: 19373184c73f36042a55739551bb8298 + m_Address: Avatar_CelShading m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: f80a8f4fcad2b4246b66c94221314244 - m_Address: AtlasChunk + - m_GUID: 1d026bc5d9fd448798b32a455c0f3978 + m_Address: Nametag m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 04a7ffcd277754f7c91237894604f522 - m_Address: NftRarityBackgrounds + - m_GUID: 1f557ed079be146f9aeb090104c115c9 + m_Address: Assets/DCL/MapRenderer/Addressables/SceneOfInterest.prefab m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 7491e2fb7fd484d2b8aed984dfc7c6ab - m_Address: NftRarityColors + - m_GUID: 23318cb20f4dbe9429dd8be585ef75d6 + m_Address: CharacterPreviewContainer m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 4a2a7b610414b45c1b576946ce094877 - m_Address: NftCategoryIcons + - m_GUID: 2a58c49334237a24781cae8b1e3fa351 + m_Address: EmbeddedEmotes m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 08d42937d0bc54b48baaa23c8c520175 - m_Address: AuthenticationScreen + - m_GUID: 2e201c78ef54a4b3bb0edd235bf0ed52 + m_Address: WearablesImg m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 66f8f8427a5c4443e95b0d298addd639 - m_Address: NftInfoPanelRarityBackgrounds + - m_GUID: 35aa85d68d15435418848a03a2db81ec + m_Address: Assets/TextMesh Pro/Fonts & Materials/Inter-Regular SDF.asset m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: aabac5666448b4345a76347f94ea32a4 - m_Address: BackpackItem + - m_GUID: 37fc70977aa8e4023aadf578a73db58b + m_Address: PageButton m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 37fc70977aa8e4023aadf578a73db58b - m_Address: PageButton + - m_GUID: 3b17a8a5ab9ee104899eb22c70935c38 + m_Address: Assets/DCL/StylizedSkybox/Animations/DirectionalLightCycle.anim m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 5ed0eaf7428cb4135baf7d2e09a9430a - m_Address: PageSelector + - m_GUID: 3efe8a48fc3905f47a0648abd6859394 + m_Address: MapCameraObject m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 23318cb20f4dbe9429dd8be585ef75d6 - m_Address: CharacterPreviewContainer + - m_GUID: 4a2a7b610414b45c1b576946ce094877 + m_Address: NftCategoryIcons m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 605506dac7ec04ed09953980478e93d4 - m_Address: SceneLoadingScreen + - m_GUID: 4b896bc1397444f00a2b45725af2b263 + m_Address: NotificationIconTypesSO m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 19373184c73f36042a55739551bb8298 - m_Address: Avatar_CelShading + - m_GUID: 4f24a591312ba473ab5ac65d6658cb94 + m_Address: SDKVirtualCamera m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 6ea398d3ecc4e457baad22c2f43aabfc - m_Address: LoadingEmbedded + - m_GUID: 53b70d09c4a814878a30c68582ad4523 + m_Address: Assets/DCL/MapRenderer/Addressables/HotUserMarkerObject.prefab m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 989cf1173881645c598573447b2b56d8 - m_Address: HidesRow + - m_GUID: 55469a28bf0d2b14db8e6452e462bd4c + m_Address: LavaFlow.shader m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: d20747763091b4fc5a2d5b6d1ba0ea7d - m_Address: HideCategory + - m_GUID: 56a9743f8d94f684190dc11bb521fb78 + m_Address: Scene.shader m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: f75abfa64274a47fd9b3b14143dd8fa0 - m_Address: MANAImg + - m_GUID: 58ab8549017bacb42b310dbb452a2f6e + m_Address: Assets/DCL/Quality/Quality Settings.asset m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 2e201c78ef54a4b3bb0edd235bf0ed52 - m_Address: WearablesImg + - m_GUID: 58c436690cb47644492bc0d655dbcce8 + m_Address: EmotesWheelHUD.prefab m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 875491fc8a6c64fe2aa217d9a750e8a3 - m_Address: LANDImg + - m_GUID: 5c36aa92efab46341b9b02fd6a38a4e7 + m_Address: StylizedSkyboxController m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: beceeda1295384ef4921493b30d5cf45 - m_Address: EditorImg + - m_GUID: 5ed0eaf7428cb4135baf7d2e09a9430a + m_Address: PageSelector m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 9d145b4f22db146a2b25d2a7d5a1f795 - m_Address: DAOImg + - m_GUID: 5f2c1af519efc4b82b87b887f93077fc + m_Address: Assets/DCL/MapRenderer/Addressables/Favorite.prefab m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: e4f1395814ee0473e86cb6c06009fc6e - m_Address: BuilderImg + - m_GUID: 605506dac7ec04ed09953980478e93d4 + m_Address: SceneLoadingScreen m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: bd64e7058e4a44a1eafef49d75c5f0d0 - m_Address: LoadingRainbowGradient + - m_GUID: 62f68ba25f6c905428b36a081b072566 + m_Address: EmoteAudioSource m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 0703f7736b8c9b244953ae7c6ff9a037 - m_Address: LODSettings.asset + - m_GUID: 654e496ed12f12e4f80243ab9f1d97c7 + m_Address: Character Camera + m_ReadOnly: 0 + m_SerializedLabels: [] + FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: 66f8f8427a5c4443e95b0d298addd639 + m_Address: NftInfoPanelRarityBackgrounds m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 @@ -172,173 +177,173 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: dc412497f06504faeb6e30b848c0842d - m_Address: FallbackSceneTipsConfiguration + - m_GUID: 6ea398d3ecc4e457baad22c2f43aabfc + m_Address: LoadingEmbedded m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 56a9743f8d94f684190dc11bb521fb78 - m_Address: Scene.shader + - m_GUID: 70c6f2eab01fc462a9a2cac0d661417e + m_Address: RewardPanel m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 86bf0204cf3bb75429342452a2a460af - m_Address: Assets/DCL/Landscape/Data/ParcelData.asset + - m_GUID: 729a904161871414d913b07a246ed27d + m_Address: Assets/TextMesh Pro/Fonts & Materials/LiberationSans SDF - Fallback.asset m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 1d026bc5d9fd448798b32a455c0f3978 - m_Address: Nametag + - m_GUID: 7491e2fb7fd484d2b8aed984dfc7c6ab + m_Address: NftRarityColors m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 5c36aa92efab46341b9b02fd6a38a4e7 - m_Address: StylizedSkyboxController + - m_GUID: 79eb8e4682b784de1b1b18eaeba27edc + m_Address: Assets/DCL/Backpack/Assets/BackpackEmoteGridItem.prefab m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: e8f593404f0a19749bc68df2b5064215 - m_Address: StylizedSkyboxAnimation + - m_GUID: 7a43321b8055d407ba2e871e873c7062 + m_Address: EmoteWheelRarityBackgrounds.asset m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 8c2fa120406894778bdb7d4e45135d3b - m_Address: CharacterTriggerArea + - m_GUID: 7e150ada146ad0749b39e65968780157 + m_Address: MapParcelHighlightMarker m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: d65049d6f7a244863b39c4dda5ba538e - m_Address: NametagsData + - m_GUID: 86bf0204cf3bb75429342452a2a460af + m_Address: Assets/DCL/Landscape/Data/ParcelData.asset m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: b028edf69a2c54c9194c4ce6524befff - m_Address: ChatBubbleConfiguration + - m_GUID: 875491fc8a6c64fe2aa217d9a750e8a3 + m_Address: LANDImg m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 35aa85d68d15435418848a03a2db81ec - m_Address: Assets/TextMesh Pro/Fonts & Materials/Inter-Regular SDF.asset + - m_GUID: 8c2fa120406894778bdb7d4e45135d3b + m_Address: CharacterTriggerArea m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 96ae0a2159a39234f858ea23bdcc74ad - m_Address: Assets/TextMesh Pro/Fonts & Materials/Inter-SemiBold SDF.asset + - m_GUID: 90c5ebf3fa8f7a643976616957cc83a2 + m_Address: Assets/DCL/UI/Assets/ColorToggle.prefab m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 729a904161871414d913b07a246ed27d - m_Address: Assets/TextMesh Pro/Fonts & Materials/LiberationSans SDF - Fallback.asset + - m_GUID: 933532a4fcc9baf4fa0491de14d08ed7 + m_Address: Lit.shader m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 99df5d970efa24583937b65c21ff559b - m_Address: Assets/TextMesh Pro/Fonts & Materials/LiberationSans SDF.asset + - m_GUID: 96ae0a2159a39234f858ea23bdcc74ad + m_Address: Assets/TextMesh Pro/Fonts & Materials/Inter-SemiBold SDF.asset m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 2a58c49334237a24781cae8b1e3fa351 - m_Address: EmbeddedEmotes + - m_GUID: 989cf1173881645c598573447b2b56d8 + m_Address: HidesRow m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 3b17a8a5ab9ee104899eb22c70935c38 - m_Address: Assets/DCL/StylizedSkybox/Animations/DirectionalLightCycle.anim + - m_GUID: 99df5d970efa24583937b65c21ff559b + m_Address: Assets/TextMesh Pro/Fonts & Materials/LiberationSans SDF.asset m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 79eb8e4682b784de1b1b18eaeba27edc - m_Address: Assets/DCL/Backpack/Assets/BackpackEmoteGridItem.prefab + - m_GUID: 9c4c0e79124f01744a5f969e08ad0370 + m_Address: RemoteAvatarCollider m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 62f68ba25f6c905428b36a081b072566 - m_Address: EmoteAudioSource + - m_GUID: 9d145b4f22db146a2b25d2a7d5a1f795 + m_Address: DAOImg m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 1f557ed079be146f9aeb090104c115c9 - m_Address: Assets/DCL/MapRenderer/Addressables/SceneOfInterest.prefab + - m_GUID: a1d5d4f99234041159f0c215eef3eff3 + m_Address: NewNotificationPanel m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 53b70d09c4a814878a30c68582ad4523 - m_Address: Assets/DCL/MapRenderer/Addressables/HotUserMarkerObject.prefab + - m_GUID: aabac5666448b4345a76347f94ea32a4 + m_Address: BackpackItem m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 5f2c1af519efc4b82b87b887f93077fc - m_Address: Assets/DCL/MapRenderer/Addressables/Favorite.prefab + - m_GUID: b028edf69a2c54c9194c4ce6524befff + m_Address: ChatBubbleConfiguration m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 58ab8549017bacb42b310dbb452a2f6e - m_Address: Assets/DCL/Quality/Quality Settings.asset + - m_GUID: b54d9d4189903c2438fa811308f14ceb + m_Address: MapConfiguration m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 58c436690cb47644492bc0d655dbcce8 - m_Address: EmotesWheelHUD.prefab + - m_GUID: bd64e7058e4a44a1eafef49d75c5f0d0 + m_Address: LoadingRainbowGradient m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 7a43321b8055d407ba2e871e873c7062 - m_Address: EmoteWheelRarityBackgrounds.asset + - m_GUID: beceeda1295384ef4921493b30d5cf45 + m_Address: EditorImg m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: e7d14406516774d91886b6b4d1a26a58 - m_Address: MapPin + - m_GUID: d20747763091b4fc5a2d5b6d1ba0ea7d + m_Address: HideCategory m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 90c5ebf3fa8f7a643976616957cc83a2 - m_Address: Assets/DCL/UI/Assets/ColorToggle.prefab + - m_GUID: d65049d6f7a244863b39c4dda5ba538e + m_Address: NametagsData m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: a1d5d4f99234041159f0c215eef3eff3 - m_Address: NewNotificationPanel + - m_GUID: dc412497f06504faeb6e30b848c0842d + m_Address: FallbackSceneTipsConfiguration m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 4b896bc1397444f00a2b45725af2b263 - m_Address: NotificationIconTypesSO + - m_GUID: e052984ad30813240bd28c945f4cab60 + m_Address: DottedLineRenderer m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 9c4c0e79124f01744a5f969e08ad0370 - m_Address: RemoteAvatarCollider + - m_GUID: e4f1395814ee0473e86cb6c06009fc6e + m_Address: BuilderImg m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 70c6f2eab01fc462a9a2cac0d661417e - m_Address: RewardPanel + - m_GUID: e6e9a19c3678ded42a3bc431ebef7dbd + m_Address: FallbackError.shader m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: e052984ad30813240bd28c945f4cab60 - m_Address: DottedLineRenderer + - m_GUID: e7d14406516774d91886b6b4d1a26a58 + m_Address: MapPin m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 933532a4fcc9baf4fa0491de14d08ed7 - m_Address: Lit.shader + - m_GUID: e8cf73ccd47a385498b71ec58534d03c + m_Address: Assets/DCL/AvatarRendering/AvatarShape/Assets/ComputeShaderSkinning.compute m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: e6e9a19c3678ded42a3bc431ebef7dbd - m_Address: FallbackError.shader + - m_GUID: e8f593404f0a19749bc68df2b5064215 + m_Address: StylizedSkyboxAnimation m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 55469a28bf0d2b14db8e6452e462bd4c - m_Address: LavaFlow.shader + - m_GUID: f75abfa64274a47fd9b3b14143dd8fa0 + m_Address: MANAImg m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 0fce4c1a785b1495bbf861787a9a3224 - m_Address: Assets/DCL/UI/ErrorPopup/Assets/ErrorPopup.prefab + - m_GUID: f80a8f4fcad2b4246b66c94221314244 + m_Address: AtlasChunk m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 @@ -346,5 +351,5 @@ MonoBehaviour: m_Settings: {fileID: 11400000, guid: fc8a9d2b539788c47a5b305639fa8b34, type: 2} m_SchemaSet: m_Schemas: - - {fileID: 11400000, guid: 9457e5517ec7d134d8c10bdce90c02c6, type: 2} - {fileID: 11400000, guid: f1becbbb6af19b14bafe1985627ea5ea, type: 2} + - {fileID: 11400000, guid: 9457e5517ec7d134d8c10bdce90c02c6, type: 2} diff --git a/Explorer/Assets/DCL/ApplicationVersionGuard/ApplicationVersionGuard.asmdef b/Explorer/Assets/DCL/ApplicationVersionGuard/ApplicationVersionGuard.asmdef index 6b9625dec8..1c202b62a7 100644 --- a/Explorer/Assets/DCL/ApplicationVersionGuard/ApplicationVersionGuard.asmdef +++ b/Explorer/Assets/DCL/ApplicationVersionGuard/ApplicationVersionGuard.asmdef @@ -7,8 +7,8 @@ "GUID:45f6fff651a0a514f8edfdaf9cce45af", "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:6055be8ebefd69e48b49212b09b47b2f", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", - "GUID:91cf8206af184dac8e30eb46747e9939" + "GUID:91cf8206af184dac8e30eb46747e9939", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/ApplicationVersionGuard/ApplicationVersionGuard.cs b/Explorer/Assets/DCL/ApplicationVersionGuard/ApplicationVersionGuard.cs index 99c3282fab..6011a4f221 100644 --- a/Explorer/Assets/DCL/ApplicationVersionGuard/ApplicationVersionGuard.cs +++ b/Explorer/Assets/DCL/ApplicationVersionGuard/ApplicationVersionGuard.cs @@ -43,7 +43,12 @@ public ApplicationVersionGuard(IWebRequestController webRequestController, IWebB public async UniTask<(string current, string latest)> GetVersionsAsync(CancellationToken ct) { - FlatFetchResponse response = await webRequestController.GetAsync, FlatFetchResponse>(EXPLORER_LATEST_RELEASE_URL, new FlatFetchResponse(), ct); + FlatFetchResponse response = await webRequestController.GetAsync, FlatFetchResponse>( + EXPLORER_LATEST_RELEASE_URL, + new FlatFetchResponse(), + ct, + ReportCategory.UNSPECIFIED, + new WebRequestHeadersInfo()); GitHubRelease latestRelease = JsonUtility.FromJson(response.body); string latestVersion = latestRelease.tag_name.TrimStart('v'); @@ -94,9 +99,14 @@ private async UniTask DownloadLauncherAsync(CancellationToken ct) return; - async UniTask GetLauncherDownloadUrlAsync(CancellationToken ct) + async UniTask GetLauncherDownloadUrlAsync(CancellationToken cancellationToken) { - FlatFetchResponse response = await webRequestController.GetAsync, FlatFetchResponse>(LAUNCHER_LATEST_RELEASE_URL, new FlatFetchResponse(), ct); + FlatFetchResponse response = await webRequestController.GetAsync, FlatFetchResponse>( + LAUNCHER_LATEST_RELEASE_URL, + new FlatFetchResponse(), + cancellationToken, + ReportCategory.UNSPECIFIED, + new WebRequestHeadersInfo()); GitHubRelease latestRelease = JsonUtility.FromJson(response.body); string version = latestRelease.tag_name.TrimStart('v'); diff --git a/Explorer/Assets/DCL/ApplicationVersionGuard/VersionUpdateScreen.prefab.meta b/Explorer/Assets/DCL/ApplicationVersionGuard/VersionUpdateScreen.prefab.meta index 8c24999b29..29e89fd994 100644 --- a/Explorer/Assets/DCL/ApplicationVersionGuard/VersionUpdateScreen.prefab.meta +++ b/Explorer/Assets/DCL/ApplicationVersionGuard/VersionUpdateScreen.prefab.meta @@ -1,6 +1,12 @@ fileFormatVersion: 2 +<<<<<<<< HEAD:Explorer/Assets/DCL/ApplicationVersionGuard/VersionUpdateScreen.prefab.meta guid: f2df2b2c3721c5840b06c8fe73d5d665 PrefabImporter: +======== +guid: a7f977d5958657847ade7852b739fd6c +folderAsset: yes +DefaultImporter: +>>>>>>>> refs/remotes/origin/main:Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton.meta externalObjects: {} userData: assetBundleName: diff --git a/Explorer/Assets/DCL/AssetsProvision/AssetsProvision.asmdef b/Explorer/Assets/DCL/AssetsProvision/AssetsProvision.asmdef index b30391fee6..b4e0185e9f 100644 --- a/Explorer/Assets/DCL/AssetsProvision/AssetsProvision.asmdef +++ b/Explorer/Assets/DCL/AssetsProvision/AssetsProvision.asmdef @@ -6,7 +6,7 @@ "GUID:84651a3751eca9349aac36a66bba901b", "GUID:593a5b492d29ac6448b1ebf7f035ef33", "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", "GUID:8322ea9340a544c59ddc56d4793eac74" ], diff --git a/Explorer/Assets/DCL/AssetsProvision/CodeResolver/WebJsCodeProvider.cs b/Explorer/Assets/DCL/AssetsProvision/CodeResolver/WebJsCodeProvider.cs index e12c3d6f10..00280180cf 100644 --- a/Explorer/Assets/DCL/AssetsProvision/CodeResolver/WebJsCodeProvider.cs +++ b/Explorer/Assets/DCL/AssetsProvision/CodeResolver/WebJsCodeProvider.cs @@ -1,5 +1,6 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using DCL.WebRequests; using System.Threading; @@ -16,7 +17,7 @@ public WebJsCodeProvider(IWebRequestController webRequestController) public async UniTask GetJsCodeAsync(URLAddress url, CancellationToken cancellationToken = default) { - string text = await webRequestController.GetAsync(new CommonArguments(url), cancellationToken).StoreTextAsync(); + string text = await webRequestController.GetAsync(new CommonArguments(url), cancellationToken, ReportCategory.SCENE_LOADING).StoreTextAsync(); return text; } } diff --git a/Explorer/Assets/DCL/Audio/AudioConfigs/Notifications_Badge_Achieved.asset b/Explorer/Assets/DCL/Audio/AudioConfigs/Notifications_Badge_Achieved.asset new file mode 100644 index 0000000000..cf68fb3af6 --- /dev/null +++ b/Explorer/Assets/DCL/Audio/AudioConfigs/Notifications_Badge_Achieved.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ea799a483c3f4db8afbf38b0e6c08665, type: 3} + m_Name: Notifications_Badge_Achieved + m_EditorClassIdentifier: + audioClips: + - {fileID: 8300000, guid: 5c0145f381a078945a5626ed9358eabf, type: 3} + relativeVolume: 1 + audioCategory: 0 + pitchVariation: 0 + clipSelectionMode: 0 diff --git a/Explorer/Assets/DCL/Audio/AudioConfigs/Notifications_Badge_Achieved.asset.meta b/Explorer/Assets/DCL/Audio/AudioConfigs/Notifications_Badge_Achieved.asset.meta new file mode 100644 index 0000000000..4d8354f97d --- /dev/null +++ b/Explorer/Assets/DCL/Audio/AudioConfigs/Notifications_Badge_Achieved.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2f888b1c3f73f7641ad9f8712a8faacb +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Audio/Avatar/DCL.Audio.Avatar.asmdef b/Explorer/Assets/DCL/Audio/Avatar/DCL.Audio.Avatar.asmdef index 214ae052b9..876a3f0c8c 100644 --- a/Explorer/Assets/DCL/Audio/Avatar/DCL.Audio.Avatar.asmdef +++ b/Explorer/Assets/DCL/Audio/Avatar/DCL.Audio.Avatar.asmdef @@ -4,7 +4,7 @@ "references": [ "GUID:e7751264a6735a942a64770d71eb49e0", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:f51ebe6a0ceec4240a699833d6309b23" ], "includePlatforms": [], diff --git a/Explorer/Assets/DCL/Audio/DCL.Audio.asmdef b/Explorer/Assets/DCL/Audio/DCL.Audio.asmdef index 42e7638dd2..a0532f01d8 100644 --- a/Explorer/Assets/DCL/Audio/DCL.Audio.asmdef +++ b/Explorer/Assets/DCL/Audio/DCL.Audio.asmdef @@ -3,15 +3,13 @@ "rootNamespace": "", "references": [ "GUID:275e22790c04e9b47a5085d7b0c4432a", - "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:3c7b57a14671040bd8c549056adc04f5", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:2f30d6e5229a74284acedda491abcc6e", "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", "GUID:4794e238ed0f65142a4aea5848b513e5", "GUID:286980af24684da6acc1caa413039811", "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:c789cb8ae7a594a46974120ba85fcf1b", "GUID:d8b63aba1907145bea998dd612889d6b", "GUID:fa7b3fdbb04d67549916da7bd2af58ab" ], diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs index d75819bba1..bb08316416 100644 --- a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs +++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs @@ -11,7 +11,6 @@ using DCL.SceneLoadingScreens.SplashScreen; using DCL.UI; using DCL.Utilities; -using Utility; using DCL.Web3.Authenticators; using DCL.Web3.Identities; using MVC; @@ -20,8 +19,8 @@ using UnityEngine; using UnityEngine.Localization.SmartFormat.PersistentVariables; using UnityEngine.UI; +using Utility; -// used in IsUserAllowedToAccessToBeta method #if !UNITY_EDITOR using DCL.Web3; using System.Collections.Generic; @@ -118,7 +117,7 @@ protected override void OnViewInstantiated() { base.OnViewInstantiated(); - profileNameLabel = (StringVariable)viewInstance.ProfileNameLabel.StringReference["profileName"]; + profileNameLabel = (StringVariable)viewInstance!.ProfileNameLabel.StringReference["profileName"]; viewInstance.LoginButton.onClick.AddListener(StartLoginFlowUntilEnd); viewInstance.CancelAuthenticationProcess.onClick.AddListener(CancelLoginProcess); @@ -135,7 +134,7 @@ protected override void OnViewInstantiated() viewInstance.VersionText.text = "editor-version"; #endif - characterPreviewController = new AuthenticationScreenCharacterPreviewController(viewInstance.CharacterPreviewView, characterPreviewFactory, world!, characterPreviewEventBus); + characterPreviewController = new AuthenticationScreenCharacterPreviewController(viewInstance.CharacterPreviewView, characterPreviewFactory, world, characterPreviewEventBus); } protected override void OnBeforeViewShow() @@ -160,7 +159,7 @@ protected override void OnViewClose() CancelLoginProcess(); CancelVerificationCountdown(); - viewInstance.FinalizeContainer.SetActive(false); + viewInstance!.FinalizeContainer.SetActive(false); web3Authenticator.SetVerificationListener(null); audioMixerVolumesController.UnmuteGroup(AudioMixerExposedParam.World_Volume); @@ -212,7 +211,7 @@ private async UniTaskVoid CheckValidIdentityAndStartInitialFlowAsync() private void ShowRestrictedUserPopup() { - viewInstance.RestrictedUserContainer.SetActive(true); + viewInstance!.RestrictedUserContainer.SetActive(true); } private bool IsUserAllowedToAccessToBeta(IWeb3Identity storedIdentity) @@ -220,8 +219,8 @@ private bool IsUserAllowedToAccessToBeta(IWeb3Identity storedIdentity) #if UNITY_EDITOR return true; #else - if (!featureFlagsCache.Configuration.IsEnabled("user-allow-list", "wallets")) return true; - if (!featureFlagsCache.Configuration.TryGetCsvPayload("user-allow-list", "wallets", out List>? allowedUsersCsv)) + if (!featureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.USER_ALLOW_LIST, FeatureFlagsStrings.WALLETS_VARIANT)) return true; + if (!featureFlagsCache.Configuration.TryGetCsvPayload(FeatureFlagsStrings.USER_ALLOW_LIST, FeatureFlagsStrings.WALLETS_VARIANT, out List>? allowedUsersCsv)) return true; bool isUserAllowed = allowedUsersCsv![0] @@ -240,7 +239,7 @@ async UniTaskVoid StartLoginFlowUntilEndAsync(CancellationToken ct) { try { - viewInstance.ConnectingToServerContainer.SetActive(true); + viewInstance!.ConnectingToServerContainer.SetActive(true); viewInstance.LoginButton.interactable = false; web3Authenticator.SetVerificationListener(ShowVerification); @@ -280,7 +279,7 @@ async UniTaskVoid StartLoginFlowUntilEndAsync(CancellationToken ct) private void ShowVerification(int code, DateTime expiration) { - viewInstance.VerificationCodeLabel.text = code.ToString(); + viewInstance!.VerificationCodeLabel.text = code.ToString(); CancelVerificationCountdown(); verificationCountdownCancellationToken = new CancellationTokenSource(); @@ -307,7 +306,7 @@ private void ChangeAccount() { async UniTaskVoid ChangeAccountAsync(CancellationToken ct) { - viewInstance.FinalizeAnimator.SetTrigger(UIAnimationHashes.TO_OTHER); + viewInstance!.FinalizeAnimator.SetTrigger(UIAnimationHashes.TO_OTHER); await UniTask.Delay(ANIMATION_DELAY, cancellationToken: ct); await web3Authenticator.LogoutAsync(ct); SwitchState(ViewState.Login); @@ -323,7 +322,8 @@ private void JumpIntoWorld() { async UniTaskVoid AnimateAndAwaitAsync() { - viewInstance.FinalizeAnimator.SetTrigger(UIAnimationHashes.JUMP_IN); + //Disabled animation until proper animation is setup, otherwise we get animation hash errors + //viewInstance!.FinalizeAnimator.SetTrigger(UIAnimationHashes.JUMP_IN); await UniTask.Delay(ANIMATION_DELAY); characterPreviewController?.OnHide(); lifeCycleTask?.TrySetResult(); @@ -338,7 +338,7 @@ private void SwitchState(ViewState state) switch (state) { case ViewState.Login: - ResetAnimator(viewInstance.LoginAnimator); + ResetAnimator(viewInstance!.LoginAnimator); viewInstance.PendingAuthentication.SetActive(false); viewInstance.Slides.SetActive(true); viewInstance.LoginContainer.SetActive(true); @@ -352,7 +352,7 @@ private void SwitchState(ViewState state) CurrentState.Value = AuthenticationStatus.Login; break; case ViewState.LoginInProgress: - ResetAnimator(viewInstance.VerificationAnimator); + ResetAnimator(viewInstance!.VerificationAnimator); viewInstance.PendingAuthentication.SetActive(true); viewInstance.Slides.SetActive(true); viewInstance.LoginAnimator.SetTrigger(UIAnimationHashes.OUT); @@ -365,7 +365,7 @@ private void SwitchState(ViewState state) viewInstance.RestrictedUserContainer.SetActive(false); break; case ViewState.Loading: - viewInstance.PendingAuthentication.SetActive(false); + viewInstance!.PendingAuthentication.SetActive(false); viewInstance.LoginContainer.SetActive(false); viewInstance.Slides.SetActive(true); viewInstance.ProgressContainer.SetActive(true); @@ -376,7 +376,7 @@ private void SwitchState(ViewState state) viewInstance.RestrictedUserContainer.SetActive(false); break; case ViewState.Finalize: - ResetAnimator(viewInstance.FinalizeAnimator); + ResetAnimator(viewInstance!.FinalizeAnimator); viewInstance.Slides.SetActive(false); viewInstance.PendingAuthentication.SetActive(false); viewInstance.LoginContainer.SetActive(false); @@ -408,7 +408,7 @@ private void CancelLoginProcess() private void OpenOrCloseVerificationCodeHint() { - viewInstance.VerificationCodeHintContainer.SetActive(!viewInstance.VerificationCodeHintContainer.activeSelf); + viewInstance!.VerificationCodeHintContainer.SetActive(!viewInstance.VerificationCodeHintContainer.activeSelf); } private void OpenDiscord() => diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenFlow.asmdef b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenFlow.asmdef index c2ea4dc617..ca5114ca07 100644 --- a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenFlow.asmdef +++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenFlow.asmdef @@ -9,7 +9,7 @@ "GUID:e56a0d6a94c144c784012e63b6043100", "GUID:6055be8ebefd69e48b49212b09b47b2f", "GUID:91cf8206af184dac8e30eb46747e9939", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", "GUID:4725c02394ab4ce19f889e4e8001f989", "GUID:e0eedfa2deb9406daf86fd8368728e39", diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/AvatarShape.asmdef b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/AvatarShape.asmdef index 487766785b..4c44ac7c1b 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/AvatarShape.asmdef +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/AvatarShape.asmdef @@ -5,12 +5,10 @@ "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", "GUID:3c7b57a14671040bd8c549056adc04f5", "GUID:5eabe9a3d4dd19d42a16208ea5411062", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:9e314663ce958b746873cb22d57ede55", "GUID:286980af24684da6acc1caa413039811", "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:9e24947de15b9834991c9d8411ea37cf", - "GUID:6e2b4bed29ad1c549ab19b744f36f388", "GUID:4794e238ed0f65142a4aea5848b513e5", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", "GUID:d8b63aba1907145bea998dd612889d6b", @@ -26,7 +24,8 @@ "GUID:e56a0d6a94c144c784012e63b6043100", "GUID:8322ea9340a544c59ddc56d4793eac74", "GUID:166b65e6dfc848bb9fb075f53c293a38", - "GUID:e25ef972de004615a22937e739de2def" + "GUID:e25ef972de004615a22937e739de2def", + "GUID:543b8f091a5947a3880b7f2bca2358bd" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/AvatarShapeComponent.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/AvatarShapeComponent.cs index c854fd174b..b21f2f6b55 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/AvatarShapeComponent.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/AvatarShapeComponent.cs @@ -1,6 +1,8 @@ -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Helpers; using System.Collections.Generic; +using System.Runtime.CompilerServices; using UnityEngine; using WearablePromise = ECS.StreamableLoading.Common.AssetPromise; using EmotePromise = ECS.StreamableLoading.Common.AssetPromise; @@ -11,7 +13,7 @@ public struct AvatarShapeComponent { public bool IsDirty; public bool IsVisible; - public bool HiddenByModifierArea; + public bool HiddenByModifierArea { get; private set; } public Color SkinColor; public Color HairColor; @@ -24,7 +26,7 @@ public struct AvatarShapeComponent public string ID; public string Name; - public readonly List InstantiatedWearables; + public readonly List InstantiatedWearables; public AvatarShapeComponent(string name, string id, BodyShape bodyShape, WearablePromise wearablePromise, EmotePromise emotePromise, Color skinColor, Color hairColor, Color eyesColor) @@ -35,7 +37,7 @@ public AvatarShapeComponent(string name, string id, BodyShape bodyShape, Wearabl IsDirty = true; WearablePromise = wearablePromise; EmotePromise = emotePromise; - InstantiatedWearables = new List(); + InstantiatedWearables = new List(); SkinColor = skinColor; HairColor = hairColor; EyesColor = eyesColor; @@ -47,8 +49,14 @@ public AvatarShapeComponent(string name, string id) : this() { ID = id; Name = name; + InstantiatedWearables = new List(); IsVisible = true; - InstantiatedWearables = new List(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void UpdateHiddenStatus(bool hidden) + { + HiddenByModifierArea = hidden; } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs index 208ba45c07..f04354f4a7 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using DCL.AvatarRendering.AvatarShape.Helpers; +using DCL.AvatarRendering.Loading.Assets; using DCL.Diagnostics; using NUnit.Framework; using Unity.Collections; @@ -17,7 +18,7 @@ namespace DCL.AvatarRendering.AvatarShape.ComputeShader { public class ComputeShaderSkinning : CustomSkinning { - public override AvatarCustomSkinningComponent Initialize(IList gameObjects, + public override AvatarCustomSkinningComponent Initialize(IList gameObjects, UnityEngine.ComputeShader skinningShader, IAvatarMaterialPoolHandler avatarMaterialPool, AvatarShapeComponent avatarShapeComponent, in FacialFeaturesTextures facialFeatureTexture) { @@ -149,11 +150,11 @@ private void FillMeshArray(Mesh mesh, int currentMeshVertexCount, int vertexCoun return list; } - private void CreateMeshData(List targetList, IList wearables) + private void CreateMeshData(List targetList, IList wearables) { for (var i = 0; i < wearables.Count; i++) { - CachedWearable cachedWearable = wearables[i]; + CachedAttachment cachedWearable = wearables[i]; GameObject instance = cachedWearable.Instance; using (PoolExtensions.Scope> pooledList = instance.GetComponentsInChildrenIntoPooledList(true)) diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/CustomSkinning.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/CustomSkinning.cs index 9bff7a5e7a..dbec41a220 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/CustomSkinning.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/CustomSkinning.cs @@ -3,6 +3,7 @@ using DCL.AvatarRendering.Wearables.Helpers; using System.Collections.Generic; using DCL.AvatarRendering.AvatarShape.Helpers; +using DCL.AvatarRendering.Loading.Assets; using Unity.Collections; using Unity.Mathematics; using UnityEngine; @@ -13,7 +14,7 @@ namespace DCL.AvatarRendering.AvatarShape.ComputeShader { public abstract class CustomSkinning { - public abstract AvatarCustomSkinningComponent Initialize(IList gameObjects, + public abstract AvatarCustomSkinningComponent Initialize(IList gameObjects, UnityEngine.ComputeShader skinningShader, IAvatarMaterialPoolHandler avatarMaterial, AvatarShapeComponent avatarShapeComponent, in FacialFeaturesTextures facialFeatureTexture); diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/AvatarInstantiationPolymorphicBehaviour.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/AvatarInstantiationPolymorphicBehaviour.cs index 48bb039503..89562d6528 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/AvatarInstantiationPolymorphicBehaviour.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/AvatarInstantiationPolymorphicBehaviour.cs @@ -1,9 +1,9 @@ using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.AvatarShape.Rendering.TextureArray; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; -using DCL.Diagnostics; -using JetBrains.Annotations; using System.Collections.Generic; using UnityEngine; @@ -11,44 +11,43 @@ namespace DCL.AvatarRendering.AvatarShape.Helpers { public static class AvatarInstantiationPolymorphicBehaviour { - [CanBeNull] - public static GameObject AppendToAvatar( + public static GameObject? AppendToAvatar( this IWearable resultWearable, - IWearableAssetsCache wearableAssetsCache, + IAttachmentsAssetsCache wearableAssetsCache, ISet usedCategories, ref FacialFeaturesTextures facialFeaturesTextures, ref AvatarShapeComponent avatarShapeComponent, - Transform parent, - string reportCategory) + Transform parent) { var originalAssets = resultWearable.WearableAssetResults[avatarShapeComponent.BodyShape].Results; var mainAsset = originalAssets[WearablePolymorphicBehaviour.MAIN_ASSET_INDEX]!.Value.Asset!; - var category = resultWearable.GetCategory(); + string category = resultWearable.GetCategory(); switch (resultWearable.Type) { case WearableType.FacialFeature: var texturesSet = facialFeaturesTextures.Value[category]; - texturesSet[TextureArrayConstants.MAINTEX_ORIGINAL_TEXTURE] = ((WearableTextureAsset)mainAsset).Texture; + texturesSet[TextureArrayConstants.MAINTEX_ORIGINAL_TEXTURE] = ((AttachmentTextureAsset)mainAsset).Texture; // Mask is optional var maskAssetRes = originalAssets[WearablePolymorphicBehaviour.MASK_ASSET_INDEX]; + if (maskAssetRes is { Asset: not null }) - texturesSet[TextureArrayConstants.MASK_ORIGINAL_TEXTURE_ID] = ((WearableTextureAsset)maskAssetRes.Value.Asset!).Texture; + texturesSet[TextureArrayConstants.MASK_ORIGINAL_TEXTURE_ID] = ((AttachmentTextureAsset)maskAssetRes.Value.Asset!).Texture; return null; default: { - var regularAsset = (WearableRegularAsset)mainAsset; + var regularAsset = (AttachmentRegularAsset)mainAsset; - CachedWearable instantiatedWearable = + var instantiatedWearable = wearableAssetsCache.InstantiateWearable(regularAsset, parent); avatarShapeComponent.InstantiatedWearables.Add(instantiatedWearable); - if(!avatarShapeComponent.IsVisible) + if (!avatarShapeComponent.IsVisible) foreach (Renderer renderer in instantiatedWearable.Renderers) renderer.enabled = false; diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/AvatarWearableHide.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/AvatarWearableHide.cs index 1b7c09d8b2..645388272a 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/AvatarWearableHide.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/AvatarWearableHide.cs @@ -1,4 +1,5 @@ -using DCL.AvatarRendering.Wearables.Components; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.Diagnostics; using DCL.Optimization.Pools; @@ -48,13 +49,12 @@ private static readonly (string, string)[] BODY_PARTS_MAPPING = public static string GetCategoryHider(string bodyShapeId, string hiddenCategory, List equippedWearables) { - Dictionary wearablesByCategory = DictionaryPool.Get(); + using var scope = DictionaryPool.Get(out var wearablesByCategory); for (var i = 0; i < equippedWearables.Count; i++) wearablesByCategory[equippedWearables[i].GetCategory()] = equippedWearables[i]; foreach (string priorityCategory in WearablesConstants.CATEGORIES_PRIORITY) - { if (wearablesByCategory.TryGetValue(priorityCategory, out IWearable wearable)) { HIDE_CATEGORIES.Clear(); @@ -63,9 +63,6 @@ public static string GetCategoryHider(string bodyShapeId, string hiddenCategory, if (HIDE_CATEGORIES.Contains(hiddenCategory)) return wearable.GetCategory(); } - } - - DictionaryPool.Release(wearablesByCategory); return string.Empty; } diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/ReleaseAvatar.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/ReleaseAvatar.cs index d0d9c669af..fdbdf3f9ed 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/ReleaseAvatar.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Helpers/ReleaseAvatar.cs @@ -1,5 +1,6 @@ using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.AvatarShape.ComputeShader; +using DCL.AvatarRendering.Loading.Assets; using DCL.AvatarRendering.Wearables.Helpers; using UnityEngine.Pool; @@ -7,7 +8,7 @@ namespace DCL.AvatarRendering.AvatarShape.Helpers { public static class ReleaseAvatar { - public static void Execute(FixedComputeBufferHandler vertOutBuffer, IWearableAssetsCache wearableAssetsCache, + public static void Execute(FixedComputeBufferHandler vertOutBuffer, IAttachmentsAssetsCache wearableAssetsCache, IAvatarMaterialPoolHandler avatarMaterialPoolHandler, IObjectPool computeShaderSkinningPool, in AvatarShapeComponent avatarShapeComponent, ref AvatarCustomSkinningComponent skinningComponent) { diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarCleanUpSystem.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarCleanUpSystem.cs index 39d182087d..8d5eb47aff 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarCleanUpSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarCleanUpSystem.cs @@ -5,6 +5,7 @@ using DCL.AvatarRendering.AvatarShape.ComputeShader; using DCL.AvatarRendering.AvatarShape.Helpers; using DCL.AvatarRendering.AvatarShape.UnityInterface; +using DCL.AvatarRendering.Loading.Assets; using DCL.AvatarRendering.Wearables.Helpers; using DCL.Diagnostics; using DCL.Optimization.PerformanceBudgeting; @@ -30,7 +31,7 @@ public partial class AvatarCleanUpSystem : BaseUnityLoopSystem private readonly ObjectProxy mainPlayerAvatarBaseProxy; private readonly IComponentPool avatarPoolRegistry; private readonly IObjectPool computeShaderSkinningPool; - private readonly IWearableAssetsCache wearableAssetsCache; + private readonly IAttachmentsAssetsCache wearableAssetsCache; internal AvatarCleanUpSystem( World world, @@ -39,7 +40,7 @@ internal AvatarCleanUpSystem( IAvatarMaterialPoolHandler avatarMaterialPoolHandler, IComponentPool avatarPoolRegistry, IObjectPool computeShaderSkinningPool, - IWearableAssetsCache wearableAssetsCache, + IAttachmentsAssetsCache wearableAssetsCache, ObjectProxy mainPlayerAvatarBaseProxy) : base(world) { this.instantiationFrameTimeBudget = instantiationFrameTimeBudget; diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarInstantiatorSystem.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarInstantiatorSystem.cs index 2af83055e4..f1ee39d4a3 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarInstantiatorSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarInstantiatorSystem.cs @@ -7,7 +7,8 @@ using DCL.AvatarRendering.AvatarShape.Rendering.TextureArray; using DCL.AvatarRendering.AvatarShape.UnityInterface; using DCL.AvatarRendering.Emotes; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Components.Intentions; using DCL.AvatarRendering.Wearables.Helpers; @@ -42,18 +43,18 @@ public partial class AvatarInstantiatorSystem : BaseUnityLoopSystem private readonly CustomSkinning skinningStrategy; private readonly TextureArrayContainer textureArrays; private readonly FixedComputeBufferHandler vertOutBuffer; - private readonly IWearableAssetsCache wearableAssetsCache; + private readonly IAttachmentsAssetsCache wearableAssetsCache; private readonly IPerformanceBudget memoryBudget; private readonly ObjectProxy mainPlayerAvatarBaseProxy; private readonly IDefaultFaceFeaturesHandler defaultFaceFeaturesHandler; - private readonly IWearableCache wearableCache; + private readonly IWearableStorage wearableStorage; private readonly IWearable?[] fallbackBodyShape = new IWearable[1]; public AvatarInstantiatorSystem(World world, IPerformanceBudget instantiationFrameTimeBudget, IPerformanceBudget memoryBudget, IComponentPool avatarPoolRegistry, IAvatarMaterialPoolHandler avatarMaterialPoolHandler, IObjectPool computeShaderPool, - IWearableAssetsCache wearableAssetsCache, CustomSkinning skinningStrategy, FixedComputeBufferHandler vertOutBuffer, + IAttachmentsAssetsCache wearableAssetsCache, CustomSkinning skinningStrategy, FixedComputeBufferHandler vertOutBuffer, ObjectProxy mainPlayerAvatarBaseProxy, IDefaultFaceFeaturesHandler defaultFaceFeaturesHandler, - IWearableCache wearableCache) : base(world) + IWearableStorage wearableStorage) : base(world) { this.instantiationFrameTimeBudget = instantiationFrameTimeBudget; this.avatarPoolRegistry = avatarPoolRegistry; @@ -66,7 +67,7 @@ public AvatarInstantiatorSystem(World world, IPerformanceBudget instantiationFra computeShaderSkinningPool = computeShaderPool; this.mainPlayerAvatarBaseProxy = mainPlayerAvatarBaseProxy; this.defaultFaceFeaturesHandler = defaultFaceFeaturesHandler; - this.wearableCache = wearableCache; + this.wearableStorage = wearableStorage; } public override void Dispose() @@ -87,8 +88,8 @@ protected override void Update(float t) { if (!ReadyToInstantiateNewAvatar(ref avatarShapeComponent)) return null; - if (!avatarShapeComponent.WearablePromise.SafeTryConsume(World, out WearablesLoadResult wearablesResult)) return null; - if (!avatarShapeComponent.EmotePromise.SafeTryConsume(World, out EmotesLoadResult emotesResult)) return null; + if (!avatarShapeComponent.WearablePromise.SafeTryConsume(World, GetReportCategory(), out WearablesLoadResult wearablesResult)) return null; + if (!avatarShapeComponent.EmotePromise.SafeTryConsume(World, GetReportCategory(), out EmotesLoadResult emotesResult)) return null; AvatarBase avatarBase = avatarPoolRegistry.Get(); avatarBase.gameObject.name = $"Avatar {avatarShapeComponent.ID}"; @@ -138,8 +139,8 @@ private void InstantiateExistingAvatar(ref AvatarShapeComponent avatarShapeCompo { if (!ReadyToInstantiateNewAvatar(ref avatarShapeComponent)) return; - if (!avatarShapeComponent.WearablePromise.SafeTryConsume(World, out WearablesLoadResult wearablesResult)) return; - if (!avatarShapeComponent.EmotePromise.SafeTryConsume(World, out EmotesLoadResult emotesResult)) return; + if (!avatarShapeComponent.WearablePromise.SafeTryConsume(World, GetReportCategory(), out WearablesLoadResult wearablesResult)) return; + if (!avatarShapeComponent.EmotePromise.SafeTryConsume(World, GetReportCategory(), out EmotesLoadResult emotesResult)) return; ReleaseAvatar.Execute(vertOutBuffer, wearableAssetsCache, avatarMaterialPoolHandler, computeShaderSkinningPool, avatarShapeComponent, ref skinningComponent); @@ -170,7 +171,7 @@ private AvatarCustomSkinningComponent InstantiateAvatar(ref AvatarShapeComponent if (fallbackBodyShape[0] == null) // Could be a very rare case on which the body shape is not available. This case will make the flow fail - if (wearableCache.TryGetWearable(BodyShape.MALE, out IWearable maleBody)) + if (wearableStorage.TryGetElement(BodyShape.MALE, out IWearable maleBody)) fallbackBodyShape[0] = maleBody; visibleWearables = fallbackBodyShape!; @@ -184,7 +185,7 @@ private AvatarCustomSkinningComponent InstantiateAvatar(ref AvatarShapeComponent { IWearable resultWearable = visibleWearables[i]; - var instance = resultWearable.AppendToAvatar(wearableAssetsCache, usedCategories, ref facialFeatureTexture, ref avatarShapeComponent, attachPoint, GetReportCategory()); + GameObject instance = resultWearable.AppendToAvatar(wearableAssetsCache, usedCategories, ref facialFeatureTexture, ref avatarShapeComponent, attachPoint); if (resultWearable.Type == WearableType.BodyShape) bodyShape = instance; diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs index 9252caa3bb..45b2dc15a4 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs @@ -2,7 +2,6 @@ using Arch.System; using Arch.SystemGroups; using DCL.AvatarRendering.AvatarShape.Components; -using DCL.AvatarRendering.Wearables.Helpers; using DCL.Character.Components; using DCL.CharacterCamera; using ECS.Abstract; @@ -14,6 +13,7 @@ namespace DCL.AvatarRendering.AvatarShape.Systems [UpdateInGroup(typeof(CameraGroup))] public partial class AvatarShapeVisibilitySystem : BaseUnityLoopSystem { + private const float AVATAR_MINIMUM_CAMERA_DISTANCE_SQR = 1; private SingleInstanceEntity camera; public AvatarShapeVisibilitySystem(World world) : base(world) { } @@ -27,17 +27,17 @@ protected override void Update(float t) { AddPlayerCachedVisibilityComponentQuery(World, camera.GetCameraComponent(World)); AddOthersCachedVisibilityComponentQuery(World); - - UpdatePlayerFirstPersonQuery(World, camera.GetCameraComponent(World)); + + UpdateVisibilityOnCameraDistanceQuery(World, camera.GetCameraComponent(World)); UpdateAvatarsVisibilityStateQuery(World); } [Query] [All(typeof(AvatarShapeComponent), typeof(PlayerComponent))] [None(typeof(AvatarCachedVisibilityComponent))] - private void AddPlayerCachedVisibilityComponent([Data] in CameraComponent camera, in Entity entity, ref AvatarShapeComponent avatarShape) + private void AddPlayerCachedVisibilityComponent([Data] in CameraComponent cameraComponent, in Entity entity, ref AvatarShapeComponent avatarShape) { - bool shouldBeHidden = avatarShape.HiddenByModifierArea || camera.Mode == CameraMode.FirstPerson; + bool shouldBeHidden = avatarShape.HiddenByModifierArea || cameraComponent.Mode == CameraMode.FirstPerson; var cachedVisibility = InitializeCachedComponent(shouldBeHidden, ref avatarShape); World.Add(entity, cachedVisibility); } @@ -53,10 +53,10 @@ private void AddOthersCachedVisibilityComponent(in Entity entity, ref AvatarShap } [Query] - [All(typeof(PlayerComponent))] - private void UpdatePlayerFirstPerson([Data] in CameraComponent camera, ref AvatarShapeComponent avatarShape, ref AvatarCachedVisibilityComponent avatarCachedVisibility) + private void UpdateVisibilityOnCameraDistance([Data] in CameraComponent cameraComponent, ref AvatarShapeComponent avatarShape, ref AvatarCachedVisibilityComponent avatarCachedVisibility, in PlayerComponent playerComponent) { - bool shouldBeHidden = avatarShape.HiddenByModifierArea || camera.Mode == CameraMode.FirstPerson; + Vector3 cameraToPlayer = playerComponent.CameraFocus.position - cameraComponent.Camera.transform.position; + bool shouldBeHidden = avatarShape.HiddenByModifierArea || cameraToPlayer.sqrMagnitude < AVATAR_MINIMUM_CAMERA_DISTANCE_SQR; UpdateVisibilityState(ref avatarShape, ref avatarCachedVisibility, shouldBeHidden); } @@ -96,7 +96,7 @@ private static void Hide(ref AvatarShapeComponent avatarShape) private static void ToggleAvatarShape(ref AvatarShapeComponent avatarShape, bool toggle) { - foreach (CachedWearable wearable in avatarShape.InstantiatedWearables) + foreach (var wearable in avatarShape.InstantiatedWearables) foreach (Renderer renderer in wearable.Renderers) renderer.enabled = toggle; } diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarHideShould.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarHideShould.cs index 2226b87d01..d042730cfd 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarHideShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarHideShould.cs @@ -1,8 +1,8 @@ using DCL.AvatarRendering.AvatarShape.Helpers; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.AvatarShape.Tests.EditMode; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; -using NSubstitute; using NUnit.Framework; using System.Collections.Generic; using UnityEngine; @@ -11,7 +11,7 @@ namespace DCL.Tests { public class AvatarHideShould { - private readonly BodyShape TEST_BODY_SHAPE = BodyShape.MALE; + private static readonly BodyShape TEST_BODY_SHAPE = BodyShape.MALE; private List mockWearables; private IWearable upperMockWearable; private IWearable upperSkinWearable; @@ -19,37 +19,53 @@ public class AvatarHideShould [SetUp] public void SetUp() { - upperMockWearable = Substitute.For(); - upperMockWearable.GetCategory().Returns(WearablesConstants.Categories.UPPER_BODY); - var expectedUpperWearableHide = new HashSet { WearablesConstants.Categories.LOWER_BODY, WearablesConstants.Categories.HANDS, WearablesConstants.Categories.SKIN }; - - upperMockWearable - .When(x => x.GetHidingList(Arg.Any(), Arg.Any>())) - .Do(callInfo => + var mockDto = new WearableDTO + { + metadata = new WearableDTO.WearableMetadataDto { - HashSet result = callInfo.Arg>(); - - foreach (string item in expectedUpperWearableHide) { result.Add(item); } - }); - - upperSkinWearable = Substitute.For(); - upperSkinWearable.GetCategory().Returns(WearablesConstants.Categories.SKIN); - var expectedSkinWearableHide = new HashSet { WearablesConstants.Categories.LOWER_BODY, WearablesConstants.Categories.HANDS, WearablesConstants.Categories.UPPER_BODY }; - - upperSkinWearable - .When(x => x.GetHidingList(Arg.Any(), Arg.Any>())) - .Do(callInfo => + data = new WearableDTO.WearableMetadataDto.DataDto + { + category = WearablesConstants.Categories.UPPER_BODY, + }, + }, + }; + + upperMockWearable = new FakeWearable( + mockDto, + new HashSet { - HashSet result = callInfo.Arg>(); - - foreach (string item in expectedSkinWearableHide) { result.Add(item); } - }); + WearablesConstants.Categories.LOWER_BODY, + WearablesConstants.Categories.HANDS, + WearablesConstants.Categories.SKIN + } + ); + + var skinDto = new WearableDTO + { + metadata = new WearableDTO.WearableMetadataDto + { + data = new WearableDTO.WearableMetadataDto.DataDto + { + category = WearablesConstants.Categories.SKIN, + }, + }, + }; + + upperSkinWearable = new FakeWearable( + skinDto, + new HashSet + { + WearablesConstants.Categories.LOWER_BODY, + WearablesConstants.Categories.HANDS, + WearablesConstants.Categories.UPPER_BODY + } + ); } [Test] public void HideWearables() { - mockWearables = new List() { upperMockWearable }; + mockWearables = new List { upperMockWearable }; var hidingList = new HashSet(); AvatarWearableHide.ComposeHiddenCategoriesOrdered(TEST_BODY_SHAPE, null, mockWearables, hidingList); @@ -92,7 +108,7 @@ public void ForceRenderRespected() [Test] public void HideBodyShape() { - mockWearables = new List() { upperMockWearable }; + mockWearables = new List { upperMockWearable }; var hidingList = new HashSet(); AvatarWearableHide.ComposeHiddenCategoriesOrdered(TEST_BODY_SHAPE, null, mockWearables, hidingList); diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarLoaderSystemShould.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarLoaderSystemShould.cs index a3c08fb398..32ff208952 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarLoaderSystemShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarLoaderSystemShould.cs @@ -2,7 +2,7 @@ using CommunicationData.URLHelpers; using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.AvatarShape.Systems; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.ECSComponents; using DCL.Ipfs; diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/FakeWearable.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/FakeWearable.cs new file mode 100644 index 0000000000..6b80fabeaa --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/FakeWearable.cs @@ -0,0 +1,73 @@ +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.AvatarRendering.Wearables.Components; +using DCL.AvatarRendering.Wearables.Helpers; +using ECS.StreamableLoading.Common.Components; +using SceneRunner.Scene; +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace DCL.AvatarRendering.AvatarShape.Tests.EditMode +{ + public class FakeWearable : IWearable + { + private readonly string? mainHash; + private HashSet expectedUpperWearableHide; + + public bool IsLoading { get; } + + public void UpdateLoadingStatus(bool isLoading) + { + //ignore + } + + public StreamableLoadingResult? ManifestResult { get; set; } + public StreamableLoadingResult? ThumbnailAssetResult { get; set; } + public AvatarAttachmentDTO DTO { get; } + public StreamableLoadingResult Model { get; set; } + + public WearableType Type { get; } + + public WearableAssets[] WearableAssetResults { get; } + + public FakeWearable( + WearableDTO dto, + HashSet? expectedUpperWearableHide = null, + StreamableLoadingResult model = default, + string? mainHash = null, + WearableAssets[]? wearableAssetResults = null + ) + { + DTO = dto; + Model = model; + WearableAssetResults = wearableAssetResults ?? Array.Empty(); + this.mainHash = mainHash; + this.expectedUpperWearableHide = expectedUpperWearableHide ?? new HashSet(); + } + + public bool IsOnChain() => + true; + + public bool TryResolveDTO(StreamableLoadingResult result) => + true; + + public bool TryGetFileHashConditional(BodyShape bodyShape, Func contentMatch, out string? hash) + { + hash = mainHash; + return mainHash != null; + } + + public void GetHidingList(string bodyShapeType, HashSet hideListResult) + { + foreach (string item in expectedUpperWearableHide) + hideListResult.Add(item); + } + + public bool IsCompatibleWithBodyShape(string bodyShape) => + false; + + public bool HasSameModelsForAllGenders() => + false; + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/FakeWearable.cs.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/FakeWearable.cs.meta new file mode 100644 index 0000000000..80ca6e6198 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/FakeWearable.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e523c964b0b74de2ad72e14120207e1f +timeCreated: 1725282864 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode.meta rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorAssetsShould.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorAssetsShould.cs new file mode 100644 index 0000000000..4a780a990c --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorAssetsShould.cs @@ -0,0 +1,42 @@ +using Cysharp.Threading.Tasks; +using DCL.AvatarRendering.AvatarShape.Rendering.TextureArray; +using NUnit.Framework; +using System.Collections.Generic; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.AddressableAssets; + +namespace DCL.AvatarRendering.AvatarShape.Tests.Instantiate +{ + public class AvatarInstantiatorAssetsShould + { + private const int TEST_RESOLUTION = 256; + + private static readonly int[] DEFAULT_RESOLUTIONS = { TEST_RESOLUTION }; + + public static TextureArrayContainer NewTextureArrayContainer(Shader shader) + { + Texture texture_BC7 = new Texture2D(TEST_RESOLUTION, TEST_RESOLUTION, + TextureArrayConstants.DEFAULT_BASEMAP_TEXTURE_FORMAT, false, false); + Texture texture_BC5 = new Texture2D(TEST_RESOLUTION, TEST_RESOLUTION, + TextureArrayConstants.DEFAULT_NORMALMAP_TEXTURE_FORMAT, false, false); + + var defaultTextures = new Dictionary + { + [new TextureArrayKey(TextureArrayConstants.MAINTEX_ARR_TEX_SHADER, TEST_RESOLUTION)] = texture_BC7, + [new TextureArrayKey(TextureArrayConstants.NORMAL_MAP_TEX_ARR, TEST_RESOLUTION)] = texture_BC5, + [new TextureArrayKey(TextureArrayConstants.EMISSIVE_MAP_TEX_ARR, TEST_RESOLUTION)] = texture_BC7 + }; + + var textureArrayContainerFactory = new TextureArrayContainerFactory(defaultTextures); + return textureArrayContainerFactory.Create(shader, DEFAULT_RESOLUTIONS); + } + + [Test] + public async Task CreateTextureArray() + { + Material? celShadingMaterial = await Addressables.LoadAssetAsync("Avatar_Toon_TestAsset"); + var _ = NewTextureArrayContainer(celShadingMaterial.shader!); + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorAssetsShould.cs.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorAssetsShould.cs.meta new file mode 100644 index 0000000000..44993e718f --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorAssetsShould.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 61512a2bb92545959d2227f52ef656a6 +timeCreated: 1725892740 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/AvatarInstantiatorSystemShould.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorSystemShould.cs similarity index 79% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/AvatarInstantiatorSystemShould.cs rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorSystemShould.cs index fa13b33f0b..a793d5a0f0 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/AvatarInstantiatorSystemShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorSystemShould.cs @@ -3,10 +3,16 @@ using Cysharp.Threading.Tasks; using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.AvatarShape.ComputeShader; +using DCL.AvatarRendering.AvatarShape.Helpers; using DCL.AvatarRendering.AvatarShape.Rendering.TextureArray; +using DCL.AvatarRendering.AvatarShape.Helpers; using DCL.AvatarRendering.AvatarShape.Systems; using DCL.AvatarRendering.AvatarShape.UnityInterface; +using DCL.AvatarRendering.Emotes; using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.Character.Components; @@ -23,23 +29,18 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using DCL.AvatarRendering.AvatarShape.Helpers; -using DCL.AvatarRendering.Emotes; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Pool; using Object = UnityEngine.Object; using WearablePromise = ECS.StreamableLoading.Common.AssetPromise; using EmotePromise = ECS.StreamableLoading.Common.AssetPromise; +using IAvatarAttachment = DCL.AvatarRendering.Loading.Components.IAvatarAttachment; -namespace DCL.AvatarRendering.AvatarShape.Tests +namespace DCL.AvatarRendering.AvatarShape.Tests.Instantiate { public class AvatarInstantiatorSystemShould : UnitySystemTestBase { - private const int TEST_RESOLUTION = 256; - - private static readonly int[] DEFAULT_RESOLUTIONS = { TEST_RESOLUTION }; - private Entity avatarEntity; private AvatarShapeComponent avatarShapeComponent; @@ -48,8 +49,7 @@ public class AvatarInstantiatorSystemShould : UnitySystemTestBase(); budget.TrySpendBudget().Returns(true); @@ -86,10 +86,15 @@ public async void Setup() var emotePromise = EmotePromise.Create(world, new GetEmotesByPointersIntention(new List { "clap" }, BodyShape.MALE), partitionComponent); - world.Add(emotePromise.Entity, new StreamableLoadingResult(new EmotesResolution(new[] - { - GetMockEmote("clap", "emote"), - }, 1))); + world.Add(emotePromise.Entity, new StreamableLoadingResult( + new EmotesResolution( + RepoolableList.NewListWithContentOf( + GetMockEmote("clap", "emote") + ), + 1 + ) + ) + ); avatarShapeComponent = new AvatarShapeComponent("TEST_AVATAR", "TEST_ID", BodyShape.MALE, wearablePromise, emotePromise, randomSkinColor, randomHairColor, randomEyesColor); @@ -98,18 +103,8 @@ public async void Setup() IExtendedObjectPool? materialPool = Substitute.For>(); materialPool.Get().Returns(new Material(celShadingMaterial), new Material(celShadingMaterial), new Material(celShadingMaterial)); - Texture texture = new Texture2D(TEST_RESOLUTION, TEST_RESOLUTION, TextureArrayConstants.DEFAULT_BASEMAP_TEXTURE_FORMAT, false, false); - - var defaultTextures = new Dictionary - { - [new TextureArrayKey(TextureArrayConstants.MAINTEX_ARR_TEX_SHADER, TEST_RESOLUTION)] = texture, - [new TextureArrayKey(TextureArrayConstants.NORMAL_MAP_TEX_ARR, TEST_RESOLUTION)] = texture, - [new TextureArrayKey(TextureArrayConstants.EMISSIVE_MAP_TEX_ARR, TEST_RESOLUTION)] = texture, - }; - - var textureArrayContainerFactory = new TextureArrayContainerFactory(defaultTextures); - - var poolMaterialSetup = new PoolMaterialSetup(materialPool, textureArrayContainerFactory.Create(celShadingMaterial.shader, DEFAULT_RESOLUTIONS)); + var textureArrayContainer = AvatarInstantiatorAssetsShould.NewTextureArrayContainer(celShadingMaterial.shader); + var poolMaterialSetup = new PoolMaterialSetup(materialPool, textureArrayContainer); IAvatarMaterialPoolHandler? materialPoolHandler = Substitute.For(); materialPoolHandler.GetMaterialPool(Arg.Any()).Returns(poolMaterialSetup); @@ -125,33 +120,33 @@ [new TextureArrayKey(TextureArrayConstants.EMISSIVE_MAP_TEX_ARR, TEST_RESOLUTION })); system = new AvatarInstantiatorSystem(world, budget, budget, avatarPoolRegistry, materialPoolHandler, computeShaderPool, - Substitute.For(), new ComputeShaderSkinning(), new FixedComputeBufferHandler(10000, 4, 4), - new ObjectProxy(), defaultFaceFeaturesHandler, new WearableCache()); + Substitute.For(), new ComputeShaderSkinning(), new FixedComputeBufferHandler(10000, 4, 4), + new ObjectProxy(), defaultFaceFeaturesHandler, new WearableStorage()); } private IEmote GetMockEmote(string materialName, string category) { - (IEmote mockWearable, WearableRegularAsset wearableAsset) = GetMockedAvatarAttachment(materialName, category); + (IEmote mockWearable, AttachmentRegularAsset wearableAsset) = GetMockedAvatarAttachment(materialName, category); mockWearable.AssetResults.Returns( - new StreamableLoadingResult?[] { new StreamableLoadingResult(wearableAsset) }); + new StreamableLoadingResult?[] { new StreamableLoadingResult(wearableAsset) }); return mockWearable; } private IWearable GetMockWearable(string materialName, string category) { - (IWearable mockWearable, WearableRegularAsset wearableAsset) = GetMockedAvatarAttachment(materialName, category); + (IWearable mockWearable, AttachmentRegularAsset wearableAsset) = GetMockedAvatarAttachment(materialName, category); mockWearable.WearableAssetResults.Returns(new WearableAssets[] { - new StreamableLoadingResult(wearableAsset), + new StreamableLoadingResult(wearableAsset), }); return mockWearable; } - private (T, WearableRegularAsset) GetMockedAvatarAttachment(string materialName, string category) where T: class, IAvatarAttachment + private (T, AttachmentRegularAsset) GetMockedAvatarAttachment(string materialName, string category) where T: class, IAvatarAttachment { T mockWearable = Substitute.For(); @@ -172,11 +167,17 @@ private IWearable GetMockWearable(string materialName, string category) }; skinnedMeshRenderer.material = fakeABMaterial; - mockWearable.GetCategory().Returns(category); - var rendererInfo = new WearableRegularAsset.RendererInfo(skinnedMeshRenderer, fakeABMaterial); + var dto = new EmoteDTO(); + dto.metadata = new EmoteDTO.Metadata(); + dto.metadata.emoteDataADR74 = new EmoteDTO.Metadata.Data(); + dto.metadata.emoteDataADR74.category = category; + + mockWearable.DTO.Returns(dto); + + var rendererInfo = new AttachmentRegularAsset.RendererInfo(skinnedMeshRenderer, fakeABMaterial); - var wearableAsset = new WearableRegularAsset(avatarGameObject, new List { rendererInfo }, null); + var wearableAsset = new AttachmentRegularAsset(avatarGameObject, new List { rendererInfo }, null); wearableAsset.AddReference(); return (mockWearable, wearableAsset); @@ -186,7 +187,7 @@ private IWearable GetMockWearable(string materialName, string category) public async Task InstantiateAvatar() { // For some reason SetUp is not awaited, probably a Unity's bug - await UniTask.WaitUntil(() => system != null && avatarMesh != null); + await SetupAsync(); //Arrange avatarEntity = world.Create(avatarShapeComponent, PartitionComponent.TOP_PRIORITY, new CharacterTransform()); @@ -217,7 +218,7 @@ public async Task UpdateInstantiatedAvatar() new PartitionComponent()); world.Add(newWearablePromise.Entity, new StreamableLoadingResult(new WearablesResolution(new List { GetMockWearable("body_shape", WearablesConstants.Categories.BODY_SHAPE) }))); - world.Add(newEmotePromise.Entity, new StreamableLoadingResult(new EmotesResolution(new[] { GetMockEmote("emote", WearablesConstants.Categories.EYES) }, 1))); + world.Add(newEmotePromise.Entity, new StreamableLoadingResult(new EmotesResolution(RepoolableList.NewListWithContentOf(GetMockEmote("emote", WearablesConstants.Categories.EYES)), 1))); world.Get(avatarEntity).IsDirty = true; world.Get(avatarEntity).WearablePromise = newWearablePromise; @@ -225,7 +226,7 @@ public async Task UpdateInstantiatedAvatar() system.Update(0); - foreach (CachedWearable wearable in world.Get(avatarEntity).InstantiatedWearables) + foreach (var wearable in world.Get(avatarEntity).InstantiatedWearables) wearable.OriginalAsset.AddReference(); // Assert @@ -237,7 +238,7 @@ public async Task UpdateInstantiatedAvatar() public async Task DestroyInstantiatedAvatar() { // For some reason SetUp is not awaited, probably a Unity's bug - await UniTask.WaitUntil(() => system != null && avatarMesh != null); + await SetupAsync(); //Arrange Entity entity = world.Create(avatarShapeComponent, PartitionComponent.TOP_PRIORITY, new TransformComponent()); diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/AvatarInstantiatorSystemShould.cs.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorSystemShould.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/AvatarInstantiatorSystemShould.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorSystemShould.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/AvatarShape.PlayMode.Tests.asmref b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarShape.Instantiate.Tests.asmref similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/AvatarShape.PlayMode.Tests.asmref rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarShape.Instantiate.Tests.asmref diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/AvatarShape.PlayMode.Tests.asmref.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarShape.Instantiate.Tests.asmref.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/AvatarShape.PlayMode.Tests.asmref.meta rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarShape.Instantiate.Tests.asmref.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets.meta rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/AvatarBase_TestAsset.prefab b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/AvatarBase_TestAsset.prefab similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/AvatarBase_TestAsset.prefab rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/AvatarBase_TestAsset.prefab diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/AvatarBase_TestAsset.prefab.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/AvatarBase_TestAsset.prefab.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/AvatarBase_TestAsset.prefab.meta rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/AvatarBase_TestAsset.prefab.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/Avatar_Male_Mesh_TestAsset.asset b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/Avatar_Male_Mesh_TestAsset.asset similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/Avatar_Male_Mesh_TestAsset.asset rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/Avatar_Male_Mesh_TestAsset.asset diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/Avatar_Male_Mesh_TestAsset.asset.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/Avatar_Male_Mesh_TestAsset.asset.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/Avatar_Male_Mesh_TestAsset.asset.meta rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/Avatar_Male_Mesh_TestAsset.asset.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/Avatar_Toon_TestAsset.mat b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/Avatar_Toon_TestAsset.mat similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/Avatar_Toon_TestAsset.mat rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/Avatar_Toon_TestAsset.mat diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/Avatar_Toon_TestAsset.mat.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/Avatar_Toon_TestAsset.mat.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/Avatar_Toon_TestAsset.mat.meta rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/Avatar_Toon_TestAsset.mat.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/ComputeShaderSkinning_TestAsset.compute b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/ComputeShaderSkinning_TestAsset.compute similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/ComputeShaderSkinning_TestAsset.compute rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/ComputeShaderSkinning_TestAsset.compute diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/ComputeShaderSkinning_TestAsset.compute.meta b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/ComputeShaderSkinning_TestAsset.compute.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/PlayMode/TestAssets/ComputeShaderSkinning_TestAsset.compute.meta rename to Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/TestAssets/ComputeShaderSkinning_TestAsset.compute.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/UnityInterface/AvatarBase.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/UnityInterface/AvatarBase.cs index 6db6d42494..bb8ab9c493 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/UnityInterface/AvatarBase.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/UnityInterface/AvatarBase.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.Linq; using UnityEngine; diff --git a/Explorer/Assets/DCL/AvatarRendering/DemoScripts/AvatarRandomizer.cs b/Explorer/Assets/DCL/AvatarRendering/DemoScripts/AvatarRandomizer.cs index 886a6a06df..9ac835e933 100644 --- a/Explorer/Assets/DCL/AvatarRendering/DemoScripts/AvatarRandomizer.cs +++ b/Explorer/Assets/DCL/AvatarRendering/DemoScripts/AvatarRandomizer.cs @@ -1,4 +1,5 @@ using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using System.Collections.Generic; @@ -9,12 +10,12 @@ namespace DCL.AvatarRendering.DemoScripts public class AvatarRandomizer { public string BodyShape; - public Dictionary> wearablesDictionary; + public Dictionary> wearablesDictionary; public AvatarRandomizer(string bodyShape) { BodyShape = bodyShape; - wearablesDictionary = new Dictionary>(); + wearablesDictionary = new Dictionary>(); } public URN[] GetRandomAvatarWearables() @@ -33,7 +34,7 @@ public void AddWearable(IWearable wearable) { if (wearable.GetCategory().Equals(WearablesConstants.Categories.BODY_SHAPE)) return; - + if (!wearable.IsCompatibleWithBodyShape(BodyShape)) return; @@ -42,4 +43,4 @@ public void AddWearable(IWearable wearable) wearablesDictionary[wearable.GetCategory()].Add(wearable.GetUrn()); } } -} \ No newline at end of file +} diff --git a/Explorer/Assets/DCL/AvatarRendering/DemoScripts/DemoScripts.asmdef b/Explorer/Assets/DCL/AvatarRendering/DemoScripts/DemoScripts.asmdef index 7c37b21bd7..9acbb92197 100644 --- a/Explorer/Assets/DCL/AvatarRendering/DemoScripts/DemoScripts.asmdef +++ b/Explorer/Assets/DCL/AvatarRendering/DemoScripts/DemoScripts.asmdef @@ -5,12 +5,10 @@ "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", "GUID:3c7b57a14671040bd8c549056adc04f5", "GUID:5eabe9a3d4dd19d42a16208ea5411062", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:9e314663ce958b746873cb22d57ede55", "GUID:286980af24684da6acc1caa413039811", "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:9e24947de15b9834991c9d8411ea37cf", - "GUID:6e2b4bed29ad1c549ab19b744f36f388", "GUID:4794e238ed0f65142a4aea5848b513e5", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", "GUID:d8b63aba1907145bea998dd612889d6b", @@ -30,9 +28,9 @@ "GUID:78cc93eb55f63084db95d7a9b7cc3c57", "GUID:875a5d5129614170bd769ed012c2eb3d", "GUID:d832748739a186646b8656bdbd447ad0", - "GUID:800d01f252aedc243b320345c737f37c", "GUID:e56a0d6a94c144c784012e63b6043100", - "GUID:f4a0f40a2545482b8929d4c3c642f50a" + "GUID:f4a0f40a2545482b8929d4c3c642f50a", + "GUID:543b8f091a5947a3880b7f2bca2358bd" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/AvatarRendering/DemoScripts/Systems/InstantiateRandomAvatarsSystem.cs b/Explorer/Assets/DCL/AvatarRendering/DemoScripts/Systems/InstantiateRandomAvatarsSystem.cs index 05e328404b..9409d1939f 100644 --- a/Explorer/Assets/DCL/AvatarRendering/DemoScripts/Systems/InstantiateRandomAvatarsSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/DemoScripts/Systems/InstantiateRandomAvatarsSystem.cs @@ -7,6 +7,7 @@ using DCL.AvatarRendering.AvatarShape.Systems; using DCL.AvatarRendering.DemoScripts.Components; using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Components.Intentions; @@ -222,7 +223,7 @@ private void FinalizeRandomAvatarInstantiation( if (baseWearables.Succeeded) GenerateRandomizers(baseWearables, male, female); else - ReportHub.LogError(GetReportCategory(), $"Collection {assetPromise.LoadingIntention.Params[0].Item2} couldn't be loaded!"); + ReportHub.LogError(GetReportData(), $"Collection {assetPromise.LoadingIntention.Params[0].Item2} couldn't be loaded!"); } GenerateRandomAvatars(randomAvatarRequest.RandomAvatarsToInstantiate, cameraComponent.Camera.transform.position, characterControllerSettings); diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/CharacterEmoteIntent.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/CharacterEmoteIntent.cs index c30a07b4be..04d4f73328 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/CharacterEmoteIntent.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/CharacterEmoteIntent.cs @@ -15,5 +15,12 @@ public struct CharacterEmoteIntent public URN EmoteId; public bool Spatial; public TriggerSource TriggerSource; + + public void UpdateId(URN emoteId) + { + this.EmoteId = emoteId; + this.Spatial = true; + this.TriggerSource = TriggerSource.REMOTE; + } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/EmotesResolution.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/EmotesResolution.cs index bc9555857b..00bf896587 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/EmotesResolution.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/EmotesResolution.cs @@ -1,19 +1,20 @@ -using System.Collections.Generic; +using DCL.AvatarRendering.Loading.Components; namespace DCL.AvatarRendering.Emotes { public readonly struct EmotesResolution { - /// - /// Poolable collection of result wearables - /// - public IReadOnlyList Emotes { get; } public int TotalAmount { get; } - public EmotesResolution(IReadOnlyList emotes, int totalAmount) + private readonly RepoolableList emotes; + + public EmotesResolution(RepoolableList emotes, int totalAmount) { - Emotes = emotes; + this.emotes = emotes; TotalAmount = totalAmount; } + + public ConsumedList ConsumeEmotes() => + new (emotes); } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/IEmote.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/IEmote.cs index a2818ad56e..ad762ebb9c 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/IEmote.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/IEmote.cs @@ -1,15 +1,15 @@ -using DCL.AvatarRendering.Wearables.Components; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Helpers; using ECS.StreamableLoading.Common.Components; using UnityEngine; namespace DCL.AvatarRendering.Emotes { - public interface IEmote : IAvatarAttachment + public interface IEmote : IAvatarAttachment { - StreamableLoadingResult Model { get; set; } - StreamableLoadingResult?[] AudioAssetResults { get; set; } - StreamableLoadingResult?[] AssetResults { get; } + StreamableLoadingResult?[] AudioAssetResults { get; } + StreamableLoadingResult?[] AssetResults { get; } bool IsLooping(); } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersFromRealmIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersFromRealmIntention.cs index 0b3e498549..9e58734292 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersFromRealmIntention.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersFromRealmIntention.cs @@ -6,12 +6,12 @@ namespace DCL.AvatarRendering.Emotes { - public struct GetEmotesByPointersFromRealmIntention : IEquatable, ILoadingIntention + public struct GetEmotesByPointersFromRealmIntention : IEquatable, IPointersLoadingIntention { - public CancellationTokenSource CancellationTokenSource => CommonArguments.CancellationTokenSource; + public readonly CancellationTokenSource CancellationTokenSource => CommonArguments.CancellationTokenSource; public CommonLoadingArguments CommonArguments { get; set; } - public readonly IReadOnlyList Pointers; + public IReadOnlyList Pointers { get; } public GetEmotesByPointersFromRealmIntention(IReadOnlyList pointers, CommonLoadingArguments commonArguments) { diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/GetEmotesByPointersIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersIntention.cs similarity index 93% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Components/GetEmotesByPointersIntention.cs rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersIntention.cs index 7a4312cee0..152a656205 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/GetEmotesByPointersIntention.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersIntention.cs @@ -1,6 +1,6 @@ using AssetManagement; using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using ECS.StreamableLoading; using ECS.StreamableLoading.Common.Components; using System; @@ -21,9 +21,8 @@ public struct GetEmotesByPointersIntention : IAssetIntention, IDisposable, IEqua public HashSet SuccessfulPointers { get; } public AssetSource PermittedSources { get; } public BodyShape BodyShape { get; } - public int Timeout { get; } - public float ElapsedTime; + public LoadTimeout Timeout; private readonly List pointers; @@ -38,7 +37,7 @@ public GetEmotesByPointersIntention(List pointers, SuccessfulPointers = POINTERS_HASHSET_POOL.Get(); PermittedSources = permittedSources; BodyShape = bodyShape; - Timeout = timeout; + Timeout = new LoadTimeout(timeout); } public bool Equals(GetEmotesByPointersIntention other) => diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/GetEmotesByPointersIntention.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersIntention.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Components/GetEmotesByPointersIntention.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersIntention.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetOwnedEmotesFromRealmIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetOwnedEmotesFromRealmIntention.cs index 877af33ea3..4dc7dc78c7 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetOwnedEmotesFromRealmIntention.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetOwnedEmotesFromRealmIntention.cs @@ -1,18 +1,23 @@ +using DCL.AvatarRendering.Loading.Components; using ECS.StreamableLoading.Common.Components; using System; using System.Threading; namespace DCL.AvatarRendering.Emotes { - public struct GetOwnedEmotesFromRealmIntention : ILoadingIntention, IEquatable + public struct GetOwnedEmotesFromRealmIntention : IAttachmentsLoadingIntention, IEquatable { + public RepoolableList Result { get; } + public CancellationTokenSource CancellationTokenSource { get; } + public CommonLoadingArguments CommonArguments { get; set; } public GetOwnedEmotesFromRealmIntention(CommonLoadingArguments commonArguments) : this() { CommonArguments = commonArguments; CancellationTokenSource = new CancellationTokenSource(); + Result = RepoolableList.NewList(); } public bool Equals(GetOwnedEmotesFromRealmIntention other) => @@ -23,5 +28,17 @@ public override bool Equals(object? obj) => public override int GetHashCode() => CommonArguments.GetHashCode(); + + public int TotalAmount { get; private set; } + + public void SetTotal(int total) + { + TotalAmount = total; + } + + public void AppendToResult(IEmote resultElement) + { + Result.List.Add(resultElement); + } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetSceneEmoteFromRealmIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetSceneEmoteFromRealmIntention.cs index b9779c8158..ce7b7cbc1f 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetSceneEmoteFromRealmIntention.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetSceneEmoteFromRealmIntention.cs @@ -1,5 +1,6 @@ using AssetManagement; -using DCL.AvatarRendering.Wearables; +using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Components; using ECS.StreamableLoading; using ECS.StreamableLoading.Common.Components; using SceneRunner.Scene; @@ -10,6 +11,8 @@ namespace DCL.AvatarRendering.Emotes { public struct GetSceneEmoteFromRealmIntention : IEquatable, IAssetIntention { + private const string SCENE_EMOTE_PREFIX = "urn:decentraland:off-chain:scene-emote"; + public CancellationTokenSource CancellationTokenSource { get; } public string SceneId { get; } public SceneAssetBundleManifest AssetBundleManifest { get; } @@ -17,17 +20,19 @@ public struct GetSceneEmoteFromRealmIntention : IEquatable EmoteHash == other.EmoteHash && Loop == other.Loop && BodyShape.Equals(other.BodyShape); + + public readonly URN NewSceneEmoteURN() => + $"{SCENE_EMOTE_PREFIX}:{SceneId}-{EmoteHash}-{Loop.ToString().ToLower()}"; } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/LoadTimeout.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/LoadTimeout.cs new file mode 100644 index 0000000000..019fd444f7 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/LoadTimeout.cs @@ -0,0 +1,20 @@ +namespace DCL.AvatarRendering.Emotes +{ + public struct LoadTimeout + { + public int Timeout { get; } + + public float ElapsedTime { get; private set; } + + public LoadTimeout(int timeout) : this() + { + Timeout = timeout; + } + + public bool IsTimeout(float deltaTime) + { + ElapsedTime += deltaTime; + return ElapsedTime >= Timeout; + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/LoadTimeout.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/LoadTimeout.cs.meta new file mode 100644 index 0000000000..ae6069e930 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/LoadTimeout.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1474408bbce249f2b512d4976346aa34 +timeCreated: 1724250714 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/EmbeddedEmotesData.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/EmbeddedEmotesData.cs index 65cdf8458b..bbd9ddb7cd 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/EmbeddedEmotesData.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/EmbeddedEmotesData.cs @@ -1,4 +1,6 @@ -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; using DCL.AvatarRendering.Wearables.Helpers; using ECS.StreamableLoading.Common.Components; using System; @@ -37,8 +39,8 @@ public IEnumerable GenerateEmotes() foreach (EmbeddedEmote embeddedEmote in emotes) { - var emote = new Emote(); var model = new EmoteDTO(); + var emote = new Emote(new StreamableLoadingResult(), false); model.id = embeddedEmote.id; // No content hashes available @@ -63,12 +65,11 @@ public IEnumerable GenerateEmotes() model.metadata.emoteDataADR74 = embeddedEmote.entity; emote.Model = new StreamableLoadingResult(model); - emote.IsLoading = false; emote.ThumbnailAssetResult = new StreamableLoadingResult(embeddedEmote.thumbnail); - WearableRegularAsset asset = CreateWearableAsset(embeddedEmote.prefab); + AttachmentRegularAsset asset = CreateWearableAsset(embeddedEmote.prefab); asset.AddReference(); - var assetLoadResult = new StreamableLoadingResult(asset); + var assetLoadResult = new StreamableLoadingResult(asset); emote.AssetResults[BodyShape.MALE] = assetLoadResult; emote.AssetResults[BodyShape.FEMALE] = assetLoadResult; @@ -86,14 +87,14 @@ public IEnumerable GenerateEmotes() return generatedEmotes; } - private static WearableRegularAsset CreateWearableAsset(GameObject glb) + private static AttachmentRegularAsset CreateWearableAsset(GameObject glb) { - var rendererInfos = new List(); + var rendererInfos = new List(); foreach (SkinnedMeshRenderer? renderer in glb.GetComponentsInChildren()) - rendererInfos.Add(new WearableRegularAsset.RendererInfo(renderer, renderer.sharedMaterial)); + rendererInfos.Add(new AttachmentRegularAsset.RendererInfo(renderer, renderer.sharedMaterial)); - return new WearableRegularAsset(glb, rendererInfos, null); + return new AttachmentRegularAsset(glb, rendererInfos, null); } #if UNITY_EDITOR diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Emote.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Emote.cs index 4f644f20d9..c98023d9fc 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Emote.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Emote.cs @@ -1,5 +1,7 @@ -using DCL.AvatarRendering.Wearables; -using DCL.AvatarRendering.Wearables.Components; +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; using DCL.AvatarRendering.Wearables.Helpers; using ECS.StreamableLoading.Common.Components; using SceneRunner.Scene; @@ -10,24 +12,35 @@ namespace DCL.AvatarRendering.Emotes public class Emote : IEmote { public StreamableLoadingResult? ManifestResult { get; set; } - public StreamableLoadingResult?[] AssetResults { get; } = new StreamableLoadingResult?[BodyShape.COUNT]; + public StreamableLoadingResult?[] AssetResults { get; } = new StreamableLoadingResult?[BodyShape.COUNT]; public StreamableLoadingResult? ThumbnailAssetResult { get; set; } public StreamableLoadingResult Model { get; set; } public StreamableLoadingResult?[] AudioAssetResults { get; set; } = new StreamableLoadingResult?[BodyShape.COUNT]; - public bool IsLoading { get; set; } = true; + public bool IsLoading { get; private set; } + + public Emote(StreamableLoadingResult model, bool isLoading = true) + { + Model = model; + IsLoading = isLoading; + } + + public void UpdateLoadingStatus(bool isLoading) + { + IsLoading = isLoading; + } public bool IsOnChain() => - IsOnChain(id: ((IAvatarAttachment) this).GetUrn().ToString()); + IsOnChain(id: ((IAvatarAttachment)this).GetUrn().ToString()); public static bool IsOnChain(string id) => id.StartsWith("urn:") && !id.StartsWith("urn:decentraland:off-chain:"); - public AvatarAttachmentDTO GetDTO() => + public AvatarAttachmentDTO DTO => Model.Asset!; public override string ToString() => - ((IAvatarAttachment)this).ToString(); + ((IAvatarAttachment)this).ToString(); public bool IsLooping() => Model.Asset.metadata.emoteDataADR74.loop; diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Equipped/EquippedEmotes.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Equipped/EquippedEmotes.cs index 6575544a30..d66bf8db08 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Equipped/EquippedEmotes.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Equipped/EquippedEmotes.cs @@ -1,4 +1,4 @@ -using System; +using DCL.AvatarRendering.Loading.Components; namespace DCL.AvatarRendering.Emotes.Equipped { diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/EmoteDTO.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/EmoteDTO.cs index 10c0b25ca0..1eb60e5643 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/EmoteDTO.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/EmoteDTO.cs @@ -1,3 +1,5 @@ +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.DTO; using DCL.AvatarRendering.Wearables; using System; diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/EmotesDTOList.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/EmotesDTOList.cs index 32b458a3fb..3b41343a38 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/EmotesDTOList.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/EmotesDTOList.cs @@ -1,14 +1,17 @@ -using System.Collections.Generic; +using DCL.AvatarRendering.Loading.Components; namespace DCL.AvatarRendering.Emotes { - public struct EmotesDTOList + public readonly struct EmotesDTOList : IAttachmentsDTOList { - public readonly IReadOnlyList Value; + private readonly RepoolableList value; - public EmotesDTOList(IReadOnlyList value) + public EmotesDTOList(RepoolableList value) { - Value = value; + this.value = value; } + + public ConsumedList ConsumeAttachments() => + IAttachmentsDTOList.DefaultConsumeAttachments(value); } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/LambdaOwnedEmoteElementDTO.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/LambdaOwnedEmoteElementDTO.cs index d83cdb7d7b..3236c4f8df 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/LambdaOwnedEmoteElementDTO.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/DTO/LambdaOwnedEmoteElementDTO.cs @@ -1,32 +1,38 @@ +using DCL.AvatarRendering.Loading; +using Newtonsoft.Json; using System; using System.Collections.Generic; namespace DCL.AvatarRendering.Emotes { [Serializable] - public struct LambdaOwnedEmoteElementDTO + public class LambdaOwnedEmoteElementDTO : ILambdaResponseElement { public string type; public string urn; public string name; public string category; public EmoteDTO entity; - public IndividualDataDTO[] individualData; + public ElementIndividualDataDto[] individualData; + + [JsonIgnore] + public EmoteDTO Entity => entity; + + [JsonIgnore] + public IReadOnlyList IndividualData => individualData; - [Serializable] - public struct IndividualDataDTO - { - public string id; - public string tokenId; - public string transferredAt; - public string price; - } } [Serializable] - public struct LambdaOwnedEmoteElementList + public struct LambdaOwnedEmoteElementList : IAttachmentLambdaResponse { public List elements; public int totalAmount; + + [JsonIgnore] + public IReadOnlyList Page => elements; + + [JsonIgnore] + public int TotalAmount => totalAmount; } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EcsEmoteProvider.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EcsEmoteProvider.cs index 3849ebff90..4266c8c393 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EcsEmoteProvider.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EcsEmoteProvider.cs @@ -1,16 +1,14 @@ using Arch.Core; using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.Web3; using ECS; using ECS.Prioritization.Components; using ECS.StreamableLoading.Common; using ECS.StreamableLoading.Common.Components; -using System; using System.Collections.Generic; using System.Threading; -using UnityEngine.Pool; using PromiseByPointers = ECS.StreamableLoading.Common.AssetPromise; using OwnedEmotesPromise = ECS.StreamableLoading.Common.AssetPromise emotes, int totalAmount)> GetOwnedEmotesAsync(Web3Address userId, CancellationToken ct, - int? pageNum = null, int? pageSize = null, URN? collectionId = null, - IEmoteProvider.OrderOperation? orderOperation = null, string? name = null) + public async UniTask GetOwnedEmotesAsync( + Web3Address userId, + CancellationToken ct, + IEmoteProvider.OwnedEmotesRequestOptions requestOptions, + List output + ) { + output.Clear(); + urlBuilder.Clear(); urlBuilder.AppendDomain(realmData.Ipfs.LambdasBaseUrl) .AppendPath(URLPath.FromString($"/users/{userId}/emotes")) .AppendParameter(new URLParameter("includeEntities", "true")); + int? pageNum = requestOptions.pageNum; + int? pageSize = requestOptions.pageSize; + URN? collectionId = requestOptions.collectionId; + IEmoteProvider.OrderOperation? orderOperation = requestOptions.orderOperation; + string? name = requestOptions.name; + if (pageNum != null) urlBuilder.AppendParameter(new URLParameter("pageNum", pageNum.ToString())); @@ -67,27 +76,32 @@ public EcsEmoteProvider(World world, .ToUniTaskAsync(world, cancellationToken: ct); if (!promise.Result.HasValue) - return (ArraySegment.Empty, 0); + return 0; if (!promise.Result.Value.Succeeded) - throw promise.Result.Value.Exception; + throw promise.Result.Value.Exception!; - return (promise.Result.Value.Asset.Emotes, promise.Result.Value.Asset.TotalAmount); + using var emotes = promise.Result.Value.Asset.ConsumeEmotes(); + output.AddRange(emotes.Value); + return promise.Result.Value.Asset.TotalAmount; } - public async UniTask> GetEmotesAsync(IReadOnlyCollection emoteIds, BodyShape bodyShape, CancellationToken ct) + public async UniTask GetEmotesAsync(IReadOnlyCollection emoteIds, BodyShape bodyShape, CancellationToken ct, List output) { + output.Clear(); + using GetEmotesByPointersIntention intention = EmoteComponentsUtils.CreateGetEmotesByPointersIntention(bodyShape, emoteIds); var promise = PromiseByPointers.Create(world, intention, PartitionComponent.TOP_PRIORITY); promise = await promise.ToUniTaskAsync(world, cancellationToken: ct); if (!promise.Result.HasValue) - return Array.Empty(); + return; if (!promise.Result.Value.Succeeded) throw promise.Result.Value.Exception!; - return promise.Result.Value.Asset.Emotes; + using var emotes = promise.Result.Value.Asset.ConsumeEmotes(); + output.AddRange(emotes.Value); } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EmoteComponentsUtils.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EmoteComponentsUtils.cs index 5c068a5abf..2dfeb89385 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EmoteComponentsUtils.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EmoteComponentsUtils.cs @@ -1,5 +1,5 @@ using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using System.Collections.Generic; using static DCL.AvatarRendering.Wearables.Helpers.WearableComponentsUtils; @@ -9,26 +9,22 @@ public static class EmoteComponentsUtils { public static GetEmotesByPointersIntention CreateGetEmotesByPointersIntention(BodyShape bodyShape, IReadOnlyCollection emotes) { - List pointers = POINTERS_POOL.Get(); + List pointers = POINTERS_POOL.Get()!; foreach (URN emote in emotes) - { if (!emote.IsNullOrEmpty()) pointers.Add(emote); - } return new GetEmotesByPointersIntention(pointers, bodyShape); } public static GetEmotesByPointersIntention CreateGetEmotesByPointersIntention(BodyShape bodyShape, IReadOnlyCollection emotes) { - List pointers = POINTERS_POOL.Get(); + List pointers = POINTERS_POOL.Get()!; foreach (URN emote in emotes) - { if (!emote.IsNullOrEmpty()) pointers.Add(emote); - } return new GetEmotesByPointersIntention(pointers, bodyShape); } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteCache.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteCache.cs deleted file mode 100644 index b40565cea3..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteCache.cs +++ /dev/null @@ -1,22 +0,0 @@ -using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables.Components; -using DCL.Optimization.PerformanceBudgeting; -using System.Collections.Generic; - -namespace DCL.AvatarRendering.Emotes -{ - public interface IEmoteCache - { - bool TryGetEmote(URN urn, out IEmote emote); - - void Set(URN urn, IEmote emote); - - IEmote GetOrAddEmoteByDTO(EmoteDTO emoteDto, bool qualifiedForUnloading = true); - - void Unload(IPerformanceBudget frameTimeBudget); - - void SetOwnedNft(URN urn, NftBlockchainOperationEntry operation); - - bool TryGetOwnedNftRegistry(URN nftUrn, out IReadOnlyDictionary registry); - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteProvider.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteProvider.cs index e04a08748f..220e1ece0a 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteProvider.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteProvider.cs @@ -1,6 +1,6 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.Web3; using System.Collections.Generic; using System.Threading; @@ -21,10 +21,37 @@ public OrderOperation(string by, bool isAscendent) } } - UniTask<(IReadOnlyList emotes, int totalAmount)> GetOwnedEmotesAsync(Web3Address userId, CancellationToken ct, - int? pageNum = null, int? pageSize = null, URN? collectionId = null, - OrderOperation? orderOperation = null, string? name = null); + public readonly struct OwnedEmotesRequestOptions + { + public readonly int? pageNum; + public readonly int? pageSize; + public readonly URN? collectionId; + public readonly OrderOperation? orderOperation; + public readonly string? name; + + public OwnedEmotesRequestOptions(int? pageNum, int? pageSize, URN? collectionId, IEmoteProvider.OrderOperation? orderOperation, string? name) + { + this.pageNum = pageNum; + this.pageSize = pageSize; + this.collectionId = collectionId; + this.orderOperation = orderOperation; + this.name = name; + } + } + + /// Total amount + UniTask GetOwnedEmotesAsync( + Web3Address userId, + CancellationToken ct, + OwnedEmotesRequestOptions requestOptions, + List output + ); - UniTask> GetEmotesAsync(IReadOnlyCollection emoteIds, BodyShape bodyShape, CancellationToken ct); + UniTask GetEmotesAsync( + IReadOnlyCollection emoteIds, + BodyShape bodyShape, + CancellationToken ct, + List output + ); } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteStorage.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteStorage.cs new file mode 100644 index 0000000000..5df2c8a4a2 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteStorage.cs @@ -0,0 +1,6 @@ +using DCL.AvatarRendering.Loading; + +namespace DCL.AvatarRendering.Emotes +{ + public interface IEmoteStorage : IAvatarElementStorage { } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteCache.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteStorage.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteCache.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/IEmoteStorage.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesCache.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesStorage.cs similarity index 52% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesCache.cs rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesStorage.cs index 678deb1c21..1bb61406b4 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesCache.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesStorage.cs @@ -1,4 +1,5 @@ using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Assets; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.Optimization.PerformanceBudgeting; @@ -8,7 +9,7 @@ namespace DCL.AvatarRendering.Emotes { - public class MemoryEmotesCache : IEmoteCache + public class MemoryEmotesStorage : IEmoteStorage { private readonly LinkedList<(URN key, long lastUsedFrame)> listedCacheKeys = new (); private readonly Dictionary> cacheKeysDictionary = new (new Dictionary>(), @@ -17,62 +18,85 @@ public class MemoryEmotesCache : IEmoteCache private readonly Dictionary> ownedNftsRegistry = new (new Dictionary>(), URNIgnoreCaseEqualityComparer.Default); - public bool TryGetEmote(URN urn, out IEmote emote) + private readonly object lockObject = new (); + + public bool TryGetElement(URN urn, out IEmote element) { - if (!emotes.TryGetValue(urn, out emote)) - return false; + lock (lockObject) + { + if (!emotes.TryGetValue(urn, out element)) + return false; - UpdateListedCachePriority(urn); + UpdateListedCachePriority(urn); - return true; + return true; + } } - public void Set(URN urn, IEmote emote) => - emotes[urn] = emote; + public void Set(URN urn, IEmote element) + { + lock (lockObject) { emotes[urn] = element; } + } - public IEmote GetOrAddEmoteByDTO(EmoteDTO emoteDto, bool qualifiedForUnloading = true) => - TryGetEmote(emoteDto.metadata.id, out IEmote existingEmote) - ? existingEmote - : AddEmote(emoteDto.metadata.id, new Emote - { - Model = new StreamableLoadingResult(emoteDto), - IsLoading = false, - }, qualifiedForUnloading); + public IEmote GetOrAddByDTO(EmoteDTO emoteDto, bool qualifiedForUnloading = true) + { + lock (lockObject) + { + return TryGetElement(emoteDto.metadata.id, out IEmote existingEmote) + ? existingEmote + : AddEmote( + emoteDto.metadata.id, + new Emote( + new StreamableLoadingResult(emoteDto), false), + qualifiedForUnloading + ); + } + } public void Unload(IPerformanceBudget frameTimeBudget) { - for (LinkedListNode<(URN key, long lastUsedFrame)> node = listedCacheKeys.First; frameTimeBudget.TrySpendBudget() && node != null; node = node.Next) + lock (lockObject) { - URN urn = node.Value.key; + for (LinkedListNode<(URN key, long lastUsedFrame)> node = listedCacheKeys.First; frameTimeBudget.TrySpendBudget() && node != null; node = node.Next) + { + URN urn = node.Value.key; - if (!emotes.TryGetValue(urn, out IEmote emote)) - continue; + if (!emotes.TryGetValue(urn, out IEmote emote)) + continue; - if (!TryUnloadAllWearableAssets(emote)) continue; + if (!TryUnloadAllWearableAssets(emote)) continue; - emotes.Remove(urn); - cacheKeysDictionary.Remove(urn); - listedCacheKeys.Remove(node); + emotes.Remove(urn); + cacheKeysDictionary.Remove(urn); + listedCacheKeys.Remove(node); + } } } public void SetOwnedNft(URN nftUrn, NftBlockchainOperationEntry entry) { - if (!ownedNftsRegistry.TryGetValue(nftUrn, out Dictionary ownedWearableRegistry)) + lock (lockObject) { - ownedWearableRegistry = new Dictionary(new Dictionary(), - URNIgnoreCaseEqualityComparer.Default); - ownedNftsRegistry[nftUrn] = ownedWearableRegistry; - } + if (!ownedNftsRegistry.TryGetValue(nftUrn, out Dictionary ownedWearableRegistry)) + { + ownedWearableRegistry = new Dictionary(new Dictionary(), + URNIgnoreCaseEqualityComparer.Default); - ownedWearableRegistry[entry.Urn] = entry; + ownedNftsRegistry[nftUrn] = ownedWearableRegistry; + } + + ownedWearableRegistry[entry.Urn] = entry; + } } public bool TryGetOwnedNftRegistry(URN nftUrn, out IReadOnlyDictionary registry) { - bool result = ownedNftsRegistry.TryGetValue(nftUrn, out Dictionary r); - registry = r; - return result; + lock (lockObject) + { + bool result = ownedNftsRegistry.TryGetValue(nftUrn, out Dictionary r); + registry = r; + return result; + } } private IEmote AddEmote(URN urn, IEmote wearable, bool qualifiedForUnloading) @@ -104,8 +128,8 @@ private static bool TryUnloadAllWearableAssets(IEmote emote) for (var i = 0; i < emote.AssetResults.Length; i++) { - StreamableLoadingResult? result = emote.AssetResults[i]; - WearableRegularAsset? wearableAsset = emote.AssetResults[i]?.Asset; + StreamableLoadingResult? result = emote.AssetResults[i]; + AttachmentRegularAsset? wearableAsset = emote.AssetResults[i]?.Asset; if (wearableAsset == null || wearableAsset.ReferenceCount == 0) { diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesCache.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesStorage.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesCache.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/MemoryEmotesStorage.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteAssetBundleSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteAssetBundleSystem.cs deleted file mode 100644 index 9fd638dccc..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteAssetBundleSystem.cs +++ /dev/null @@ -1,120 +0,0 @@ -using Arch.Core; -using Arch.System; -using Arch.SystemGroups; -using Arch.SystemGroups.DefaultSystemGroups; -using DCL.AvatarRendering.Wearables; -using DCL.AvatarRendering.Wearables.Helpers; -using DCL.Diagnostics; -using ECS.Abstract; -using ECS.StreamableLoading.AssetBundles; -using ECS.StreamableLoading.Common; -using ECS.StreamableLoading.Common.Components; -using SceneRunner.Scene; -using UnityEngine; -using AssetBundleManifestPromise = ECS.StreamableLoading.Common.AssetPromise; -using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; -using AudioPromise = ECS.StreamableLoading.Common.AssetPromise; - -namespace DCL.AvatarRendering.Emotes -{ - [UpdateInGroup(typeof(PresentationSystemGroup))] - [LogCategory(ReportCategory.EMOTE)] - [UpdateAfter(typeof(LoadEmotesByPointersSystem))] - [UpdateAfter(typeof(LoadSceneEmotesSystem))] - public partial class FinalizeEmoteAssetBundleSystem : BaseUnityLoopSystem - { - public FinalizeEmoteAssetBundleSystem(World world) : base(world) - { - } - - protected override void Update(float t) - { - FinalizeAssetBundleManifestLoadingQuery(World); - FinalizeAssetBundleLoadingQuery(World); - FinalizeAudioClipPromiseQuery(World); - } - - [Query] - private void FinalizeAssetBundleManifestLoading(in Entity entity, ref AssetBundleManifestPromise promise, - ref IEmote emote) - { - if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested) - { - emote.ManifestResult = null; - emote.IsLoading = false; - promise.ForgetLoading(World); - World.Destroy(entity); - return; - } - - if (promise.SafeTryConsume(World, out StreamableLoadingResult result)) - { - emote.ManifestResult = result; - emote.IsLoading = false; - World.Destroy(entity); - } - } - - [Query] - private void FinalizeAssetBundleLoading(in Entity entity, ref AssetBundlePromise promise, ref IEmote emote, ref BodyShape bodyShape) - { - if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested) - { - ResetEmoteResultOnCancellation(emote, bodyShape); - promise.ForgetLoading(World); - World.Destroy(entity); - return; - } - - if (promise.SafeTryConsume(World, out StreamableLoadingResult result)) - { - if (result.Succeeded) - { - var asset = new StreamableLoadingResult(result.ToRegularAsset()); - - if (emote.IsUnisex()) - { - // TODO: can an emote have different files for each gender? - // if that the case, we should not set the same asset result for both body shapes - emote.AssetResults[BodyShape.MALE] = asset; - emote.AssetResults[BodyShape.FEMALE] = asset; - } - else - emote.AssetResults[bodyShape] = asset; - } - - emote.IsLoading = false; - World.Destroy(entity); - } - } - - [Query] - private void FinalizeAudioClipPromise(in Entity entity, ref IEmote emote, ref AudioPromise promise, BodyShape bodyShape) - { - if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested) - { - promise.ForgetLoading(World); - World.Destroy(entity); - return; - } - - if (promise.IsConsumed) return; - - if (!promise.SafeTryConsume(World, out StreamableLoadingResult result)) - return; - - if (result.Succeeded) - emote.AudioAssetResults[bodyShape] = result; - - World.Destroy(entity); - } - - private static void ResetEmoteResultOnCancellation(IEmote emote, BodyShape bodyShape) - { - emote.IsLoading = false; - - if (emote.AssetResults[bodyShape] is { IsInitialized: false }) - emote.AssetResults[bodyShape] = null; - } - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteLoadingSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteLoadingSystem.cs new file mode 100644 index 0000000000..55b9868c68 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteLoadingSystem.cs @@ -0,0 +1,146 @@ +using Arch.Core; +using Arch.System; +using Arch.SystemGroups; +using Arch.SystemGroups.DefaultSystemGroups; +using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.Systems.Abstract; +using DCL.AvatarRendering.Wearables.Helpers; +using DCL.Diagnostics; +using DCL.Optimization.Pools; +using ECS.StreamableLoading.AssetBundles; +using ECS.StreamableLoading.Common; +using ECS.StreamableLoading.Common.Components; +using SceneRunner.Scene; +using UnityEngine; +using AssetBundleManifestPromise = ECS.StreamableLoading.Common.AssetPromise; +using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; +using AudioPromise = ECS.StreamableLoading.Common.AssetPromise; +using EmotesFromRealmPromise = ECS.StreamableLoading.Common.AssetPromise; + +namespace DCL.AvatarRendering.Emotes +{ + [UpdateInGroup(typeof(PresentationSystemGroup))] + [LogCategory(ReportCategory.EMOTE)] + [UpdateAfter(typeof(Load.LoadEmotesByPointersSystem))] + [UpdateAfter(typeof(Load.LoadSceneEmotesSystem))] + public partial class FinalizeEmoteLoadingSystem : FinalizeElementsLoadingSystem + { + public FinalizeEmoteLoadingSystem(World world, IEmoteStorage emoteStorage) : base(world, emoteStorage, new ListObjectPool()) { } + + protected override void Update(float t) + { + FinalizeEmoteDTOQuery(World!); + FinalizeAssetBundleManifestLoadingQuery(World); + FinalizeAssetBundleLoadingQuery(World); + FinalizeAudioClipPromiseQuery(World); + } + + [Query] + private void FinalizeAssetBundleManifestLoading( + Entity entity, + ref AssetBundleManifestPromise promise, + ref IEmote emote + ) + { + if (promise.TryForgetWithEntityIfCancelled(entity, World!)) + { + emote.ResetManifest(); + return; + } + + if (promise.SafeTryConsume(World!, GetReportCategory(), out StreamableLoadingResult result)) + { + emote.UpdateManifest(result); + World!.Destroy(entity); + } + } + + [Query] + private void FinalizeEmoteDTO( + Entity entity, + ref EmotesFromRealmPromise promise + ) + { + if (promise.TryForgetWithEntityIfCancelled(entity, World!)) + return; + + if (promise.SafeTryConsume(World!, GetReportCategory(), out StreamableLoadingResult promiseResult)) + { + if (!promiseResult.Succeeded) + { + foreach (var pointerID in promise.LoadingIntention.Pointers) + if (storage.TryGetElement(pointerID, out IEmote component)) + component.UpdateLoadingStatus(false); + } + else + using (var list = promiseResult.Asset.ConsumeAttachments()) + foreach (EmoteDTO assetEntity in list.Value) + { + IEmote component = storage.GetOrAddByDTO(assetEntity); + component.ApplyAndMarkAsLoaded(assetEntity); + } + + World!.Destroy(entity); + } + } + + [Query] + private void FinalizeAssetBundleLoading(Entity entity, ref AssetBundlePromise promise, ref IEmote emote, ref BodyShape bodyShape) + { + if (promise.TryForgetWithEntityIfCancelled(entity, World!)) + { + ResetEmoteResultOnCancellation(emote, bodyShape); + return; + } + + if (promise.SafeTryConsume(World, GetReportCategory(), out StreamableLoadingResult result)) + { + if (result.Succeeded) + { + var asset = new StreamableLoadingResult(result.ToRegularAsset()); + + if (emote.IsUnisex()) + { + // TODO: can an emote have different files for each gender? + // if that the case, we should not set the same asset result for both body shapes + emote.AssetResults[BodyShape.MALE] = asset; + emote.AssetResults[BodyShape.FEMALE] = asset; + } + else + emote.AssetResults[bodyShape] = asset; + } + + emote.UpdateLoadingStatus(false); + World!.Destroy(entity); + } + } + + [Query] + private void FinalizeAudioClipPromise(Entity entity, ref IEmote emote, ref AudioPromise promise, BodyShape bodyShape) + { + if (promise.TryForgetWithEntityIfCancelled(entity, World!)) + return; + + if (promise.IsConsumed) return; + + if (!promise.SafeTryConsume(World!, GetReportCategory(), out StreamableLoadingResult result)) + return; + + if (result.Succeeded) + emote.AudioAssetResults[bodyShape] = result; + + World!.Destroy(entity); + } + + private static void ResetEmoteResultOnCancellation(IEmote emote, BodyShape bodyShape) + { + emote.UpdateLoadingStatus(false); + + if (emote.AssetResults[bodyShape] is { IsInitialized: false }) + emote.AssetResults[bodyShape] = null; + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteAssetBundleSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteLoadingSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteAssetBundleSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/FinalizeEmoteLoadingSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load.meta new file mode 100644 index 0000000000..f37dabe2b1 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c9f300ae062f41f2a849d494853b8899 +timeCreated: 1724251164 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadAudioClipGlobalSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadAudioClipGlobalSystem.cs similarity index 93% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadAudioClipGlobalSystem.cs rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadAudioClipGlobalSystem.cs index cfaa5b0892..82a550c3ab 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadAudioClipGlobalSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadAudioClipGlobalSystem.cs @@ -7,7 +7,7 @@ using ECS.StreamableLoading.Cache; using UnityEngine; -namespace DCL.AvatarRendering.Emotes +namespace DCL.AvatarRendering.Emotes.Load { [UpdateInGroup(typeof(PresentationSystemGroup))] [LogCategory(ReportCategory.SDK_AUDIO_SOURCES)] diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadAudioClipGlobalSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadAudioClipGlobalSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadAudioClipGlobalSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadAudioClipGlobalSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadEmotesByPointersSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadEmotesByPointersSystem.cs new file mode 100644 index 0000000000..d85de2a6f0 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadEmotesByPointersSystem.cs @@ -0,0 +1,26 @@ +using Arch.Core; +using Arch.SystemGroups; +using Arch.SystemGroups.DefaultSystemGroups; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.Systems.Abstract; +using DCL.Diagnostics; +using DCL.WebRequests; +using ECS.StreamableLoading.Cache; + +namespace DCL.AvatarRendering.Emotes.Load +{ + [UpdateInGroup(typeof(PresentationSystemGroup))] + [LogCategory(ReportCategory.EMOTE)] + public partial class LoadEmotesByPointersSystem : LoadElementsByPointersSystem + { + public LoadEmotesByPointersSystem( + World world, + IWebRequestController webRequestController, + IStreamableCache cache + ) + : base(world, cache, webRequestController) { } + + protected override EmotesDTOList CreateAssetFromListOfDTOs(RepoolableList list) => + new (list); + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadEmotesByPointersSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadEmotesByPointersSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadEmotesByPointersSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadEmotesByPointersSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadOwnedEmotesSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadOwnedEmotesSystem.cs new file mode 100644 index 0000000000..2f2a22a8fa --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadOwnedEmotesSystem.cs @@ -0,0 +1,36 @@ +using Arch.Core; +using Arch.SystemGroups; +using Arch.SystemGroups.DefaultSystemGroups; +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.Systems.Abstract; +using DCL.Diagnostics; +using DCL.WebRequests; +using ECS; +using ECS.StreamableLoading.Cache; + +namespace DCL.AvatarRendering.Emotes.Load +{ + [UpdateInGroup(typeof(PresentationSystemGroup))] + [LogCategory(ReportCategory.EMOTE)] + public partial class LoadOwnedEmotesSystem : LoadElementsByIntentionSystem + { + public LoadOwnedEmotesSystem( + World world, + IRealmData realmData, + IWebRequestController webRequestController, + IStreamableCache cache, + IEmoteStorage emoteStorage + ) : base(world, cache, emoteStorage, webRequestController, realmData) { } + + protected override async UniTask>> ParsedResponseAsync(GenericDownloadHandlerUtils.Adapter adapter) => + await adapter.CreateFromJson(WRJsonParser.Unity); + + protected override EmotesResolution AssetFromPreparedIntention(in GetOwnedEmotesFromRealmIntention intention) => + new (intention.Result, intention.TotalAmount); + + protected override URLAddress BuildUrlFromIntention(in GetOwnedEmotesFromRealmIntention intention) => + intention.CommonArguments.URL; + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadOwnedEmotesSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadOwnedEmotesSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadOwnedEmotesSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadOwnedEmotesSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadSceneEmotesSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadSceneEmotesSystem.cs new file mode 100644 index 0000000000..134e648bbf --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadSceneEmotesSystem.cs @@ -0,0 +1,366 @@ +using Arch.Core; +using Arch.System; +using Arch.SystemGroups; +using Arch.SystemGroups.DefaultSystemGroups; +using AssetManagement; +using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.AvatarRendering.Wearables.Helpers; +using DCL.Diagnostics; +using DCL.SDKComponents.AudioSources; +using ECS; +using ECS.Abstract; +using ECS.Prioritization.Components; +using ECS.StreamableLoading.AssetBundles; +using ECS.StreamableLoading.Common.Components; +using SceneRunner.Scene; +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Pool; +using Utility; +using StreamableResult = ECS.StreamableLoading.Common.Components.StreamableLoadingResult; +using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; +using EmotesFromRealmPromise = ECS.StreamableLoading.Common.AssetPromise; +using AudioPromise = ECS.StreamableLoading.Common.AssetPromise; + +namespace DCL.AvatarRendering.Emotes.Load +{ + [UpdateInGroup(typeof(PresentationSystemGroup))] + [LogCategory(ReportCategory.EMOTE)] + public partial class LoadSceneEmotesSystem : BaseUnityLoopSystem + { + private readonly URLSubdirectory customStreamingSubdirectory; + private readonly IEmoteStorage emoteStorage; + private readonly IRealmData realmData; + private readonly URLBuilder urlBuilder; + + public LoadSceneEmotesSystem( + World world, + IEmoteStorage emoteStorage, + IRealmData realmData, + URLSubdirectory customStreamingSubdirectory + ) + : base(world) + { + this.emoteStorage = emoteStorage; + this.customStreamingSubdirectory = customStreamingSubdirectory; + this.realmData = realmData; + urlBuilder = new URLBuilder(); + } + + protected override void Update(float t) + { + GetEmotesFromRealmQuery(World, t); + GetEmotesByPointersQuery(World, t); + } + + [Query] + [None(typeof(StreamableResult))] + private void GetEmotesFromRealm([Data] float dt, in Entity entity, + ref GetSceneEmoteFromRealmIntention intention, + ref IPartitionComponent partitionComponent) + { + if (intention.TryCancelByRequest( + World!, + GetReportCategory(), + entity, + static i => $"Scene emote request cancelled {i.EmoteHash}")) + return; + + URN urn = intention.NewSceneEmoteURN(); + + if (intention.Timeout.IsTimeout(dt)) + { + if (!World.Has(entity)) + { + ReportHub.LogWarning(GetReportCategory(), $"Loading scenes emotes timed out {urn}"); + World.Add(entity, new StreamableResult(GetReportCategory(), new TimeoutException($"Scene emote timeout {urn}"))); + } + + return; + } + + if (!emoteStorage.TryGetElement(urn, out IEmote emote)) + { + var dto = new EmoteDTO + { + id = urn, + metadata = new EmoteDTO.Metadata + { + id = urn, + emoteDataADR74 = new EmoteDTO.Metadata.Data + { + loop = intention.Loop, + category = "emote", + hides = Array.Empty(), + replaces = Array.Empty(), + tags = Array.Empty(), + removesDefaultHiding = Array.Empty(), + representations = new AvatarAttachmentDTO.Representation[] + { + new () + { + contents = Array.Empty(), + bodyShapes = new[] + { + BodyShape.MALE.Value, + BodyShape.FEMALE.Value, + }, + overrideHides = Array.Empty(), + overrideReplaces = Array.Empty(), + mainFile = "", + }, + }, + }, + }, + }; + + emote = emoteStorage.GetOrAddByDTO(dto); + } + + if (emote.IsLoading) return; + if (CreateAssetBundlePromiseIfRequired(emote, in intention, partitionComponent)) return; + + if (emote.AssetResults[intention.BodyShape] != null && !intention.IsAssetBundleProcessed) + { + // TODO: it may occur that the requested emote does not support the body shape + // If that is the case, the promise will never be resolved + intention.IsAssetBundleProcessed = true; + + if (emote.AssetResults[intention.BodyShape] is { Succeeded: true }) + { + // We need to add a reference here, so it is not lost if the flow interrupts in between (i.e. before creating instances of CachedWearable) + emote.AssetResults[intention.BodyShape]?.Asset!.AddReference(); + } + } + + if (!intention.IsAssetBundleProcessed) return; + + World.Add(entity, new StreamableResult(new EmotesResolution(RepoolableList.FromElement(emote), 1))); + } + + private bool CreateAssetBundlePromiseIfRequired(IEmote emote, in GetSceneEmoteFromRealmIntention intention, IPartitionComponent partitionComponent) + { + if (emote.AssetResults[intention.BodyShape] != null) return false; + + // The resolution of the AB promise will be finalized by FinalizeEmoteAssetBundleSystem + var promise = AssetBundlePromise.Create(World, + GetAssetBundleIntention.FromHash(typeof(GameObject), + intention.EmoteHash + PlatformUtils.GetCurrentPlatform(), + permittedSources: intention.PermittedSources, + customEmbeddedSubDirectory: customStreamingSubdirectory, + cancellationTokenSource: intention.CancellationTokenSource, + manifest: intention.AssetBundleManifest), + partitionComponent); + + emote.UpdateLoadingStatus(true); + World.Create(promise, emote, intention.BodyShape); + + return true; + } + + [Query] + [None(typeof(StreamableResult))] + private void GetEmotesByPointers([Data] float dt, in Entity entity, + ref GetEmotesByPointersIntention intention, + ref IPartitionComponent partitionComponent) + { + if (intention.TryCancelByRequest( + World!, + GetReportCategory(), + entity, + static _ => "Pointer request cancelled")) + return; + + if (TryCancelByTimeout(entity, ref intention, dt)) return; + + using var _ = ListPool.Get(out var missingPointersTmp)!; + var resolvedEmotesTmp = RepoolableList.NewList(); + + HandlePointers(in intention, missingPointersTmp!, resolvedEmotesTmp); + if (TryCancelByMissingPointers(missingPointersTmp!, partitionComponent, intention.BodyShape)) return; + HandleResolvedEmotes(in intention, partitionComponent, resolvedEmotesTmp.List, out bool success); + if (success) World!.Add(entity, NewEmotesResult(resolvedEmotesTmp, intention.Pointers.Count)); + } + + private static StreamableResult NewEmotesResult(RepoolableList resolvedEmotesTmp, int pointersCount) => + new (new EmotesResolution(resolvedEmotesTmp, pointersCount)); + + private void HandleResolvedEmotes( + in GetEmotesByPointersIntention intention, + IPartitionComponent partitionComponent, + IEnumerable resolvedEmotes, + out bool success + ) + { + var emotesWithResponse = 0; + + foreach (IEmote emote in resolvedEmotes) + { + if (emote.ManifestResult is { Exception: not null }) + emotesWithResponse++; + + if (emote.IsLoading) continue; + if (CreateAssetBundlePromiseIfRequired(emote, in intention, partitionComponent)) continue; + + if (emote.AssetResults[intention.BodyShape] != null) + + // TODO: it may occur that the requested emote does not support the body shape + // If that is the case, the promise will never be resolved + emotesWithResponse++; + + if (emote.AssetResults[intention.BodyShape] is { Succeeded: true }) + + // Reference must be added only once when the wearable is resolved + if (!intention.SuccessfulPointers.Contains(emote.GetUrn())) + { + intention.SuccessfulPointers.Add(emote.GetUrn()); + + // We need to add a reference here, so it is not lost if the flow interrupts in between (i.e. before creating instances of CachedWearable) + emote.AssetResults[intention.BodyShape]?.Asset?.AddReference(); + } + } + + success = emotesWithResponse == intention.Pointers.Count; + } + + private bool TryCancelByMissingPointers(ICollection missingPointersTmp, IPartitionComponent partitionComponent, BodyShape forBodyShape) + { + if (missingPointersTmp.Count > 0) + { + var promise = EmotesFromRealmPromise.Create( + World!, + new GetEmotesByPointersFromRealmIntention(missingPointersTmp.ToList(), + new CommonLoadingArguments(realmData.Ipfs.EntitiesActiveEndpoint) + ), + partitionComponent + ); + + World!.Create(promise, forBodyShape, partitionComponent); + return true; + } + + return false; + } + + private void HandlePointers( + in GetEmotesByPointersIntention intention, + ICollection mutMissingPointersTmp, + RepoolableList mutResolvedEmotesTmp + ) + { + foreach (URN loadingIntentionPointer in intention.Pointers) + { + if (loadingIntentionPointer.IsNullOrEmpty()) + { + ReportHub.LogError( + GetReportCategory(), + "ResolveWearableByPointerSystem: Null pointer found in the list of pointers" + ); + + continue; + } + + URN shortenedPointer = loadingIntentionPointer.Shorten(); + + if (!emoteStorage.TryGetElement(shortenedPointer, out IEmote emote)) + { + if (!intention.ProcessedPointers.Contains(loadingIntentionPointer)) + { + mutMissingPointersTmp.Add(shortenedPointer); + intention.ProcessedPointers.Add(loadingIntentionPointer); + } + + continue; + } + + if (emote.Model.Succeeded) + mutResolvedEmotesTmp.List.Add(emote); + } + } + + private bool TryCancelByTimeout(Entity entity, ref GetEmotesByPointersIntention intention, float dt) + { + if (intention.Timeout.IsTimeout(dt)) + { + if (World!.Has(entity) == false) + { + var pointersStrLog = string.Join(",", intention.Pointers); + ReportHub.LogWarning(GetReportCategory(), $"Loading emotes timed out, {pointersStrLog}"); + World.Add(entity, new StreamableResult(GetReportCategory(), new TimeoutException($"Emote intention timeout {pointersStrLog}"))); + } + + return true; + } + + return false; + } + + private bool CreateAssetBundlePromiseIfRequired(IEmote component, in GetEmotesByPointersIntention intention, IPartitionComponent partitionComponent) + { + // Manifest is required for Web loading only + if (component.ManifestResult == null + && EnumUtils.HasFlag(intention.PermittedSources, AssetSource.WEB) + + // Skip processing manifest for embedded emotes which do not start with 'urn' + && component.GetUrn().IsValid()) + + // The resolution of the AB promise will be finalized by FinalizeEmoteAssetBundleSystem + return component.CreateAssetBundleManifestPromise(World!, intention.BodyShape, intention.CancellationTokenSource, partitionComponent); + + if (!component.TryGetMainFileHash(intention.BodyShape, out string? hash)) + return false; + + if (component.AssetResults[intention.BodyShape] == null) + { + SceneAssetBundleManifest? manifest = !EnumUtils.HasFlag(intention.PermittedSources, AssetSource.WEB) ? null : component.ManifestResult?.Asset; + + // The resolution of the AB promise will be finalized by FinalizeEmoteAssetBundleSystem + var promise = AssetBundlePromise.Create( + World!, + GetAssetBundleIntention.FromHash( + typeof(GameObject), + hash! + PlatformUtils.GetCurrentPlatform(), + permittedSources: intention.PermittedSources, + customEmbeddedSubDirectory: customStreamingSubdirectory, + manifest: manifest, + cancellationTokenSource: intention.CancellationTokenSource + ), + partitionComponent + ); + + TryCreateAudioClipPromises(component, intention.BodyShape, partitionComponent); + + component.UpdateLoadingStatus(true); + World!.Create(promise, component, intention.BodyShape); + return true; + } + + return false; + } + + private void TryCreateAudioClipPromises(IEmote component, BodyShape bodyShape, IPartitionComponent partitionComponent) + { + AvatarAttachmentDTO.Content[]? content = component.Model.Asset!.content; + + foreach (AvatarAttachmentDTO.Content item in content ?? Array.Empty()) + { + var audioType = item.file.ToAudioType(); + + if (audioType == AudioType.UNKNOWN) + continue; + + urlBuilder.Clear(); + urlBuilder.AppendDomain(realmData.Ipfs.ContentBaseUrl).AppendPath(new URLPath(item.hash)); + URLAddress url = urlBuilder.Build(); + + // The resolution of the audio promise will be finalized by FinalizeEmoteAssetBundleSystem + AudioPromise promise = AudioUtils.CreateAudioClipPromise(World!, url.Value, audioType, partitionComponent); + World!.Create(promise, component, bodyShape); + } + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadSceneEmotesSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadSceneEmotesSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadSceneEmotesSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Load/LoadSceneEmotesSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadEmotesByPointersSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadEmotesByPointersSystem.cs deleted file mode 100644 index 27d3ec93c0..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadEmotesByPointersSystem.cs +++ /dev/null @@ -1,344 +0,0 @@ -using Arch.Core; -using Arch.System; -using Arch.SystemGroups; -using Arch.SystemGroups.DefaultSystemGroups; -using AssetManagement; -using CommunicationData.URLHelpers; -using Cysharp.Threading.Tasks; -using DCL.AvatarRendering.Wearables; -using DCL.AvatarRendering.Wearables.Helpers; -using DCL.AvatarRendering.Wearables.Systems; -using DCL.Diagnostics; -using DCL.Optimization.PerformanceBudgeting; -using DCL.Optimization.Pools; -using DCL.Optimization.ThreadSafePool; -using DCL.SDKComponents.AudioSources; -using DCL.WebRequests; -using ECS; -using ECS.Prioritization.Components; -using ECS.StreamableLoading.AssetBundles; -using ECS.StreamableLoading.Cache; -using ECS.StreamableLoading.Common; -using ECS.StreamableLoading.Common.Components; -using ECS.StreamableLoading.Common.Systems; -using SceneRunner.Scene; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using UnityEngine; -using UnityEngine.Pool; -using Utility; -using StreamableResult = ECS.StreamableLoading.Common.Components.StreamableLoadingResult; -using EmotesFromRealmPromise = ECS.StreamableLoading.Common.AssetPromise; -using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; -using AudioPromise = ECS.StreamableLoading.Common.AssetPromise; - -namespace DCL.AvatarRendering.Emotes -{ - /// - /// TODO this system should be generalized with - /// - [UpdateInGroup(typeof(PresentationSystemGroup))] - [LogCategory(ReportCategory.EMOTE)] - public partial class LoadEmotesByPointersSystem : LoadSystemBase - { - // When the number of wearables to request is greater than MAX_WEARABLES_PER_REQUEST, we split the request into several smaller ones. - // In this way we avoid to send a very long url string that would fail due to the web request size limitations. - private const int MAX_WEARABLES_PER_REQUEST = 200; - - private static readonly ThreadSafeListPool DTO_POOL = new (MAX_WEARABLES_PER_REQUEST, 50); - - private readonly StringBuilder bodyBuilder = new (); - private readonly URLSubdirectory customStreamingSubdirectory; - private readonly IWebRequestController webRequestController; - private readonly IEmoteCache emoteCache; - private readonly IRealmData realmData; - private readonly URLBuilder urlBuilder; - - public LoadEmotesByPointersSystem(World world, - IWebRequestController webRequestController, - IStreamableCache cache, - IEmoteCache emoteCache, - IRealmData realmData, - URLSubdirectory customStreamingSubdirectory) - : base(world, cache) - { - this.webRequestController = webRequestController; - this.emoteCache = emoteCache; - this.realmData = realmData; - this.customStreamingSubdirectory = customStreamingSubdirectory; - urlBuilder = new URLBuilder(); - } - - protected override void Update(float t) - { - base.Update(t); - - GetEmotesFromRealmQuery(World, t); - FinalizeEmoteDTOQuery(World); - } - - protected override async UniTask> FlowInternalAsync( - GetEmotesByPointersFromRealmIntention intention, IAcquiredBudget acquiredBudget, - IPartitionComponent partition, CancellationToken ct) - { - var finalTargetList = new List(); - - int numberOfPartialRequests = (intention.Pointers.Count + MAX_WEARABLES_PER_REQUEST - 1) / MAX_WEARABLES_PER_REQUEST; - - var pointer = 0; - - for (var i = 0; i < numberOfPartialRequests; i++) - { - int numberOfWearablesToRequest = Mathf.Min(intention.Pointers.Count - pointer, MAX_WEARABLES_PER_REQUEST); - - await DoPartialRequestAsync(intention.CommonArguments.URL, intention.Pointers, - pointer, pointer + numberOfWearablesToRequest, finalTargetList, ct); - - pointer += numberOfWearablesToRequest; - } - - return new StreamableLoadingResult(new EmotesDTOList(finalTargetList)); - } - - private async UniTask DoPartialRequestAsync(URLAddress url, - IReadOnlyList wearablesToRequest, int startIndex, int endIndex, List results, CancellationToken ct) - { - await UniTask.SwitchToMainThread(); - - bodyBuilder.Clear(); - bodyBuilder.Append("{\"pointers\":["); - - for (int i = startIndex; i < endIndex; ++i) - { - // String Builder has overloads for int to prevent allocations - bodyBuilder.Append('\"'); - bodyBuilder.Append(wearablesToRequest[i]); - bodyBuilder.Append('\"'); - - if (i != wearablesToRequest.Count - 1) - bodyBuilder.Append(","); - } - - bodyBuilder.Append("]}"); - - using PoolExtensions.Scope> dtoPooledList = DTO_POOL.AutoScope(); - - await webRequestController.PostAsync(new CommonArguments(url), GenericPostArguments.CreateJson(bodyBuilder.ToString()), ct) - .OverwriteFromJsonAsync(dtoPooledList.Value, WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool); - - lock (results) { results.AddRange(dtoPooledList.Value); } - } - - [Query] - [None(typeof(StreamableResult))] - private void GetEmotesFromRealm([Data] float dt, in Entity entity, - ref GetEmotesByPointersIntention intention, - ref IPartitionComponent partitionComponent) - { - if (intention.CancellationTokenSource.IsCancellationRequested) - { - if (!World.Has(entity)) - World.Add(entity, new StreamableResult(new OperationCanceledException("Pointer request cancelled"))); - - return; - } - - intention.ElapsedTime += dt; - - bool isTimeout = intention.ElapsedTime >= intention.Timeout; - - if (isTimeout) - { - if (!World.Has(entity)) - { - var pointersStrLog = string.Join(",", intention.Pointers); - ReportHub.LogWarning(GetReportCategory(), $"Loading emotes timed out, {pointersStrLog}"); - World.Add(entity, new StreamableResult(new TimeoutException($"Emote intention timeout {pointersStrLog}"))); - } - - return; - } - - List missingPointersTmp = ListPool.Get(); - List resolvedEmotesTmp = ListPool.Get(); - - foreach (URN loadingIntentionPointer in intention.Pointers) - { - if (loadingIntentionPointer.IsNullOrEmpty()) - { - ReportHub.LogError( - GetReportCategory(), - "ResolveWearableByPointerSystem: Null pointer found in the list of pointers" - ); - - continue; - } - - URN shortenedPointer = loadingIntentionPointer; - shortenedPointer = shortenedPointer.Shorten(); - - if (!emoteCache.TryGetEmote(shortenedPointer, out IEmote emote)) - { - if (!intention.ProcessedPointers.Contains(loadingIntentionPointer)) - { - missingPointersTmp.Add(shortenedPointer); - intention.ProcessedPointers.Add(loadingIntentionPointer); - } - - continue; - } - - if (emote.Model.Succeeded) - resolvedEmotesTmp.Add(emote); - } - - if (missingPointersTmp.Count > 0) - { - var promise = EmotesFromRealmPromise.Create(World, new GetEmotesByPointersFromRealmIntention(missingPointersTmp.ToList(), - new CommonLoadingArguments(realmData.Ipfs.EntitiesActiveEndpoint)), - partitionComponent); - - World.Create(promise, intention.BodyShape, partitionComponent); - - ListPool.Release(missingPointersTmp); - ListPool.Release(resolvedEmotesTmp); - - return; - } - - var emotesWithResponse = 0; - - foreach (IEmote emote in resolvedEmotesTmp) - { - if (emote.ManifestResult is { Exception: not null }) - emotesWithResponse++; - - if (emote.IsLoading) continue; - if (CreateAssetBundlePromiseIfRequired(emote, in intention, partitionComponent)) continue; - - if (emote.AssetResults[intention.BodyShape] != null) - - // TODO: it may occur that the requested emote does not support the body shape - // If that is the case, the promise will never be resolved - emotesWithResponse++; - - if (emote.AssetResults[intention.BodyShape] is { Succeeded: true }) - { - // Reference must be added only once when the wearable is resolved - if (!intention.SuccessfulPointers.Contains(emote.GetUrn())) - { - intention.SuccessfulPointers.Add(emote.GetUrn()); - - // We need to add a reference here, so it is not lost if the flow interrupts in between (i.e. before creating instances of CachedWearable) - emote.AssetResults[intention.BodyShape]?.Asset.AddReference(); - } - } - } - - bool isSucceeded = emotesWithResponse == intention.Pointers.Count; - - if (isSucceeded) - World.Add(entity, new StreamableResult(new EmotesResolution(resolvedEmotesTmp.ToList(), intention.Pointers.Count))); - - ListPool.Release(missingPointersTmp); - ListPool.Release(resolvedEmotesTmp); - } - - [Query] - private void FinalizeEmoteDTO(in Entity entity, - ref AssetPromise promise) - { - if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested) - { - promise.ForgetLoading(World); - World.Destroy(entity); - return; - } - - if (promise.SafeTryConsume(World, out StreamableLoadingResult promiseResult)) - { - if (!promiseResult.Succeeded) - { - foreach (string pointerID in promise.LoadingIntention.Pointers) - if (emoteCache.TryGetEmote(pointerID, out IEmote component)) - component.IsLoading = false; - } - else - { - foreach (EmoteDTO assetEntity in promiseResult.Asset.Value) - { - IEmote component = emoteCache.GetOrAddEmoteByDTO(assetEntity); - component.Model = new StreamableLoadingResult(assetEntity); - component.IsLoading = false; - } - } - - World.Destroy(entity); - } - } - - private bool CreateAssetBundlePromiseIfRequired(IEmote component, in GetEmotesByPointersIntention intention, IPartitionComponent partitionComponent) - { - // Manifest is required for Web loading only - if (component.ManifestResult == null - && EnumUtils.HasFlag(intention.PermittedSources, AssetSource.WEB) - - // Skip processing manifest for embedded emotes which do not start with 'urn' - && component.GetUrn().IsValid()) - { - // The resolution of the AB promise will be finalized by FinalizeEmoteAssetBundleSystem - return component.CreateAssetBundleManifestPromise(World, intention.BodyShape, intention.CancellationTokenSource, partitionComponent); - } - - if (!component.TryGetMainFileHash(intention.BodyShape, out string? hash)) - return false; - - if (component.AssetResults[intention.BodyShape] == null) - { - SceneAssetBundleManifest? manifest = !EnumUtils.HasFlag(intention.PermittedSources, AssetSource.WEB) ? null : component.ManifestResult?.Asset; - - // The resolution of the AB promise will be finalized by FinalizeEmoteAssetBundleSystem - var promise = AssetBundlePromise.Create(World, - GetAssetBundleIntention.FromHash(typeof(GameObject), - hash! + PlatformUtils.GetPlatform(), - permittedSources: intention.PermittedSources, - customEmbeddedSubDirectory: customStreamingSubdirectory, - manifest: manifest, cancellationTokenSource: intention.CancellationTokenSource), - partitionComponent); - - TryCreateAudioClipPromise(component, intention.BodyShape, partitionComponent); - - component.IsLoading = true; - World.Create(promise, component, intention.BodyShape); - return true; - } - - return false; - } - - private void TryCreateAudioClipPromise(IEmote component, BodyShape bodyShape, IPartitionComponent partitionComponent) - { - AvatarAttachmentDTO.Content[]? content = component.Model.Asset!.content; - - foreach (AvatarAttachmentDTO.Content item in content) - { - var audioType = item.file.ToAudioType(); - - if (audioType == AudioType.UNKNOWN) - continue; - - urlBuilder.Clear(); - urlBuilder.AppendDomain(realmData.Ipfs.ContentBaseUrl).AppendPath(new URLPath(item.hash)); - URLAddress url = urlBuilder.Build(); - - // The resolution of the audio promise will be finalized by FinalizeEmoteAssetBundleSystem - AudioPromise promise = AudioUtils.CreateAudioClipPromise(World, url.Value, audioType, partitionComponent); - World.Create(promise, component, bodyShape); - } - } - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadOwnedEmotesSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadOwnedEmotesSystem.cs deleted file mode 100644 index 96c4b9632d..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadOwnedEmotesSystem.cs +++ /dev/null @@ -1,83 +0,0 @@ -using Arch.Core; -using Arch.SystemGroups; -using Arch.SystemGroups.DefaultSystemGroups; -using Cysharp.Threading.Tasks; -using DCL.AvatarRendering.Wearables.Components; -using DCL.Diagnostics; -using DCL.Optimization.PerformanceBudgeting; -using DCL.WebRequests; -using ECS; -using ECS.Prioritization.Components; -using ECS.StreamableLoading.Cache; -using ECS.StreamableLoading.Common.Components; -using ECS.StreamableLoading.Common.Systems; -using System; -using System.Threading; - -namespace DCL.AvatarRendering.Emotes -{ - [UpdateInGroup(typeof(PresentationSystemGroup))] - [LogCategory(ReportCategory.EMOTE)] - public partial class LoadOwnedEmotesSystem : LoadSystemBase - { - private readonly IRealmData realmData; - private readonly IEmoteCache emoteCache; - private readonly IWebRequestController webRequestController; - - public LoadOwnedEmotesSystem( - World world, - IRealmData realmData, - IWebRequestController webRequestController, - IStreamableCache cache, - IEmoteCache emoteCache) - : base(world, cache) - { - this.realmData = realmData; - this.emoteCache = emoteCache; - this.webRequestController = webRequestController; - } - - protected override async UniTask> FlowInternalAsync(GetOwnedEmotesFromRealmIntention intention, - IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) - { - LambdaOwnedEmoteElementList lambdaResponse = - await webRequestController.GetAsync(new CommonArguments(intention.CommonArguments.URL, attemptsCount: intention.CommonArguments.Attempts), - ct, GetReportCategory()) - .CreateFromJson(WRJsonParser.Unity); - - // The following logic is not thread-safe! - // TODO make it thread-safe: cache and CreateWearableThumbnailPromise - - if (lambdaResponse.elements.Count == 0) - return new StreamableLoadingResult(new EmotesResolution(Array.Empty(), lambdaResponse.totalAmount)); - - var emotes = new IEmote[lambdaResponse.elements.Count]; - - for (var i = 0; i < lambdaResponse.elements.Count; i++) - { - LambdaOwnedEmoteElementDTO element = lambdaResponse.elements[i]; - EmoteDTO emoteDto = element.entity; - - IEmote emote = emoteCache.GetOrAddEmoteByDTO(emoteDto); - - foreach (LambdaOwnedEmoteElementDTO.IndividualDataDTO individualData in element.individualData) - { - // Probably a base emote, wrongly return individual data. Skip it - if (emoteDto.metadata.id == individualData.id) continue; - - long.TryParse(individualData.transferredAt, out long transferredAt); - decimal.TryParse(individualData.price, out decimal price); - - emoteCache.SetOwnedNft(emoteDto.metadata.id, - new NftBlockchainOperationEntry(individualData.id, - individualData.tokenId, - DateTimeOffset.FromUnixTimeSeconds(transferredAt).DateTime, - price)); - } - emotes[i] = emote; - } - - return new StreamableLoadingResult(new EmotesResolution(emotes, lambdaResponse.totalAmount)); - } - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadSceneEmotesSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadSceneEmotesSystem.cs deleted file mode 100644 index 9965350154..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/LoadSceneEmotesSystem.cs +++ /dev/null @@ -1,155 +0,0 @@ -using Arch.Core; -using Arch.System; -using Arch.SystemGroups; -using Arch.SystemGroups.DefaultSystemGroups; -using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables; -using DCL.Diagnostics; -using ECS.Abstract; -using ECS.Prioritization.Components; -using ECS.StreamableLoading.AssetBundles; -using System; -using UnityEngine; -using Utility; -using StreamableResult = ECS.StreamableLoading.Common.Components.StreamableLoadingResult; -using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; - -namespace DCL.AvatarRendering.Emotes -{ - [UpdateInGroup(typeof(PresentationSystemGroup))] - [LogCategory(ReportCategory.EMOTE)] - public partial class LoadSceneEmotesSystem : BaseUnityLoopSystem - { - private const string SCENE_EMOTE_PREFIX = "urn:decentraland:off-chain:scene-emote"; - - private readonly URLSubdirectory customStreamingSubdirectory; - private readonly IEmoteCache emoteCache; - - public LoadSceneEmotesSystem(World world, - IEmoteCache emoteCache, - URLSubdirectory customStreamingSubdirectory) - : base(world) - { - this.emoteCache = emoteCache; - this.customStreamingSubdirectory = customStreamingSubdirectory; - } - - protected override void Update(float t) - { - GetEmotesFromRealmQuery(World, t); - } - - [Query] - [None(typeof(StreamableResult))] - private void GetEmotesFromRealm([Data] float dt, in Entity entity, - ref GetSceneEmoteFromRealmIntention intention, - ref IPartitionComponent partitionComponent) - { - if (intention.CancellationTokenSource.IsCancellationRequested) - { - if (!World.Has(entity)) - World.Add(entity, new StreamableResult(new OperationCanceledException($"Scene emote request cancelled {intention.EmoteHash}"))); - - return; - } - - intention.ElapsedTime += dt; - - URN urn = GetUrn(intention.SceneId, intention.EmoteHash, intention.Loop); - - bool isTimeout = intention.ElapsedTime >= intention.Timeout; - - if (isTimeout) - { - if (!World.Has(entity)) - { - ReportHub.LogWarning(GetReportCategory(), $"Loading scenes emotes timed out {urn}"); - World.Add(entity, new StreamableResult(new TimeoutException($"Scene emote timeout {urn}"))); - } - - return; - } - - if (!emoteCache.TryGetEmote(urn, out IEmote emote)) - { - var dto = new EmoteDTO - { - id = urn, - metadata = new EmoteDTO.Metadata - { - id = urn, - emoteDataADR74 = new EmoteDTO.Metadata.Data - { - loop = intention.Loop, - category = "emote", - hides = Array.Empty(), - replaces = Array.Empty(), - tags = Array.Empty(), - removesDefaultHiding = Array.Empty(), - representations = new AvatarAttachmentDTO.Representation[] - { - new () - { - contents = Array.Empty(), - bodyShapes = new[] - { - BodyShape.MALE.Value, - BodyShape.FEMALE.Value, - }, - overrideHides = Array.Empty(), - overrideReplaces = Array.Empty(), - mainFile = "", - }, - }, - }, - }, - }; - - emote = emoteCache.GetOrAddEmoteByDTO(dto); - } - - if (emote.IsLoading) return; - if (CreateAssetBundlePromiseIfRequired(emote, in intention, partitionComponent)) return; - - if (emote.AssetResults[intention.BodyShape] != null && !intention.IsAssetBundleProcessed) - { - // TODO: it may occur that the requested emote does not support the body shape - // If that is the case, the promise will never be resolved - intention.IsAssetBundleProcessed = true; - - if (emote.AssetResults[intention.BodyShape] is { Succeeded: true }) - { - // We need to add a reference here, so it is not lost if the flow interrupts in between (i.e. before creating instances of CachedWearable) - emote.AssetResults[intention.BodyShape]?.Asset!.AddReference(); - } - } - - if (!intention.IsAssetBundleProcessed) return; - - World.Add(entity, new StreamableResult(new EmotesResolution(new[] { emote }, 1))); - } - - private bool CreateAssetBundlePromiseIfRequired(IEmote emote, in GetSceneEmoteFromRealmIntention intention, IPartitionComponent partitionComponent) - { - if (emote.AssetResults[intention.BodyShape] != null) return false; - - // The resolution of the AB promise will be finalized by FinalizeEmoteAssetBundleSystem - var promise = AssetBundlePromise.Create(World, - GetAssetBundleIntention.FromHash(typeof(GameObject), - intention.EmoteHash + PlatformUtils.GetPlatform(), - permittedSources: intention.PermittedSources, - customEmbeddedSubDirectory: customStreamingSubdirectory, - cancellationTokenSource: intention.CancellationTokenSource, - manifest: intention.AssetBundleManifest), - partitionComponent); - - emote.IsLoading = true; - World.Create(promise, emote, intention.BodyShape); - - return true; - } - - private static URN GetUrn(string sceneId, string emoteHash, bool loop) => - new ($"{SCENE_EMOTE_PREFIX}:{sceneId}-{emoteHash}-{loop.ToString().ToLower()}"); - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play.meta new file mode 100644 index 0000000000..f97925ce2c --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0317971b9f6c47de9eb85551647b8729 +timeCreated: 1724253797 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/CharacterEmoteSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/CharacterEmoteSystem.cs similarity index 89% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/CharacterEmoteSystem.cs rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/CharacterEmoteSystem.cs index b63bbb4f58..ea3cbef42d 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/CharacterEmoteSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/CharacterEmoteSystem.cs @@ -3,10 +3,11 @@ using Arch.SystemGroups; using Arch.SystemGroups.DefaultSystemGroups; using CommunicationData.URLHelpers; -using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.AvatarShape; +using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.AvatarShape.UnityInterface; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.Character.CharacterMotion.Components; using DCL.Character.Components; @@ -24,7 +25,7 @@ using System.Runtime.CompilerServices; using UnityEngine; -namespace DCL.AvatarRendering.Emotes +namespace DCL.AvatarRendering.Emotes.Play { [LogCategory(ReportCategory.EMOTE)] [UpdateInGroup(typeof(PresentationSystemGroup))] @@ -37,14 +38,14 @@ public partial class CharacterEmoteSystem : BaseUnityLoopSystem // todo: use this to add nice Debug UI to trigger any emote? private readonly IDebugContainerBuilder debugContainerBuilder; - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; private readonly EmotePlayer emotePlayer; private readonly IEmotesMessageBus messageBus; - public CharacterEmoteSystem(World world, IEmoteCache emoteCache, IEmotesMessageBus messageBus, AudioSource audioSource, IDebugContainerBuilder debugContainerBuilder) : base(world) + public CharacterEmoteSystem(World world, IEmoteStorage emoteStorage, IEmotesMessageBus messageBus, AudioSource audioSource, IDebugContainerBuilder debugContainerBuilder) : base(world) { this.messageBus = messageBus; - this.emoteCache = emoteCache; + this.emoteStorage = emoteStorage; this.debugContainerBuilder = debugContainerBuilder; emotePlayer = new EmotePlayer(audioSource); } @@ -160,24 +161,24 @@ private void ConsumeEmoteIntent(Entity entity, ref CharacterEmoteComponent emote if (avatarView.GetAnimatorFloat(AnimationHashes.MOVEMENT_BLEND) > 0.1f) return; - if (emoteCache.TryGetEmote(emoteId.Shorten(), out IEmote emote)) + if (emoteStorage.TryGetElement(emoteId.Shorten(), out IEmote emote)) { // emote failed to load? remove intent if (emote.ManifestResult is { IsInitialized: true, Succeeded: false }) { - ReportHub.LogError(GetReportCategory(), $"Cant play emote {emoteId} since it failed loading \n {emote.ManifestResult}"); + ReportHub.LogError(GetReportData(), $"Cant play emote {emoteId} since it failed loading \n {emote.ManifestResult}"); World.Remove(entity); return; } BodyShape bodyShape = avatarShapeComponent.BodyShape; - StreamableLoadingResult? streamableAsset = emote.AssetResults[bodyShape]; + StreamableLoadingResult? streamableAsset = emote.AssetResults[bodyShape]; // the emote is still loading? dont remove the intent yet, wait for it if (streamableAsset == null) return; - StreamableLoadingResult streamableAssetValue = streamableAsset.Value; + StreamableLoadingResult streamableAssetValue = streamableAsset.Value; GameObject? mainAsset; if (streamableAssetValue is { Succeeded: false } || (mainAsset = streamableAssetValue.Asset?.MainAsset) == null) @@ -191,13 +192,13 @@ private void ConsumeEmoteIntent(Entity entity, ref CharacterEmoteComponent emote AudioClip? audioClip = audioAssetResult?.Asset; if (!emotePlayer.Play(mainAsset, audioClip, emote.IsLooping(), emoteIntent.Spatial, in avatarView, ref emoteComponent)) - ReportHub.LogWarning(GetReportCategory(), $"Emote {emote.Model.Asset.metadata.name} cant be played, AB version: {emote.ManifestResult?.Asset?.GetVersion()} should be >= 16"); + ReportHub.LogWarning(GetReportData(), $"Emote {emote.Model.Asset.metadata.name} cant be played, AB version: {emote.ManifestResult?.Asset?.GetVersion()} should be >= 16"); emoteComponent.EmoteUrn = emoteId; World.Remove(entity); } } - catch (Exception e) { ReportHub.LogException(e, GetReportCategory()); } + catch (Exception e) { ReportHub.LogException(e, GetReportData()); } } // Every time the emote is looped we send a new message that should refresh the looping emotes on clients that didn't receive the initial message yet diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/CharacterEmoteSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/CharacterEmoteSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/CharacterEmoteSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/CharacterEmoteSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/EmotePlayer.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/EmotePlayer.cs similarity index 99% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/EmotePlayer.cs rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/EmotePlayer.cs index 72ef222fe6..820d3921d8 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/EmotePlayer.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/EmotePlayer.cs @@ -8,7 +8,7 @@ using UnityEngine.Pool; using Object = UnityEngine.Object; -namespace DCL.AvatarRendering.Emotes +namespace DCL.AvatarRendering.Emotes.Play { public class EmotePlayer { diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/EmotePlayer.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/EmotePlayer.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/EmotePlayer.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/EmotePlayer.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/RemoteEmotesSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/RemoteEmotesSystem.cs index 6e73e73f6a..4cfef3ba83 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/RemoteEmotesSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/RemoteEmotesSystem.cs @@ -1,13 +1,11 @@ using Arch.Core; using Arch.SystemGroups; using Arch.SystemGroups.DefaultSystemGroups; -using DCL.Diagnostics; using DCL.Multiplayer.Emotes; using DCL.Multiplayer.Profiles.Bunches; using DCL.Multiplayer.Profiles.Tables; using DCL.Web3.Identities; using ECS.Abstract; -using System.Collections.Generic; using UnityEngine.Pool; namespace DCL.AvatarRendering.Emotes @@ -30,16 +28,13 @@ internal RemoteEmotesSystem(World world, IWeb3IdentityCache identityCache, IRead protected override void Update(float t) { - HashSet savedIntentions = HashSetPool.Get(); + using var scope = HashSetPool.Get(out var savedIntentions); // this using cleans up the intention list using (OwnedBunch emoteIntentions = emotesMessageBus.EmoteIntentions()) { if (!emoteIntentions.Available()) - { - HashSetPool.Release(savedIntentions); return; - } foreach (RemoteEmoteIntention remoteEmoteIntention in emoteIntentions.Collection()) { @@ -48,21 +43,17 @@ protected override void Update(float t) // The entity was not created yet, so we wait until its created to be able to consume the intent if (entity == Entity.Null) { - savedIntentions.Add(remoteEmoteIntention); + savedIntentions!.Add(remoteEmoteIntention); continue; } - ref CharacterEmoteIntent intention = ref World.AddOrGet(entity); - intention.EmoteId = remoteEmoteIntention.EmoteId; - intention.Spatial = true; - intention.TriggerSource = TriggerSource.REMOTE; + ref CharacterEmoteIntent intention = ref World!.AddOrGet(entity); + intention.UpdateId(intention.EmoteId); } } - foreach (RemoteEmoteIntention savedIntention in savedIntentions) + foreach (RemoteEmoteIntention savedIntention in savedIntentions!) emotesMessageBus.SaveForRetry(savedIntention); - - HashSetPool.Release(savedIntentions); } private Entity EntityOrNull(string walletId) diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/UpdateEmoteInputSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/UpdateEmoteInputSystem.cs index ab870e2d16..afbf16e2f8 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/UpdateEmoteInputSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/UpdateEmoteInputSystem.cs @@ -9,6 +9,7 @@ using DCL.Input; using DCL.Multiplayer.Emotes; using DCL.Profiles; +using DCL.SDKComponents.InputModifier.Components; using ECS.Abstract; using MVC; using System; @@ -22,6 +23,7 @@ namespace DCL.AvatarRendering.Emotes [UpdateInGroup(typeof(InputGroup))] public partial class UpdateEmoteInputSystem : BaseUnityLoopSystem { + private const int AFTER_WHEEL_WAS_CLOSED_FRAMES_DELAY = 30; private readonly Dictionary actionNameById = new (); private readonly IEmotesMessageBus messageBus; private readonly IMVCManager mvcManager; @@ -32,7 +34,7 @@ public partial class UpdateEmoteInputSystem : BaseUnityLoopSystem private bool isWheelBlocked; private int framesAfterWheelWasClosed; - public UpdateEmoteInputSystem(World world, DCLInput dclInput, IEmotesMessageBus messageBus, + private UpdateEmoteInputSystem(World world, DCLInput dclInput, IEmotesMessageBus messageBus, IMVCManager mvcManager) : base(world) { shortcuts = dclInput.Shortcuts; @@ -42,7 +44,7 @@ public UpdateEmoteInputSystem(World world, DCLInput dclInput, IEmotesMessageBus this.mvcManager.OnViewClosed += OnEmoteWheelClosed; - GetReportCategory(); + GetReportData(); ListenToSlotsInput(emotesActions.Get()); } @@ -76,7 +78,7 @@ protected override void Update(float t) if (shortcuts.EmoteWheel.WasReleasedThisFrame() // Close and open actions conflicts each other since they are assigned to the same input key // we need to avoid opening it again after it has been recently closed - // We also have to consider race conditions so i see no other way than setting a delay + // We also have to consider race conditions, so I see no other way than setting a delay && framesAfterWheelWasClosed == 0) { if (!isWheelBlocked) @@ -100,8 +102,10 @@ private void TriggerEmoteBySlotIntent(in Entity entity, ref TriggerEmoteBySlotIn [Query] [All(typeof(PlayerComponent))] [None(typeof(CharacterEmoteIntent))] - private void TriggerEmote([Data] int emoteIndex, in Entity entity, in Profile profile) + private void TriggerEmote([Data] int emoteIndex, in Entity entity, in Profile profile, in InputModifierComponent inputModifier) { + if(inputModifier.DisableEmote) return; + IReadOnlyList emotes = profile.Avatar.Emotes; if (emoteIndex < 0 || emoteIndex >= emotes.Count) return; @@ -128,7 +132,7 @@ private void ListenToSlotsInput(InputActionMap inputActionMap) inputAction.started += OnSlotPerformed; actionNameById[actionName] = i; } - catch (Exception e) { ReportHub.LogException(e, new ReportData(GetReportCategory())); } + catch (Exception e) { ReportHub.LogException(e, GetReportData()); } } } @@ -151,7 +155,7 @@ private void OpenEmoteWheel() => private void OnEmoteWheelClosed(IController obj) { if (obj is not EmotesWheelController) return; - framesAfterWheelWasClosed = 30; + framesAfterWheelWasClosed = AFTER_WHEEL_WAS_CLOSED_FRAMES_DELAY; } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/csc.rsp b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/csc.rsp.meta b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/csc.rsp.meta new file mode 100644 index 0000000000..89ec76b6ae --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b8cf94e5d34844e78e86fe517a3bc201 +timeCreated: 1724253220 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Tests/EmoteShould.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Tests/EmoteShould.cs index 7fa995d54b..5bb2a6996e 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Tests/EmoteShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Tests/EmoteShould.cs @@ -17,10 +17,7 @@ public void BeOnChain(string urn) }, }; - Emote emote = new Emote - { - Model = new StreamableLoadingResult(model), - }; + Emote emote = new Emote(new StreamableLoadingResult(model)); Assert.IsTrue(emote.IsOnChain()); } @@ -37,10 +34,7 @@ public void BeOffChain(string urn) }, }; - Emote emote = new Emote - { - Model = new StreamableLoadingResult(model), - }; + Emote emote = new Emote(new StreamableLoadingResult(model)); Assert.IsFalse(emote.IsOnChain()); } diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading.meta b/Explorer/Assets/DCL/AvatarRendering/Loading.meta new file mode 100644 index 0000000000..f4895a99ac --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e8ad7769bbab40639ddb238ce8f4ec8d +timeCreated: 1724222987 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Assets.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets.meta new file mode 100644 index 0000000000..5d8f0da219 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a841b961a3fb44ae9c51dac52fc8d0c5 +timeCreated: 1724256128 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetBase.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetBase.cs similarity index 81% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetBase.cs rename to Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetBase.cs index a932369e90..6a5e32caa8 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetBase.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetBase.cs @@ -1,23 +1,22 @@ using DCL.Optimization.Pools; using DCL.Profiling; using ECS.StreamableLoading.AssetBundles; -using JetBrains.Annotations; using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.Assertions; using Utility.Primitives; -namespace DCL.AvatarRendering.Wearables.Helpers +namespace DCL.AvatarRendering.Loading.Assets { /// /// Facial feature is represented by the main texture and the optional mask /// - public class WearableTextureAsset : WearableAssetBase + public class AttachmentTextureAsset : AttachmentAssetBase { public readonly Texture Texture; - public WearableTextureAsset(Texture texture, AssetBundleData assetBundleData) : base(assetBundleData) + public AttachmentTextureAsset(Texture texture, AssetBundleData assetBundleData) : base(assetBundleData) { this.Texture = texture; } @@ -27,16 +26,16 @@ protected override void DisposeInternal() } } - public class WearableRegularAsset : WearableAssetBase + public class AttachmentRegularAsset : AttachmentAssetBase { - internal static readonly ListObjectPool RENDERER_INFO_POOL = new (listInstanceDefaultCapacity: 3, defaultCapacity: 500); + public static readonly ListObjectPool RENDERER_INFO_POOL = new (listInstanceDefaultCapacity: 3, defaultCapacity: 500); private readonly List rendererInfos; public readonly GameObject MainAsset; public IReadOnlyList RendererInfos => rendererInfos; - public WearableRegularAsset(GameObject mainAsset, List rendererInfos, AssetBundleData? assetBundleData) : base(assetBundleData) + public AttachmentRegularAsset(GameObject mainAsset, List rendererInfos, AssetBundleData? assetBundleData) : base(assetBundleData) { MainAsset = mainAsset; this.rendererInfos = rendererInfos; @@ -81,13 +80,13 @@ public string GetInstanceName() /// /// Represents an original wearable asset /// - public abstract class WearableAssetBase : IDisposable + public abstract class AttachmentAssetBase : IDisposable { protected readonly AssetBundleData? assetBundleData; private bool disposed; - protected WearableAssetBase(AssetBundleData? assetBundleData) + protected AttachmentAssetBase(AssetBundleData? assetBundleData) { this.assetBundleData = assetBundleData; } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetBase.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetBase.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetBase.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetBase.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetUtility.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetUtility.cs similarity index 50% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetUtility.cs rename to Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetUtility.cs index 60633a080d..b3143fdec3 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetUtility.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetUtility.cs @@ -1,32 +1,29 @@ -using DCL.AvatarRendering.Wearables.Components; -using DCL.Optimization.Pools; -using ECS.StreamableLoading.AssetBundles; -using ECS.StreamableLoading.Common.Components; +using DCL.Optimization.Pools; using System.Collections.Generic; using UnityEngine; using Utility; -namespace DCL.AvatarRendering.Wearables.Helpers +namespace DCL.AvatarRendering.Loading.Assets { - public static class WearableAssetUtility + public static class AttachmentAssetUtility { - public static void ReleaseAssets(this IWearableAssetsCache cache, IList instantiatedWearables) + public static void ReleaseAssets(this IAttachmentsAssetsCache cache, IList instantiatedWearables) { - foreach (CachedWearable cachedWearable in instantiatedWearables) + foreach (CachedAttachment cachedWearable in instantiatedWearables) cache.Release(cachedWearable); instantiatedWearables.Clear(); } - public static CachedWearable InstantiateWearable(this IWearableAssetsCache wearableAssetsCache, WearableRegularAsset originalAsset, Transform parent) + public static CachedAttachment InstantiateWearable(this IAttachmentsAssetsCache attachmentsAssetsCache, AttachmentRegularAsset originalAsset, Transform parent) { - if (wearableAssetsCache.TryGet(originalAsset, out CachedWearable cachedWearable)) + if (attachmentsAssetsCache.TryGet(originalAsset, out CachedAttachment cachedWearable)) cachedWearable.Instance.transform.SetParent(parent); else { var instantiatedWearable = Object.Instantiate(originalAsset.MainAsset, parent); instantiatedWearable.name = originalAsset.GetInstanceName(); - cachedWearable = new CachedWearable(originalAsset, instantiatedWearable); + cachedWearable = new CachedAttachment(originalAsset, instantiatedWearable); } cachedWearable.Instance.transform.ResetLocalTRS(); @@ -43,11 +40,5 @@ public static CachedWearable InstantiateWearable(this IWearableAssetsCache weara cachedWearable.Instance.gameObject.SetActive(true); return cachedWearable; } - - public static void SetAssetResult(this IWearable wearable, BodyShape bodyShape, int index, StreamableLoadingResult wearableResult) - { - ref var asset = ref wearable.WearableAssetResults[bodyShape]; - asset.Results[index] = wearableResult; - } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetUtility.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetUtility.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetUtility.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentAssetUtility.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetsCache.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentsAssetsCache.cs similarity index 60% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetsCache.cs rename to Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentsAssetsCache.cs index 0337c32139..af8093ccf6 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetsCache.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentsAssetsCache.cs @@ -8,7 +8,7 @@ using Utility.Multithreading; using Utility.PriorityQueue; -namespace DCL.AvatarRendering.Wearables.Helpers +namespace DCL.AvatarRendering.Loading.Assets { /// /// @@ -18,27 +18,27 @@ namespace DCL.AvatarRendering.Wearables.Helpers /// It keeps a limited reasonable number of unique assets /// /// - public class WearableAssetsCache : IWearableAssetsCache, IDisposable + public class AttachmentsAssetsCache : IAttachmentsAssetsCache, IDisposable { // string is hash here which is retrieved via IWearable.GetMainFileHash - private readonly ListObjectPool listPool; + private readonly ListObjectPool listPool; private readonly Transform parentContainer; - private readonly SimplePriorityQueue unloadQueue = new (); + private readonly SimplePriorityQueue unloadQueue = new (); - public int WearablesAssesCount => cache.Count; + public int AssetsCount => cache.Count; - internal Dictionary> cache { get; } + public Dictionary> cache { get; } - public WearableAssetsCache(int initialCapacity) + public AttachmentsAssetsCache(int initialCapacity) { - var parentContainerGo = new GameObject($"POOL_CONTAINER_{nameof(WearableAssetsCache)}"); + var parentContainerGo = new GameObject($"POOL_CONTAINER_{nameof(AttachmentsAssetsCache)}"); parentContainerGo.SetActive(false); parentContainer = parentContainerGo.transform; - cache = new Dictionary>(initialCapacity); + cache = new Dictionary>(initialCapacity); // instantiate a couple of lists to prevent runtime allocations - listPool = new ListObjectPool(defaultCapacity: initialCapacity); + listPool = new ListObjectPool(defaultCapacity: initialCapacity); } public void Dispose() @@ -46,9 +46,9 @@ public void Dispose() UnityObjectUtils.SafeDestroyGameObject(parentContainer); } - public bool TryGet(WearableAssetBase asset, out CachedWearable instance) + public bool TryGet(AttachmentAssetBase asset, out CachedAttachment instance) { - if (cache.TryGetValue(asset, out List list) && list.Count > 0) + if (cache.TryGetValue(asset, out List list) && list!.Count > 0) { // Remove from the tail of the list instance = list[^1]; @@ -66,35 +66,35 @@ public bool TryGet(WearableAssetBase asset, out CachedWearable instance) return true; } - instance = default(CachedWearable); + instance = default(CachedAttachment); return false; } - public void Release(CachedWearable cachedWearable) + public void Release(CachedAttachment cachedAttachment) { - WearableAssetBase asset = cachedWearable.OriginalAsset; + AttachmentAssetBase asset = cachedAttachment.OriginalAsset; - if (!cache.TryGetValue(asset, out List list)) + if (!cache.TryGetValue(asset, out List list)) { - cache[asset] = list = listPool.Get(); + cache[asset] = list = listPool.Get()!; unloadQueue.Enqueue(asset, MultithreadingUtility.FrameCount); } else unloadQueue.TryUpdatePriority(asset, MultithreadingUtility.FrameCount); - list.Add(cachedWearable); + list!.Add(cachedAttachment); ProfilingCounters.CachedWearablesInCacheAmount.Value++; // This logic should not be executed if the application is quitting if (!UnityObjectUtils.IsQuitting) { - cachedWearable.Instance.SetActive(false); + cachedAttachment.Instance.SetActive(false); - foreach (Renderer renderer in cachedWearable.Renderers) + foreach (Renderer renderer in cachedAttachment.Renderers) renderer.enabled = true; - cachedWearable.Instance.transform.SetParent(parentContainer); + cachedAttachment.Instance.transform.SetParent(parentContainer); } } @@ -104,11 +104,11 @@ public void Unload(IPerformanceBudget frameTimeBudget, int maxUnloadAmount) while (frameTimeBudget.TrySpendBudget() && unloadedAmount < maxUnloadAmount && unloadQueue.Count > 0 - && unloadQueue.TryDequeue(out WearableAssetBase key) && cache.TryGetValue(key, out List assets)) + && unloadQueue.TryDequeue(out AttachmentAssetBase key) && cache.TryGetValue(key, out List assets)) { - unloadedAmount += assets.Count; + unloadedAmount += assets!.Count; - foreach (CachedWearable asset in assets) + foreach (CachedAttachment asset in assets) asset.Dispose(); assets.Clear(); diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetsCache.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentsAssetsCache.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/WearableAssetsCache.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/Assets/AttachmentsAssetsCache.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/CachedWearable.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/CachedAttachment.cs similarity index 65% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/CachedWearable.cs rename to Explorer/Assets/DCL/AvatarRendering/Loading/Assets/CachedAttachment.cs index ed1dcb8e5c..1b3e6ddeb8 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/CachedWearable.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/CachedAttachment.cs @@ -4,18 +4,18 @@ using UnityEngine; using Utility; -namespace DCL.AvatarRendering.Wearables.Helpers +namespace DCL.AvatarRendering.Loading.Assets { /// /// We need to store the original asset to be able to release it later /// - public readonly struct CachedWearable : IDisposable + public readonly struct CachedAttachment : IDisposable { - public readonly WearableRegularAsset OriginalAsset; + public readonly AttachmentRegularAsset OriginalAsset; public readonly GameObject Instance; public readonly List Renderers; - public CachedWearable(WearableRegularAsset originalAsset, GameObject instance) + public CachedAttachment(AttachmentRegularAsset originalAsset, GameObject instance) { OriginalAsset = originalAsset; Instance = instance; @@ -32,7 +32,7 @@ public void Dispose() ProfilingCounters.CachedWearablesAmount.Value--; } - public static implicit operator GameObject(CachedWearable cachedWearable) => - cachedWearable.Instance; + public static implicit operator GameObject(CachedAttachment cachedAttachment) => + cachedAttachment.Instance; } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/CachedWearable.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/CachedAttachment.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/CachedWearable.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/Assets/CachedAttachment.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/IAttachmentsAssetsCache.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/IAttachmentsAssetsCache.cs new file mode 100644 index 0000000000..df8896a80a --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/IAttachmentsAssetsCache.cs @@ -0,0 +1,15 @@ +using DCL.Optimization.PerformanceBudgeting; + +namespace DCL.AvatarRendering.Loading.Assets +{ + public interface IAttachmentsAssetsCache + { + int AssetsCount { get; } + + bool TryGet(AttachmentAssetBase asset, out CachedAttachment instance); + + void Release(CachedAttachment cachedAttachment); + + void Unload(IPerformanceBudget frameTimeBudget, int maxUnloadAmount); + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/IWearableAssetsCache.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Assets/IAttachmentsAssetsCache.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/IWearableAssetsCache.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/Assets/IAttachmentsAssetsCache.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/AvatarRendering.Loading.asmdef b/Explorer/Assets/DCL/AvatarRendering/Loading/AvatarRendering.Loading.asmdef new file mode 100644 index 0000000000..982ae7b113 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/AvatarRendering.Loading.asmdef @@ -0,0 +1,28 @@ +{ + "name": "AvatarRendering.Loading", + "rootNamespace": "", + "references": [ + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:8322ea9340a544c59ddc56d4793eac74", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", + "GUID:275e22790c04e9b47a5085d7b0c4432a", + "GUID:4794e238ed0f65142a4aea5848b513e5", + "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", + "GUID:e0eedfa2deb9406daf86fd8368728e39", + "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", + "GUID:fa7b3fdbb04d67549916da7bd2af58ab", + "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:286980af24684da6acc1caa413039811", + "GUID:3c7b57a14671040bd8c549056adc04f5", + "GUID:56e8195b069a4dca9c4c4f313c65f526", + "GUID:b46779583a009f04ba9f5f31d0e7e6ac"], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/AvatarRendering.Loading.asmdef.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/AvatarRendering.Loading.asmdef.meta new file mode 100644 index 0000000000..d13edb65fb --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/AvatarRendering.Loading.asmdef.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 543b8f091a5947a3880b7f2bca2358bd +timeCreated: 1724223022 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Components.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Components.meta new file mode 100644 index 0000000000..8a79e20668 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Components.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 32a8e868b3a642d5836443f659c05b92 +timeCreated: 1724234991 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/BodyShape.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/BodyShape.cs similarity index 97% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Components/BodyShape.cs rename to Explorer/Assets/DCL/AvatarRendering/Loading/Components/BodyShape.cs index 7337efcf69..c715d3782b 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/BodyShape.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/BodyShape.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -namespace DCL.AvatarRendering.Wearables +namespace DCL.AvatarRendering.Loading.Components { public readonly struct BodyShape : IEquatable { diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/BodyShape.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/BodyShape.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Components/BodyShape.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/Components/BodyShape.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsDTOList.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsDTOList.cs new file mode 100644 index 0000000000..f77f00685f --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsDTOList.cs @@ -0,0 +1,110 @@ +using DCL.Diagnostics; +using DCL.Optimization.ThreadSafePool; +using System; +using System.Collections.Generic; + +namespace DCL.AvatarRendering.Loading.Components +{ + public interface IAttachmentsDTOList + { + ConsumedList ConsumeAttachments(); + + static ConsumedList DefaultConsumeAttachments(RepoolableList value) + { + if (value.IsDisposed) + { + ReportHub.LogError(ReportCategory.AVATAR, $"Double consumption of {typeof(T).Name} occurred"); + return ConsumedList.NewEmpty(); + } + + return new ConsumedList(value); + } + } + + public readonly struct ConsumedList : IDisposable + { + private readonly RepoolableList value; + + public IReadOnlyList Value => value.List; + + public ConsumedList(RepoolableList value) + { + this.value = value; + } + + public static ConsumedList NewEmpty() => + new (RepoolableList.NewList()); + + public void Dispose() + { + value.Dispose(); + } + } + + /// + /// Allows internal repooling in readonly structs. + /// It's created since ConsumedAttachmentsDTOList is needed in FinalizeEmoteAssetBundleSystem but StreamableLoadingResult is readonly. + /// + public class RepoolableList : IDisposable + { + private static readonly ThreadSafeObjectPool> POOL = new ( + () => new RepoolableList(new List()), + actionOnGet: l => l.isDisposed = false, + actionOnRelease: l => + { + l.isDisposed = true; + l.list.Clear(); + } + ); + + private bool isDisposed; + + private readonly List list; + + public bool IsDisposed => isDisposed; + + public List List + { + get + { + if (isDisposed) + { + ReportHub.LogError(ReportCategory.AVATAR, $"Double consumption of {typeof(T).Name} occurred"); + return new List(); + } + + return list; + } + } + + private RepoolableList(List list) + { + this.list = list; + } + + public static RepoolableList NewList() => + POOL.Get()!; + + public static RepoolableList NewListWithContentOf(params T[] collection) => + NewListWithContentOf(collection as IEnumerable); + + public static RepoolableList NewListWithContentOf(IEnumerable collection) + { + var repoolableList = NewList(); + repoolableList.List.AddRange(collection); + return repoolableList; + } + + public static RepoolableList FromElement(T element) + { + var output = NewList(); + output.List.Add(element); + return output; + } + + public void Dispose() + { + POOL.Release(this); + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsDTOList.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsDTOList.cs.meta new file mode 100644 index 0000000000..01f176a191 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsDTOList.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2060cdd458a243e6a5b4fd42c9b3eb64 +timeCreated: 1725283681 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsLoadingIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsLoadingIntention.cs new file mode 100644 index 0000000000..71b9c46e0f --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsLoadingIntention.cs @@ -0,0 +1,13 @@ +using ECS.StreamableLoading.Common.Components; + +namespace DCL.AvatarRendering.Loading.Components +{ + public interface IAttachmentsLoadingIntention : ILoadingIntention + { + int TotalAmount { get; } + + void SetTotal(int total); + + void AppendToResult(TResultElement resultElement); + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsLoadingIntention.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsLoadingIntention.cs.meta new file mode 100644 index 0000000000..b7c68cc4d7 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAttachmentsLoadingIntention.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 04e18660db9d42d2a928b61b8aa0853a +timeCreated: 1725366293 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.Methods.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.Methods.cs new file mode 100644 index 0000000000..0d9f3bd9b9 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.Methods.cs @@ -0,0 +1,9 @@ +using System.Linq; + +namespace DCL.AvatarRendering.Loading.Components +{ + public partial interface IAvatarAttachment + { + // Methods are part of the interface instead of extensions to enable mocking for tests + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.Methods.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.Methods.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.Methods.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.Methods.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.cs new file mode 100644 index 0000000000..3606e1e2ad --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.cs @@ -0,0 +1,149 @@ +using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.DTO; +using ECS.StreamableLoading.Common.Components; +using SceneRunner.Scene; +using System.Linq; +using UnityEngine; + +namespace DCL.AvatarRendering.Loading.Components +{ + public interface IAvatarAttachment + { + bool IsLoading { get; } + + public void UpdateLoadingStatus(bool isLoading); + + /// + /// Might be never resolved if Wearable is loaded from the Embedded Source + /// + StreamableLoadingResult? ManifestResult { get; set; } + + StreamableLoadingResult? ThumbnailAssetResult { get; set; } + + AvatarAttachmentDTO DTO { get; } + + public string ToString() => + $"AvatarAttachment({DTO.GetHash()} | {this.GetUrn()})"; + } + + public partial interface IAvatarAttachment : IAvatarAttachment + { + StreamableLoadingResult Model { get; set; } + + bool IsOnChain(); + + public void ResolvedFailedDTO(StreamableLoadingResult result) + { + Model = result; + UpdateLoadingStatus(false); + } + + public void ApplyAndMarkAsLoaded(TModelDTO modelDTO) + { + Model = new StreamableLoadingResult(modelDTO); + UpdateLoadingStatus(false); + } + } + + public static class AvatarAttachmentExtensions + { + public static bool IsUnisex(this IAvatarAttachment avatarAttachment) => + avatarAttachment.DTO.Metadata.AbstractData.representations.Length > 1; + + public static URN GetUrn(this IAvatarAttachment avatarAttachment) => + avatarAttachment.DTO.Metadata.id; + + public static string GetCategory(this IAvatarAttachment avatarAttachment) => + avatarAttachment.DTO.Metadata.AbstractData.category; + + public static string GetDescription(this IAvatarAttachment avatarAttachment) => + avatarAttachment.DTO.Metadata.description; + + public static bool IsThirdParty(this IAvatarAttachment avatarAttachment) => + avatarAttachment.GetUrn().IsThirdPartyCollection(); + + public static string GetName(this IAvatarAttachment avatarAttachment, string langCode = "en") + { + string result = avatarAttachment.DTO.Metadata.name; + + if (avatarAttachment.DTO.Metadata.i18n == null) + return result; + + for (var i = 0; i < avatarAttachment.DTO.Metadata.i18n.Length; i++) + { + if (avatarAttachment.DTO.Metadata.i18n[i].code != langCode) + continue; + + result = avatarAttachment.DTO.Metadata.i18n[i].text; + break; + } + + return result; + } + + public static string GetRarity(this IAvatarAttachment avatarAttachment) + { + const string DEFAULT_RARITY = "base"; + string result = avatarAttachment.DTO.Metadata?.rarity ?? DEFAULT_RARITY; + return string.IsNullOrEmpty(result) ? DEFAULT_RARITY : result; + } + + public static URLPath GetThumbnail(this IAvatarAttachment avatarAttachment) + { + const string THUMBNAIL_DEFAULT_KEY = "thumbnail.png"; + AvatarAttachmentDTO wearableDTO = avatarAttachment.DTO; + + string thumbnailHash = wearableDTO.Metadata.thumbnail; + + if (thumbnailHash == THUMBNAIL_DEFAULT_KEY && avatarAttachment.TryGetContentHashByKey(THUMBNAIL_DEFAULT_KEY, out string? hash)) + thumbnailHash = hash!; + + return new URLPath(thumbnailHash!); + } + + public static bool TryGetMainFileHash(this IAvatarAttachment avatarAttachment, BodyShape bodyShape, out string? hash) + { + AvatarAttachmentDTO wearableDTO = avatarAttachment.DTO; + + // The length of arrays is small, so O(N) complexity is fine + // Avoid iterator allocations with "for" loop + for (var i = 0; i < wearableDTO.Metadata.AbstractData.representations.Length; i++) + { + var representation = wearableDTO.Metadata.AbstractData.representations[i]; + + if (representation.bodyShapes.Contains(bodyShape)) + return avatarAttachment.TryGetContentHashByKey(representation.mainFile, out hash); + } + + hash = null; + return false; + } + + public static bool TryGetContentHashByKey(this IAvatarAttachment avatarAttachment, string key, out string? hash) + { + AvatarAttachmentDTO wearableDTO = avatarAttachment.DTO; + + for (var i = 0; i < wearableDTO.content.Length; i++) + if (wearableDTO.content[i].file == key) + { + hash = wearableDTO.content[i].hash; + return true; + } + + hash = null; + return false; + } + + public static void UpdateManifest(this IAvatarAttachment avatarAttachment, StreamableLoadingResult result) + { + avatarAttachment.ManifestResult = result; + avatarAttachment.UpdateLoadingStatus(false); + } + + public static void ResetManifest(this IAvatarAttachment avatarAttachment) + { + avatarAttachment.ManifestResult = null; + avatarAttachment.UpdateLoadingStatus(false); + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/Components/IAvatarAttachment.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/DTO.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/DTO.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/DTO.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/DTO.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/DTO/AvatarAttachmentDTO.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/DTO/AvatarAttachmentDTO.cs similarity index 72% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/DTO/AvatarAttachmentDTO.cs rename to Explorer/Assets/DCL/AvatarRendering/Loading/DTO/AvatarAttachmentDTO.cs index 6b0b795182..02c5bc3af4 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/DTO/AvatarAttachmentDTO.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/DTO/AvatarAttachmentDTO.cs @@ -1,10 +1,10 @@ -using System; +#nullable disable -#nullable disable +using System; -namespace DCL.AvatarRendering.Wearables +namespace DCL.AvatarRendering.Loading.DTO { - public abstract class AvatarAttachmentDTO : AvatarAttachmentDTO where TMetadata : AvatarAttachmentDTO.MetadataBase + public abstract class AvatarAttachmentDTO : AvatarAttachmentDTO where TMetadata: AvatarAttachmentDTO.MetadataBase { public TMetadata metadata; @@ -33,6 +33,16 @@ public struct Representation public string[] contents; public string[] overrideHides; public string[] overrideReplaces; + + public static Representation NewFakeRepresentation() => + new() + { + bodyShapes = Array.Empty(), + mainFile = string.Empty, + contents = Array.Empty(), + overrideHides = Array.Empty(), + overrideReplaces = Array.Empty(), + }; } [Serializable] @@ -75,6 +85,11 @@ public struct I18n public string code; public string text; } + } + public static class AvatarAttachmentDTOExtensions + { + public static string GetHash(this AvatarAttachmentDTO DTO) => + DTO.id; } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/DTO/AvatarAttachmentDTO.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/DTO/AvatarAttachmentDTO.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/DTO/AvatarAttachmentDTO.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/DTO/AvatarAttachmentDTO.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/DTO/ElementIndividualDataDto.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/DTO/ElementIndividualDataDto.cs new file mode 100644 index 0000000000..a2f227e943 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/DTO/ElementIndividualDataDto.cs @@ -0,0 +1,13 @@ +using System; + +namespace DCL.AvatarRendering.Loading +{ + [Serializable] + public struct ElementIndividualDataDto + { + public string id; + public string tokenId; + public string transferredAt; + public string price; + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/DTO/ElementIndividualDataDto.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/DTO/ElementIndividualDataDto.cs.meta new file mode 100644 index 0000000000..60ef799cb5 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/DTO/ElementIndividualDataDto.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 580181fe41404b6bb74bcb762afaaca7 +timeCreated: 1724226376 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/IAvatarElementStorage.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/IAvatarElementStorage.cs new file mode 100644 index 0000000000..2d2eb2071c --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/IAvatarElementStorage.cs @@ -0,0 +1,62 @@ +using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.AvatarRendering.Wearables.Components; +using DCL.Diagnostics; +using DCL.Optimization.PerformanceBudgeting; +using System.Collections.Generic; + +namespace DCL.AvatarRendering.Loading +{ + /// + /// Avatar elements cache, each implementation should be thread safe. + /// + public interface IAvatarElementStorage where TElement: IAvatarAttachment where TDTO: AvatarAttachmentDTO + { + /// + /// Attempts to retrieve an element from the catalog. + /// + /// The URN identifier. + /// The element instance if found. + /// Returns true if the element exists; otherwise, false. + bool TryGetElement(URN urn, out TElement element); + + void Set(URN urn, TElement element); + + /// + /// Retrieves an element by its DTO or adds a new one if it doesn't exist. + /// + /// The wearable DTO + /// Determines if the wearable should be unloaded when memory is full + /// An instance of the type. + TElement GetOrAddByDTO(TDTO dto, bool qualifiedForUnloading = true); + + /// + /// Unloads the wearable from the catalog by a frame time budget provider. + /// + /// The frame time budget provider. + void Unload(IPerformanceBudget frameTimeBudget); + + void SetOwnedNft(URN urn, NftBlockchainOperationEntry operation); + + bool TryGetOwnedNftRegistry(URN nftUrn, out IReadOnlyDictionary registry); + } + + public static class AvatarElementCache + { + public static bool TryGetElementWithLogs(this IAvatarElementStorage storage, TDTO assetDTO, string reportCategory, out TElement? element) + where TElement: IAvatarAttachment + where TDTO: AvatarAttachmentDTO + { + string? id = assetDTO.Metadata?.id; + + bool inCatalog = storage.TryGetElement(id ?? string.Empty, out element); + + //An element that has a DTO request should already have an empty representation in the catalog at this point + if (inCatalog == false) + ReportHub.LogError(reportCategory, $"Requested {typeof(TDTO).Name} '{id}' is not in the catalog"); + + return inCatalog; + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/IAvatarElementStorage.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/IAvatarElementStorage.cs.meta new file mode 100644 index 0000000000..dfa87fe1d7 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/IAvatarElementStorage.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 171f2967dd1146b4bd24da16be24b490 +timeCreated: 1724223104 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/ILambdaResponse.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/ILambdaResponse.cs new file mode 100644 index 0000000000..3deecd6faf --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/ILambdaResponse.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace DCL.AvatarRendering.Loading +{ + public interface IAttachmentLambdaResponse + { + /// + /// Page of fetched elements + /// + IReadOnlyList Page { get; } + + /// + /// Total amount of elements that can be fetched + /// + int TotalAmount { get; } + } + + public interface ILambdaResponseElement + { + TElementDTO Entity { get; } + + IReadOnlyList IndividualData { get; } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/ILambdaResponse.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/ILambdaResponse.cs.meta new file mode 100644 index 0000000000..d261d63efe --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/ILambdaResponse.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e5baa8a6d6314b4fa200859e72afcdeb +timeCreated: 1724225609 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/NftBlockchainOperationEntry.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/NftBlockchainOperationEntry.cs similarity index 90% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Components/NftBlockchainOperationEntry.cs rename to Explorer/Assets/DCL/AvatarRendering/Loading/NftBlockchainOperationEntry.cs index 3277278be7..21418bd241 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/NftBlockchainOperationEntry.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/NftBlockchainOperationEntry.cs @@ -3,7 +3,7 @@ namespace DCL.AvatarRendering.Wearables.Components { - public class NftBlockchainOperationEntry + public readonly struct NftBlockchainOperationEntry { public URN Urn { get; } public string TokenId { get; } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/NftBlockchainOperationEntry.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/NftBlockchainOperationEntry.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Components/NftBlockchainOperationEntry.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Loading/NftBlockchainOperationEntry.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Systems.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems.meta new file mode 100644 index 0000000000..12603ad359 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 81db57e333ec48808fe4daa4cf8da3cb +timeCreated: 1724230680 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract.meta new file mode 100644 index 0000000000..212268f907 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 21234164aa0549b085b1b0ccc11a3916 +timeCreated: 1724251351 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/FinalizeElementsLoadingSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/FinalizeElementsLoadingSystem.cs new file mode 100644 index 0000000000..39299f3c01 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/FinalizeElementsLoadingSystem.cs @@ -0,0 +1,60 @@ +using Arch.Core; +using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.Diagnostics; +using DCL.Optimization.Pools; +using ECS.Abstract; +using ECS.StreamableLoading.Common; +using ECS.StreamableLoading.Common.Components; +using System; + +namespace DCL.AvatarRendering.Loading.Systems.Abstract +{ + public abstract partial class FinalizeElementsLoadingSystem : BaseUnityLoopSystem + where TIntention: IAssetIntention, IPointersLoadingIntention, IEquatable + where TElement: IAvatarAttachment where TDTO: AvatarAttachmentDTO + { + protected readonly IAvatarElementStorage storage; + private readonly ListObjectPool pointersPool; + + protected FinalizeElementsLoadingSystem( + World world, + IAvatarElementStorage storage, + ListObjectPool pointersPool + ) : base(world) + { + this.storage = storage; + this.pointersPool = pointersPool; + } + + protected bool TryFinalizeIfCancelled(Entity entity, in AssetPromise promise) + { + if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested == false) + return false; + + foreach (var pointerID in promise.LoadingIntention.Pointers) + if (storage.TryGetElement(pointerID, out var component)) + component.UpdateLoadingStatus(false); + + promise.ForgetLoading(World!); + World!.Destroy(entity); + return true; + } + + protected void ReportAndFinalizeWithError(URN urn) + { + //We have some missing pointers that were not completed. We have to consider them as failure + + if (storage.TryGetElement(urn, out var component)) + + //If its not in the catalog, we cannot determine which one has failed + component.ResolvedFailedDTO( + new StreamableLoadingResult( + new ReportData(GetReportCategory()), + new ArgumentNullException($"Wearable DTO is null for for {urn}") + ) + ); + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/FinalizeElementsLoadingSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/FinalizeElementsLoadingSystem.cs.meta new file mode 100644 index 0000000000..4293fe0caa --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/FinalizeElementsLoadingSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5c8f2ee4cbf149e4b88a50d5728b6024 +timeCreated: 1724232138 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByIntentionSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByIntentionSystem.cs new file mode 100644 index 0000000000..e78d44e007 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByIntentionSystem.cs @@ -0,0 +1,104 @@ +using Arch.Core; +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.AvatarRendering.Wearables.Components; +using DCL.Optimization.PerformanceBudgeting; +using DCL.WebRequests; +using ECS; +using ECS.Prioritization.Components; +using ECS.StreamableLoading.Cache; +using ECS.StreamableLoading.Common.Components; +using ECS.StreamableLoading.Common.Systems; +using System; +using System.Threading; +using Utility.Multithreading; + +namespace DCL.AvatarRendering.Loading.Systems.Abstract +{ + public abstract class LoadElementsByIntentionSystem : + LoadSystemBase + where TIntention: struct, IAttachmentsLoadingIntention + where TAvatarElementDTO: AvatarAttachmentDTO where TAvatarElement : IAvatarAttachment + { + private readonly IAvatarElementStorage avatarElementStorage; + private readonly IWebRequestController webRequestController; + private readonly IRealmData realmData; + + protected LoadElementsByIntentionSystem( + World world, + IStreamableCache cache, + IAvatarElementStorage avatarElementStorage, + IWebRequestController webRequestController, + IRealmData realmData + ) : base(world, cache) + { + this.avatarElementStorage = avatarElementStorage; + this.webRequestController = webRequestController; + this.realmData = realmData; + } + + protected sealed override async UniTask> FlowInternalAsync(TIntention intention, + IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) + { + await realmData.WaitConfiguredAsync(); + + var lambdaResponse = + await ParsedResponseAsync( + webRequestController.GetAsync( + new CommonArguments( + BuildUrlFromIntention(in intention), + attemptsCount: intention.CommonArguments.Attempts + ), + ct, + GetReportCategory() + ) + ); + + await using (await ExecuteOnThreadPoolScope.NewScopeWithReturnOnMainThreadAsync()) + Load(ref intention, lambdaResponse); + + return new StreamableLoadingResult(AssetFromPreparedIntention(in intention)); + } + + private void Load(ref TIntention intention, IAttachmentLambdaResponse lambdaResponse) where TResponseElement: ILambdaResponseElement + { + intention.SetTotal(lambdaResponse.TotalAmount); + + foreach (var element in lambdaResponse.Page) + { + var elementDTO = element.Entity; + + var wearable = avatarElementStorage.GetOrAddByDTO(elementDTO); + + foreach (var individualData in element.IndividualData) + { + // Probably a base wearable, wrongly return individual data. Skip it + if (elementDTO.Metadata.id == individualData.id) continue; + + long.TryParse(individualData.transferredAt, out long transferredAt); + decimal.TryParse(individualData.price, out decimal price); + + avatarElementStorage.SetOwnedNft( + elementDTO.Metadata.id, + new NftBlockchainOperationEntry( + individualData.id, + individualData.tokenId, + DateTimeOffset.FromUnixTimeSeconds(transferredAt).DateTime, + price + ) + ); + } + + intention.AppendToResult(wearable); + } + } + + protected abstract UniTask>> ParsedResponseAsync(GenericDownloadHandlerUtils.Adapter adapter); + + protected abstract TAsset AssetFromPreparedIntention(in TIntention intention); + + protected abstract URLAddress BuildUrlFromIntention(in TIntention intention); + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByIntentionSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByIntentionSystem.cs.meta new file mode 100644 index 0000000000..60cac7c5c1 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByIntentionSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e5508e5280f4431fbfdd670a4516a166 +timeCreated: 1724224907 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesDTOByPointersSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByPointersSystem.cs similarity index 59% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesDTOByPointersSystem.cs rename to Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByPointersSystem.cs index df852067b2..b5518c3b28 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesDTOByPointersSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByPointersSystem.cs @@ -1,11 +1,7 @@ using Arch.Core; -using Arch.SystemGroups; -using Arch.SystemGroups.DefaultSystemGroups; using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; -using DCL.AvatarRendering.Wearables.Components.Intentions; -using DCL.AvatarRendering.Wearables.Helpers; -using DCL.Diagnostics; +using DCL.AvatarRendering.Loading.Components; using DCL.Optimization.PerformanceBudgeting; using DCL.Optimization.Pools; using DCL.Optimization.ThreadSafePool; @@ -19,34 +15,29 @@ using System.Threading; using UnityEngine; -namespace DCL.AvatarRendering.Wearables.Systems +namespace DCL.AvatarRendering.Loading.Systems.Abstract { - [UpdateInGroup(typeof(PresentationSystemGroup))] - [LogCategory(ReportCategory.WEARABLE)] - public partial class LoadWearablesDTOByPointersSystem : LoadSystemBase + public abstract class LoadElementsByPointersSystem : LoadSystemBase where TIntention: struct, IPointersLoadingIntention { // When the number of wearables to request is greater than MAX_WEARABLES_PER_REQUEST, we split the request into several smaller ones. // In this way we avoid to send a very long url string that would fail due to the web request size limitations. - private const int MAX_WEARABLES_PER_REQUEST = 200; + protected const int MAX_WEARABLES_PER_REQUEST = 200; - private static readonly ThreadSafeListPool DTO_POOL = new (MAX_WEARABLES_PER_REQUEST, 50); - - private readonly StringBuilder bodyBuilder = new (); + protected static readonly ThreadSafeListPool DTO_POOL = new (MAX_WEARABLES_PER_REQUEST, 50); private readonly IWebRequestController webRequestController; + private readonly StringBuilder bodyBuilder = new (); - internal LoadWearablesDTOByPointersSystem( - World world, - IWebRequestController webRequestController, - IStreamableCache cache - ) : base(world, cache) + protected LoadElementsByPointersSystem(World world, IStreamableCache cache, IWebRequestController webRequestController) : base(world, cache) { this.webRequestController = webRequestController; } - protected override async UniTask> FlowInternalAsync(GetWearableDTOByPointersIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) + protected sealed override async UniTask> FlowInternalAsync( + TIntention intention, IAcquiredBudget acquiredBudget, + IPartitionComponent partition, CancellationToken ct) { - var finalTargetList = new List(); + var finalTargetList = RepoolableList.NewList(); int numberOfPartialRequests = (intention.Pointers.Count + MAX_WEARABLES_PER_REQUEST - 1) / MAX_WEARABLES_PER_REQUEST; @@ -57,16 +48,18 @@ protected override async UniTask> Flow int numberOfWearablesToRequest = Mathf.Min(intention.Pointers.Count - pointer, MAX_WEARABLES_PER_REQUEST); await DoPartialRequestAsync(intention.CommonArguments.URL, intention.Pointers, - pointer, pointer + numberOfWearablesToRequest, finalTargetList, ct); + pointer, pointer + numberOfWearablesToRequest, finalTargetList.List, ct); pointer += numberOfWearablesToRequest; } - return new StreamableLoadingResult(new WearablesDTOList(finalTargetList)); + return new StreamableLoadingResult(CreateAssetFromListOfDTOs(finalTargetList)); } + protected abstract TAsset CreateAssetFromListOfDTOs(RepoolableList list); + private async UniTask DoPartialRequestAsync(URLAddress url, - IReadOnlyList wearablesToRequest, int startIndex, int endIndex, List results, CancellationToken ct) + IReadOnlyList wearablesToRequest, int startIndex, int endIndex, List results, CancellationToken ct) { await UniTask.SwitchToMainThread(); @@ -86,14 +79,12 @@ private async UniTask DoPartialRequestAsync(URLAddress url, bodyBuilder.Append("]}"); - using PoolExtensions.Scope> dtoPooledList = DTO_POOL.AutoScope(); - List dtoTempBuffer = dtoPooledList.Value; + using PoolExtensions.Scope> dtoPooledList = DTO_POOL.AutoScope(); - await webRequestController.PostAsync(new CommonArguments(url), GenericPostArguments.CreateJson(bodyBuilder.ToString()), ct) - .OverwriteFromJsonAsync(dtoTempBuffer, WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool); + await webRequestController.PostAsync(new CommonArguments(url), GenericPostArguments.CreateJson(bodyBuilder.ToString()), ct, GetReportCategory()) + .OverwriteFromJsonAsync(dtoPooledList.Value, WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool); - // List is not concurrent - lock (results) { results.AddRange(dtoTempBuffer); } + lock (results) { results.AddRange(dtoPooledList.Value); } } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByPointersSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByPointersSystem.cs.meta new file mode 100644 index 0000000000..5b36bc1b62 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/Systems/Abstract/LoadElementsByPointersSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: aa85adbe40984a90b5f49afbba0d6504 +timeCreated: 1724230692 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/csc.rsp b/Explorer/Assets/DCL/AvatarRendering/Loading/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Loading/csc.rsp.meta b/Explorer/Assets/DCL/AvatarRendering/Loading/csc.rsp.meta new file mode 100644 index 0000000000..32342d640c --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Loading/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 86bbe6fa8ca34a5c9798def4ecad3fa6 +timeCreated: 1724223022 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Shaders/DCL_Toon/DCL_ToonBodyDoubleShadeWithFeather.hlsl b/Explorer/Assets/DCL/AvatarRendering/Shaders/DCL_Toon/DCL_ToonBodyDoubleShadeWithFeather.hlsl index dd802880aa..609836ed81 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Shaders/DCL_Toon/DCL_ToonBodyDoubleShadeWithFeather.hlsl +++ b/Explorer/Assets/DCL/AvatarRendering/Shaders/DCL_Toon/DCL_ToonBodyDoubleShadeWithFeather.hlsl @@ -349,156 +349,156 @@ float4 fragDoubleShadeFeather(VertexOutput i, half facing : VFACE) : SV_TARGET float3 envLightColor = envColor.rgb; float envLightIntensity = 0.299*envLightColor.r + 0.587*envLightColor.g + 0.114*envLightColor.b <1 ? (0.299*envLightColor.r + 0.587*envLightColor.g + 0.114*envLightColor.b) : 1; float3 pointLightColor = 0; - #ifdef _ADDITIONAL_LIGHTS - int pixelLightCount = GetAdditionalLightsCount(); - - #if USE_FORWARD_PLUS - for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++) - { - FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK - int iLight = lightIndex; - // if (iLight != i.mainLightID) - { - float notDirectional = 1.0f; //_WorldSpaceLightPos0.w of the legacy code. - - UtsLight additionalLight = GetUrpMainUtsLight(0,0); - additionalLight = GetAdditionalUtsLight(iLight, inputData.positionWS,i.positionCS); - half3 additionalLightColor = GetLightColor(additionalLight); - // attenuation = light.distanceAttenuation; - - - float3 lightDirection = additionalLight.direction; - //v.2.0.5: - float3 addPassLightColor = (0.5*dot(lerp(i.normalDir, normalDirection, _Is_NormalMapToBase), lightDirection) + 0.5) * additionalLightColor.rgb; - float pureIntencity = max(0.001, (0.299*additionalLightColor.r + 0.587*additionalLightColor.g + 0.114*additionalLightColor.b)); - float3 lightColor = max(float3(0.0,0.0,0.0), lerp(addPassLightColor, lerp(float3(0.0,0.0,0.0), min(addPassLightColor, addPassLightColor / pureIntencity), notDirectional), _Is_Filter_LightColor)); - float3 halfDirection = normalize(viewDirection + lightDirection); // has to be recalced here. - - //v.2.0.5: - float baseColorStep = saturate(_BaseColor_Step + _StepOffset); - float shadeColorStep = saturate(_ShadeColor_Step + _StepOffset); - // - //v.2.0.5: If Added lights is directional, set 0 as _LightIntensity - float _LightIntensity = lerp(0, (0.299*additionalLightColor.r + 0.587*additionalLightColor.g + 0.114*additionalLightColor.b), notDirectional); - //v.2.0.5: Filtering the high intensity zone of PointLights - float3 Set_LightColor = lightColor; - // - float3 Set_BaseColor = lerp((_BaseColor.rgb*_MainTex_var.rgb*_LightIntensity), ((_BaseColor.rgb*_MainTex_var.rgb)*Set_LightColor), _Is_LightColor_Base); - //v.2.0.5 - int n1st_ShadeMapArrID = _1st_ShadeMapArr_ID; - float4 _1st_ShadeMap_var = lerp(SAMPLE_1ST_SHADEMAP(TRANSFORM_TEX(Set_UV0, _1st_ShadeMap), n1st_ShadeMapArrID), float4(Set_BaseColor.rgb, _MainTex_var.a), _Use_BaseAs1st); - float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb*_1st_ShadeMap_var.rgb*_LightIntensity), ((_1st_ShadeColor.rgb*_1st_ShadeMap_var.rgb)*Set_LightColor), _Is_LightColor_1st_Shade); - //v.2.0.5 - int n2nd_ShadeMapArrID = _2nd_ShadeMapArr_ID; - float4 _2nd_ShadeMap_var = lerp(SAMPLE_2ND_SHADEMAP(TRANSFORM_TEX(Set_UV0, _2nd_ShadeMap), n2nd_ShadeMapArrID), _1st_ShadeMap_var, _Use_1stAs2nd); - float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb*_2nd_ShadeMap_var.rgb*_LightIntensity), ((_2nd_ShadeColor.rgb*_2nd_ShadeMap_var.rgb)*Set_LightColor), _Is_LightColor_2nd_Shade); - float _HalfLambert_var = 0.5*dot(lerp(i.normalDir, normalDirection, _Is_NormalMapToBase), lightDirection) + 0.5; - - - int nSet_2nd_ShadePositionArrID = _Set_2nd_ShadePositionArr_ID; - float4 _Set_2nd_ShadePosition_var = SAMPLE_SET_2ND_SHADEPOSITION(TRANSFORM_TEX(Set_UV0, _Set_2nd_ShadePosition), nSet_2nd_ShadePositionArrID); - - int nSet_1st_ShadePositionArrID = _Set_1st_ShadePositionArr_ID; - float4 _Set_1st_ShadePosition_var = SAMPLE_SET_1ST_SHADEPOSITION(TRANSFORM_TEX(Set_UV0, _Set_1st_ShadePosition), nSet_1st_ShadePositionArrID); - - //v.2.0.5: - float Set_FinalShadowMask = saturate((1.0 + ((lerp(_HalfLambert_var, (_HalfLambert_var*saturate(1.0 + _Tweak_SystemShadowsLevel)), _Set_SystemShadowsToBase) - (baseColorStep - _BaseShade_Feather)) * ((1.0 - _Set_1st_ShadePosition_var.rgb).r - 1.0)) / (baseColorStep - (baseColorStep - _BaseShade_Feather)))); - //Composition: 3 Basic Colors as finalColor - float3 finalColor = lerp(Set_BaseColor, lerp(Set_1st_ShadeColor, Set_2nd_ShadeColor, saturate((1.0 + ((_HalfLambert_var - (shadeColorStep - _1st2nd_Shades_Feather)) * ((1.0 - _Set_2nd_ShadePosition_var.rgb).r - 1.0)) / (shadeColorStep - (shadeColorStep - _1st2nd_Shades_Feather))))), Set_FinalShadowMask); // Final Color - - //v.2.0.6: Add HighColor if _Is_Filter_HiCutPointLightColor is False - int nSet_HighColorMaskArrID = _Set_HighColorMaskArr_ID; - float4 _Set_HighColorMask_var = SAMPLE_HIGHCOLORMASK(TRANSFORM_TEX(Set_UV0, _Set_HighColorMask), nSet_HighColorMaskArrID); - float _Specular_var = 0.5*dot(halfDirection, lerp(i.normalDir, normalDirection, _Is_NormalMapToHighColor)) + 0.5; // Specular - float _TweakHighColorMask_var = (saturate((_Set_HighColorMask_var.g + _Tweak_HighColorMaskLevel))*lerp((1.0 - step(_Specular_var, (1.0 - pow(_HighColor_Power, 5)))), pow(_Specular_var, exp2(lerp(11, 1, _HighColor_Power))), _Is_SpecularToHighColor)); - - int nHighColor_TeArrID = _HighColor_TexArr_ID; - float4 _HighColor_Tex_var = SAMPLE_HIGHCOLOR(TRANSFORM_TEX(Set_UV0, _HighColor_Tex), nHighColor_TeArrID); - float3 _HighColor_var = (lerp((_HighColor_Tex_var.rgb*_HighColor.rgb), ((_HighColor_Tex_var.rgb*_HighColor.rgb)*Set_LightColor), _Is_LightColor_HighColor)*_TweakHighColorMask_var); - finalColor = finalColor + lerp(lerp(_HighColor_var, (_HighColor_var*((1.0 - Set_FinalShadowMask) + (Set_FinalShadowMask*_TweakHighColorOnShadow))), _Is_UseTweakHighColorOnShadow), float3(0, 0, 0), _Is_Filter_HiCutPointLightColor); - finalColor = SATURATE_IF_SDR(finalColor); - pointLightColor += finalColor; - } - } - #endif // USE_FORWARD_PLUS - - // determine main light inorder to apply light culling - // when the loop counter start from negative value, MAINLIGHT_IS_MAINLIGHT = -1, some compiler doesn't work well. - // for (int iLight = MAINLIGHT_IS_MAINLIGHT; iLight < pixelLightCount ; ++iLight) - UTS_LIGHT_LOOP_BEGIN(pixelLightCount - MAINLIGHT_IS_MAINLIGHT) - #if USE_FORWARD_PLUS - int iLight = lightIndex; - #else - int iLight = loopCounter + MAINLIGHT_IS_MAINLIGHT; - if (iLight != i.mainLightID) - #endif - { - float notDirectional = 1.0f; //_WorldSpaceLightPos0.w of the legacy code. - - UtsLight additionalLight = GetUrpMainUtsLight(0,0); - if (iLight != -1) - { - additionalLight = GetAdditionalUtsLight(iLight, inputData.positionWS,i.positionCS); - } - half3 additionalLightColor = GetLightColor(additionalLight); - // attenuation = light.distanceAttenuation; - - - float3 lightDirection = additionalLight.direction; - //v.2.0.5: - float3 addPassLightColor = (0.5*dot(lerp(i.normalDir, normalDirection, _Is_NormalMapToBase), lightDirection) + 0.5) * additionalLightColor.rgb; - float pureIntencity = max(0.001, (0.299*additionalLightColor.r + 0.587*additionalLightColor.g + 0.114*additionalLightColor.b)); - float3 lightColor = max(float3(0.0,0.0,0.0), lerp(addPassLightColor, lerp(float3(0.0,0.0,0.0), min(addPassLightColor, addPassLightColor / pureIntencity), notDirectional), _Is_Filter_LightColor)); - float3 halfDirection = normalize(viewDirection + lightDirection); // has to be recalced here. - - //v.2.0.5: - float baseColorStep = saturate(_BaseColor_Step + _StepOffset); - float shadeColorStep = saturate(_ShadeColor_Step + _StepOffset); - // - //v.2.0.5: If Added lights is directional, set 0 as _LightIntensity - float _LightIntensity = lerp(0, (0.299*additionalLightColor.r + 0.587*additionalLightColor.g + 0.114*additionalLightColor.b), notDirectional); - //v.2.0.5: Filtering the high intensity zone of PointLights - float3 Set_LightColor = lightColor; - // - float3 Set_BaseColor = lerp((_BaseColor.rgb*_MainTex_var.rgb*_LightIntensity), ((_BaseColor.rgb*_MainTex_var.rgb)*Set_LightColor), _Is_LightColor_Base); - //v.2.0.5 - int n1st_ShadeMapArrID = _1st_ShadeMapArr_ID; - float4 _1st_ShadeMap_var = lerp(SAMPLE_1ST_SHADEMAP(TRANSFORM_TEX(Set_UV0, _1st_ShadeMap), n1st_ShadeMapArrID), float4(Set_BaseColor.rgb, _MainTex_var.a), _Use_BaseAs1st); - float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb*_1st_ShadeMap_var.rgb*_LightIntensity), ((_1st_ShadeColor.rgb*_1st_ShadeMap_var.rgb)*Set_LightColor), _Is_LightColor_1st_Shade); - //v.2.0.5 - int n2nd_ShadeMapArrID = _2nd_ShadeMapArr_ID; - float4 _2nd_ShadeMap_var = lerp(SAMPLE_2ND_SHADEMAP(TRANSFORM_TEX(Set_UV0, _2nd_ShadeMap), n2nd_ShadeMapArrID), _1st_ShadeMap_var, _Use_1stAs2nd); - float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb*_2nd_ShadeMap_var.rgb*_LightIntensity), ((_2nd_ShadeColor.rgb*_2nd_ShadeMap_var.rgb)*Set_LightColor), _Is_LightColor_2nd_Shade); - float _HalfLambert_var = 0.5*dot(lerp(i.normalDir, normalDirection, _Is_NormalMapToBase), lightDirection) + 0.5; - - int nSet_2nd_ShadePositionArrID = _Set_2nd_ShadePositionArr_ID; - float4 _Set_2nd_ShadePosition_var = SAMPLE_SET_2ND_SHADEPOSITION(TRANSFORM_TEX(Set_UV0, _Set_2nd_ShadePosition), nSet_2nd_ShadePositionArrID); - - int nSet_1st_ShadePositionArrID = _Set_1st_ShadePositionArr_ID; - float4 _Set_1st_ShadePosition_var = SAMPLE_SET_1ST_SHADEPOSITION(TRANSFORM_TEX(Set_UV0, _Set_1st_ShadePosition), nSet_1st_ShadePositionArrID); - - //v.2.0.5: - float Set_FinalShadowMask = saturate((1.0 + ((lerp(_HalfLambert_var, (_HalfLambert_var*saturate(1.0 + _Tweak_SystemShadowsLevel)), _Set_SystemShadowsToBase) - (baseColorStep - _BaseShade_Feather)) * ((1.0 - _Set_1st_ShadePosition_var.rgb).r - 1.0)) / (baseColorStep - (baseColorStep - _BaseShade_Feather)))); - //Composition: 3 Basic Colors as finalColor - float3 finalColor = lerp(Set_BaseColor, lerp(Set_1st_ShadeColor, Set_2nd_ShadeColor, saturate((1.0 + ((_HalfLambert_var - (shadeColorStep - _1st2nd_Shades_Feather)) * ((1.0 - _Set_2nd_ShadePosition_var.rgb).r - 1.0)) / (shadeColorStep - (shadeColorStep - _1st2nd_Shades_Feather))))), Set_FinalShadowMask); // Final Color - - //v.2.0.6: Add HighColor if _Is_Filter_HiCutPointLightColor is False - int nSet_HighColorMaskArrID = _Set_HighColorMaskArr_ID; - float4 _Set_HighColorMask_var = SAMPLE_HIGHCOLORMASK(TRANSFORM_TEX(Set_UV0, _Set_HighColorMask), nSet_HighColorMaskArrID); - - float _Specular_var = 0.5*dot(halfDirection, lerp(i.normalDir, normalDirection, _Is_NormalMapToHighColor)) + 0.5; // Specular - float _TweakHighColorMask_var = (saturate((_Set_HighColorMask_var.g + _Tweak_HighColorMaskLevel))*lerp((1.0 - step(_Specular_var, (1.0 - pow(_HighColor_Power, 5)))), pow(_Specular_var, exp2(lerp(11, 1, _HighColor_Power))), _Is_SpecularToHighColor)); - - int nHighColor_TexArrID = _HighColor_TexArr_ID; - float4 _HighColor_Tex_var = SAMPLE_HIGHCOLOR(TRANSFORM_TEX(Set_UV0, _HighColor_Tex), nHighColor_TexArrID); - float3 _HighColor_var = (lerp((_HighColor_Tex_var.rgb*_HighColor.rgb), ((_HighColor_Tex_var.rgb*_HighColor.rgb)*Set_LightColor), _Is_LightColor_HighColor)*_TweakHighColorMask_var); - finalColor = finalColor + lerp(lerp(_HighColor_var, (_HighColor_var*((1.0 - Set_FinalShadowMask) + (Set_FinalShadowMask*_TweakHighColorOnShadow))), _Is_UseTweakHighColorOnShadow), float3(0, 0, 0), _Is_Filter_HiCutPointLightColor); - finalColor = SATURATE_IF_SDR(finalColor); - pointLightColor += finalColor; - // pointLightColor += lightColor; - } - UTS_LIGHT_LOOP_END - #endif + // #ifdef _ADDITIONAL_LIGHTS + // int pixelLightCount = GetAdditionalLightsCount(); + // + // #if USE_FORWARD_PLUS + // for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++) + // { + // FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK + // int iLight = lightIndex; + // // if (iLight != i.mainLightID) + // { + // float notDirectional = 1.0f; //_WorldSpaceLightPos0.w of the legacy code. + // + // UtsLight additionalLight = GetUrpMainUtsLight(0,0); + // additionalLight = GetAdditionalUtsLight(iLight, inputData.positionWS,i.positionCS); + // half3 additionalLightColor = GetLightColor(additionalLight); + // // attenuation = light.distanceAttenuation; + // + // + // float3 lightDirection = additionalLight.direction; + // //v.2.0.5: + // float3 addPassLightColor = (0.5*dot(lerp(i.normalDir, normalDirection, _Is_NormalMapToBase), lightDirection) + 0.5) * additionalLightColor.rgb; + // float pureIntencity = max(0.001, (0.299*additionalLightColor.r + 0.587*additionalLightColor.g + 0.114*additionalLightColor.b)); + // float3 lightColor = max(float3(0.0,0.0,0.0), lerp(addPassLightColor, lerp(float3(0.0,0.0,0.0), min(addPassLightColor, addPassLightColor / pureIntencity), notDirectional), _Is_Filter_LightColor)); + // float3 halfDirection = normalize(viewDirection + lightDirection); // has to be recalced here. + // + // //v.2.0.5: + // float baseColorStep = saturate(_BaseColor_Step + _StepOffset); + // float shadeColorStep = saturate(_ShadeColor_Step + _StepOffset); + // // + // //v.2.0.5: If Added lights is directional, set 0 as _LightIntensity + // float _LightIntensity = lerp(0, (0.299*additionalLightColor.r + 0.587*additionalLightColor.g + 0.114*additionalLightColor.b), notDirectional); + // //v.2.0.5: Filtering the high intensity zone of PointLights + // float3 Set_LightColor = lightColor; + // // + // float3 Set_BaseColor = lerp((_BaseColor.rgb*_MainTex_var.rgb*_LightIntensity), ((_BaseColor.rgb*_MainTex_var.rgb)*Set_LightColor), _Is_LightColor_Base); + // //v.2.0.5 + // int n1st_ShadeMapArrID = _1st_ShadeMapArr_ID; + // float4 _1st_ShadeMap_var = lerp(SAMPLE_1ST_SHADEMAP(TRANSFORM_TEX(Set_UV0, _1st_ShadeMap), n1st_ShadeMapArrID), float4(Set_BaseColor.rgb, _MainTex_var.a), _Use_BaseAs1st); + // float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb*_1st_ShadeMap_var.rgb*_LightIntensity), ((_1st_ShadeColor.rgb*_1st_ShadeMap_var.rgb)*Set_LightColor), _Is_LightColor_1st_Shade); + // //v.2.0.5 + // int n2nd_ShadeMapArrID = _2nd_ShadeMapArr_ID; + // float4 _2nd_ShadeMap_var = lerp(SAMPLE_2ND_SHADEMAP(TRANSFORM_TEX(Set_UV0, _2nd_ShadeMap), n2nd_ShadeMapArrID), _1st_ShadeMap_var, _Use_1stAs2nd); + // float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb*_2nd_ShadeMap_var.rgb*_LightIntensity), ((_2nd_ShadeColor.rgb*_2nd_ShadeMap_var.rgb)*Set_LightColor), _Is_LightColor_2nd_Shade); + // float _HalfLambert_var = 0.5*dot(lerp(i.normalDir, normalDirection, _Is_NormalMapToBase), lightDirection) + 0.5; + // + // + // int nSet_2nd_ShadePositionArrID = _Set_2nd_ShadePositionArr_ID; + // float4 _Set_2nd_ShadePosition_var = SAMPLE_SET_2ND_SHADEPOSITION(TRANSFORM_TEX(Set_UV0, _Set_2nd_ShadePosition), nSet_2nd_ShadePositionArrID); + // + // int nSet_1st_ShadePositionArrID = _Set_1st_ShadePositionArr_ID; + // float4 _Set_1st_ShadePosition_var = SAMPLE_SET_1ST_SHADEPOSITION(TRANSFORM_TEX(Set_UV0, _Set_1st_ShadePosition), nSet_1st_ShadePositionArrID); + // + // //v.2.0.5: + // float Set_FinalShadowMask = saturate((1.0 + ((lerp(_HalfLambert_var, (_HalfLambert_var*saturate(1.0 + _Tweak_SystemShadowsLevel)), _Set_SystemShadowsToBase) - (baseColorStep - _BaseShade_Feather)) * ((1.0 - _Set_1st_ShadePosition_var.rgb).r - 1.0)) / (baseColorStep - (baseColorStep - _BaseShade_Feather)))); + // //Composition: 3 Basic Colors as finalColor + // float3 finalColor = lerp(Set_BaseColor, lerp(Set_1st_ShadeColor, Set_2nd_ShadeColor, saturate((1.0 + ((_HalfLambert_var - (shadeColorStep - _1st2nd_Shades_Feather)) * ((1.0 - _Set_2nd_ShadePosition_var.rgb).r - 1.0)) / (shadeColorStep - (shadeColorStep - _1st2nd_Shades_Feather))))), Set_FinalShadowMask); // Final Color + // + // //v.2.0.6: Add HighColor if _Is_Filter_HiCutPointLightColor is False + // int nSet_HighColorMaskArrID = _Set_HighColorMaskArr_ID; + // float4 _Set_HighColorMask_var = SAMPLE_HIGHCOLORMASK(TRANSFORM_TEX(Set_UV0, _Set_HighColorMask), nSet_HighColorMaskArrID); + // float _Specular_var = 0.5*dot(halfDirection, lerp(i.normalDir, normalDirection, _Is_NormalMapToHighColor)) + 0.5; // Specular + // float _TweakHighColorMask_var = (saturate((_Set_HighColorMask_var.g + _Tweak_HighColorMaskLevel))*lerp((1.0 - step(_Specular_var, (1.0 - pow(_HighColor_Power, 5)))), pow(_Specular_var, exp2(lerp(11, 1, _HighColor_Power))), _Is_SpecularToHighColor)); + // + // int nHighColor_TeArrID = _HighColor_TexArr_ID; + // float4 _HighColor_Tex_var = SAMPLE_HIGHCOLOR(TRANSFORM_TEX(Set_UV0, _HighColor_Tex), nHighColor_TeArrID); + // float3 _HighColor_var = (lerp((_HighColor_Tex_var.rgb*_HighColor.rgb), ((_HighColor_Tex_var.rgb*_HighColor.rgb)*Set_LightColor), _Is_LightColor_HighColor)*_TweakHighColorMask_var); + // finalColor = finalColor + lerp(lerp(_HighColor_var, (_HighColor_var*((1.0 - Set_FinalShadowMask) + (Set_FinalShadowMask*_TweakHighColorOnShadow))), _Is_UseTweakHighColorOnShadow), float3(0, 0, 0), _Is_Filter_HiCutPointLightColor); + // finalColor = SATURATE_IF_SDR(finalColor); + // pointLightColor += finalColor; + // } + // } + // #endif // USE_FORWARD_PLUS + // + // // determine main light inorder to apply light culling + // // when the loop counter start from negative value, MAINLIGHT_IS_MAINLIGHT = -1, some compiler doesn't work well. + // // for (int iLight = MAINLIGHT_IS_MAINLIGHT; iLight < pixelLightCount ; ++iLight) + // UTS_LIGHT_LOOP_BEGIN(pixelLightCount - MAINLIGHT_IS_MAINLIGHT) + // #if USE_FORWARD_PLUS + // int iLight = lightIndex; + // #else + // int iLight = loopCounter + MAINLIGHT_IS_MAINLIGHT; + // if (iLight != i.mainLightID) + // #endif + // { + // float notDirectional = 1.0f; //_WorldSpaceLightPos0.w of the legacy code. + // + // UtsLight additionalLight = GetUrpMainUtsLight(0,0); + // if (iLight != -1) + // { + // additionalLight = GetAdditionalUtsLight(iLight, inputData.positionWS,i.positionCS); + // } + // half3 additionalLightColor = GetLightColor(additionalLight); + // // attenuation = light.distanceAttenuation; + // + // + // float3 lightDirection = additionalLight.direction; + // //v.2.0.5: + // float3 addPassLightColor = (0.5*dot(lerp(i.normalDir, normalDirection, _Is_NormalMapToBase), lightDirection) + 0.5) * additionalLightColor.rgb; + // float pureIntencity = max(0.001, (0.299*additionalLightColor.r + 0.587*additionalLightColor.g + 0.114*additionalLightColor.b)); + // float3 lightColor = max(float3(0.0,0.0,0.0), lerp(addPassLightColor, lerp(float3(0.0,0.0,0.0), min(addPassLightColor, addPassLightColor / pureIntencity), notDirectional), _Is_Filter_LightColor)); + // float3 halfDirection = normalize(viewDirection + lightDirection); // has to be recalced here. + // + // //v.2.0.5: + // float baseColorStep = saturate(_BaseColor_Step + _StepOffset); + // float shadeColorStep = saturate(_ShadeColor_Step + _StepOffset); + // // + // //v.2.0.5: If Added lights is directional, set 0 as _LightIntensity + // float _LightIntensity = lerp(0, (0.299*additionalLightColor.r + 0.587*additionalLightColor.g + 0.114*additionalLightColor.b), notDirectional); + // //v.2.0.5: Filtering the high intensity zone of PointLights + // float3 Set_LightColor = lightColor; + // // + // float3 Set_BaseColor = lerp((_BaseColor.rgb*_MainTex_var.rgb*_LightIntensity), ((_BaseColor.rgb*_MainTex_var.rgb)*Set_LightColor), _Is_LightColor_Base); + // //v.2.0.5 + // int n1st_ShadeMapArrID = _1st_ShadeMapArr_ID; + // float4 _1st_ShadeMap_var = lerp(SAMPLE_1ST_SHADEMAP(TRANSFORM_TEX(Set_UV0, _1st_ShadeMap), n1st_ShadeMapArrID), float4(Set_BaseColor.rgb, _MainTex_var.a), _Use_BaseAs1st); + // float3 Set_1st_ShadeColor = lerp((_1st_ShadeColor.rgb*_1st_ShadeMap_var.rgb*_LightIntensity), ((_1st_ShadeColor.rgb*_1st_ShadeMap_var.rgb)*Set_LightColor), _Is_LightColor_1st_Shade); + // //v.2.0.5 + // int n2nd_ShadeMapArrID = _2nd_ShadeMapArr_ID; + // float4 _2nd_ShadeMap_var = lerp(SAMPLE_2ND_SHADEMAP(TRANSFORM_TEX(Set_UV0, _2nd_ShadeMap), n2nd_ShadeMapArrID), _1st_ShadeMap_var, _Use_1stAs2nd); + // float3 Set_2nd_ShadeColor = lerp((_2nd_ShadeColor.rgb*_2nd_ShadeMap_var.rgb*_LightIntensity), ((_2nd_ShadeColor.rgb*_2nd_ShadeMap_var.rgb)*Set_LightColor), _Is_LightColor_2nd_Shade); + // float _HalfLambert_var = 0.5*dot(lerp(i.normalDir, normalDirection, _Is_NormalMapToBase), lightDirection) + 0.5; + // + // int nSet_2nd_ShadePositionArrID = _Set_2nd_ShadePositionArr_ID; + // float4 _Set_2nd_ShadePosition_var = SAMPLE_SET_2ND_SHADEPOSITION(TRANSFORM_TEX(Set_UV0, _Set_2nd_ShadePosition), nSet_2nd_ShadePositionArrID); + // + // int nSet_1st_ShadePositionArrID = _Set_1st_ShadePositionArr_ID; + // float4 _Set_1st_ShadePosition_var = SAMPLE_SET_1ST_SHADEPOSITION(TRANSFORM_TEX(Set_UV0, _Set_1st_ShadePosition), nSet_1st_ShadePositionArrID); + // + // //v.2.0.5: + // float Set_FinalShadowMask = saturate((1.0 + ((lerp(_HalfLambert_var, (_HalfLambert_var*saturate(1.0 + _Tweak_SystemShadowsLevel)), _Set_SystemShadowsToBase) - (baseColorStep - _BaseShade_Feather)) * ((1.0 - _Set_1st_ShadePosition_var.rgb).r - 1.0)) / (baseColorStep - (baseColorStep - _BaseShade_Feather)))); + // //Composition: 3 Basic Colors as finalColor + // float3 finalColor = lerp(Set_BaseColor, lerp(Set_1st_ShadeColor, Set_2nd_ShadeColor, saturate((1.0 + ((_HalfLambert_var - (shadeColorStep - _1st2nd_Shades_Feather)) * ((1.0 - _Set_2nd_ShadePosition_var.rgb).r - 1.0)) / (shadeColorStep - (shadeColorStep - _1st2nd_Shades_Feather))))), Set_FinalShadowMask); // Final Color + // + // //v.2.0.6: Add HighColor if _Is_Filter_HiCutPointLightColor is False + // int nSet_HighColorMaskArrID = _Set_HighColorMaskArr_ID; + // float4 _Set_HighColorMask_var = SAMPLE_HIGHCOLORMASK(TRANSFORM_TEX(Set_UV0, _Set_HighColorMask), nSet_HighColorMaskArrID); + // + // float _Specular_var = 0.5*dot(halfDirection, lerp(i.normalDir, normalDirection, _Is_NormalMapToHighColor)) + 0.5; // Specular + // float _TweakHighColorMask_var = (saturate((_Set_HighColorMask_var.g + _Tweak_HighColorMaskLevel))*lerp((1.0 - step(_Specular_var, (1.0 - pow(_HighColor_Power, 5)))), pow(_Specular_var, exp2(lerp(11, 1, _HighColor_Power))), _Is_SpecularToHighColor)); + // + // int nHighColor_TexArrID = _HighColor_TexArr_ID; + // float4 _HighColor_Tex_var = SAMPLE_HIGHCOLOR(TRANSFORM_TEX(Set_UV0, _HighColor_Tex), nHighColor_TexArrID); + // float3 _HighColor_var = (lerp((_HighColor_Tex_var.rgb*_HighColor.rgb), ((_HighColor_Tex_var.rgb*_HighColor.rgb)*Set_LightColor), _Is_LightColor_HighColor)*_TweakHighColorMask_var); + // finalColor = finalColor + lerp(lerp(_HighColor_var, (_HighColor_var*((1.0 - Set_FinalShadowMask) + (Set_FinalShadowMask*_TweakHighColorOnShadow))), _Is_UseTweakHighColorOnShadow), float3(0, 0, 0), _Is_Filter_HiCutPointLightColor); + // finalColor = SATURATE_IF_SDR(finalColor); + // pointLightColor += finalColor; + // // pointLightColor += lightColor; + // } + // UTS_LIGHT_LOOP_END + // #endif //v.2.0.7 diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails.meta new file mode 100644 index 0000000000..d43687db10 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 65cfb8ad2ea7401b8966584aa6f25607 +timeCreated: 1724251734 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/ECSThumbnailProvider.cs b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/ECSThumbnailProvider.cs similarity index 81% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/ECSThumbnailProvider.cs rename to Explorer/Assets/DCL/AvatarRendering/Thumbnails/ECSThumbnailProvider.cs index 32a3d71d84..54f572975c 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/ECSThumbnailProvider.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/ECSThumbnailProvider.cs @@ -1,17 +1,27 @@ using Arch.Core; +using AssetManagement; using Cysharp.Threading.Tasks; -using DCL.AvatarRendering.Wearables.Components; -using DCL.AvatarRendering.Wearables.Helpers; using ECS; using ECS.Prioritization.Components; using System.Threading; using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.AvatarRendering.Thumbnails.Utils; +using DCL.Diagnostics; using DCL.WebRequests; +using ECS.StreamableLoading.AssetBundles; +using ECS.StreamableLoading.Common.Components; +using ECS.StreamableLoading.Textures; +using SceneRunner.Scene; +using System; using UnityEngine; +using Utility; using ThumbnailPromise = ECS.StreamableLoading.Common.AssetPromise; +using IAvatarAttachment = DCL.AvatarRendering.Loading.Components.IAvatarAttachment; +using Promise = ECS.StreamableLoading.Common.AssetPromise; using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; - namespace DCL.AvatarRendering.Wearables { public class ECSThumbnailProvider : IThumbnailProvider @@ -20,7 +30,6 @@ public class ECSThumbnailProvider : IThumbnailProvider private readonly World world; private readonly URLDomain assetBundleURL; private readonly IWebRequestController requestController; - public ECSThumbnailProvider(IRealmData realmData, World world, URLDomain assetBundleURL, IWebRequestController requestController) @@ -37,6 +46,7 @@ public ECSThumbnailProvider(IRealmData realmData, return avatarAttachment.ThumbnailAssetResult.Value.Asset; bool promiseAlreadyCreated = false; + world.Query(in new QueryDescription().WithAll(), (ref IAvatarAttachment attachment, ref AssetBundlePromise promise) => { @@ -48,7 +58,7 @@ public ECSThumbnailProvider(IRealmData realmData, // if the promise was created before, we should not override its cancellation if (!promiseAlreadyCreated) { - await WearableComponentsUtils.CreateWearableThumbnailABPromiseAsync( + await LoadThumbnailsUtils.CreateWearableThumbnailABPromiseAsync( requestController, assetBundleURL, realmData, @@ -58,7 +68,6 @@ await WearableComponentsUtils.CreateWearableThumbnailABPromiseAsync( CancellationTokenSource.CreateLinkedTokenSource(ct)); } - // We dont create an async task from the promise since it needs to be consumed at the proper system, not here // The promise's result will eventually get replicated into the avatar attachment await UniTask.WaitWhile(() => avatarAttachment.ThumbnailAssetResult == null, cancellationToken: ct); diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/ECSThumbnailProvider.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/ECSThumbnailProvider.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/ECSThumbnailProvider.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Thumbnails/ECSThumbnailProvider.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/IThumbnailProvider.cs b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/IThumbnailProvider.cs similarity index 84% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/IThumbnailProvider.cs rename to Explorer/Assets/DCL/AvatarRendering/Thumbnails/IThumbnailProvider.cs index f9b437f631..721949754b 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/IThumbnailProvider.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/IThumbnailProvider.cs @@ -1,5 +1,5 @@ using Cysharp.Threading.Tasks; -using DCL.AvatarRendering.Wearables.Components; +using DCL.AvatarRendering.Loading.Components; using System.Threading; using UnityEngine; diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/IThumbnailProvider.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/IThumbnailProvider.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/IThumbnailProvider.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Thumbnails/IThumbnailProvider.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Systems.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Systems.meta new file mode 100644 index 0000000000..9d692d86eb --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Systems.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c8e7a5859ae94ab69f3720526c42487f +timeCreated: 1724251798 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveAvatarAttachmentThumbnailSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Systems/ResolveAvatarAttachmentThumbnailSystem.cs similarity index 71% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveAvatarAttachmentThumbnailSystem.cs rename to Explorer/Assets/DCL/AvatarRendering/Thumbnails/Systems/ResolveAvatarAttachmentThumbnailSystem.cs index 5208b18085..7ab9dba75e 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveAvatarAttachmentThumbnailSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Systems/ResolveAvatarAttachmentThumbnailSystem.cs @@ -2,8 +2,8 @@ using Arch.System; using Arch.SystemGroups; using Arch.SystemGroups.DefaultSystemGroups; -using DCL.AvatarRendering.Wearables.Components; -using DCL.AvatarRendering.Wearables.Helpers; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Thumbnails.Utils; using DCL.Diagnostics; using ECS.Abstract; using ECS.StreamableLoading.Common.Components; @@ -12,7 +12,7 @@ using Promise = ECS.StreamableLoading.Common.AssetPromise; using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; -namespace DCL.AvatarRendering.Wearables.Systems +namespace DCL.AvatarRendering.Thumbnails.Systems { [UpdateInGroup(typeof(PresentationSystemGroup))] [LogCategory(ReportCategory.WEARABLE)] @@ -27,36 +27,30 @@ protected override void Update(float t) } [Query] - private void CompleteWearableABThumbnailDownload(in Entity entity, ref IAvatarAttachment wearable, ref AssetBundlePromise promise) + private void CompleteWearableABThumbnailDownload(Entity entity, ref IAvatarAttachment wearable, ref AssetBundlePromise promise) { - if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested) - { - World.Destroy(entity); + if (promise.TryForgetWithEntityIfCancelled(entity, World!)) return; - } if (promise.TryConsume(World, out var result)) { var sprite = result.Asset?.GetMainAsset(); + wearable.ThumbnailAssetResult = new StreamableLoadingResult( result.Succeeded ? Sprite.Create(sprite, new Rect(0, 0, sprite.width, sprite.height), VectorUtilities.OneHalf, 50, 0, SpriteMeshType.FullRect, Vector4.one, false) - : WearableComponentsUtils.DEFAULT_THUMBNAIL); + : LoadThumbnailsUtils.DEFAULT_THUMBNAIL); + World.Destroy(entity); } - } - [Query] - private void CompleteWearableThumbnailDownload(in Entity entity, ref IAvatarAttachment wearable, ref Promise promise) + private void CompleteWearableThumbnailDownload(Entity entity, ref IAvatarAttachment wearable, ref Promise promise) { - if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested) - { - World.Destroy(entity); + if (promise.TryForgetWithEntityIfCancelled(entity, World!)) return; - } if (promise.TryConsume(World, out StreamableLoadingResult result)) { @@ -64,7 +58,8 @@ private void CompleteWearableThumbnailDownload(in Entity entity, ref IAvatarAtta result.Succeeded ? Sprite.Create(result.Asset, new Rect(0, 0, result.Asset!.width, result.Asset.height), VectorUtilities.OneHalf, 50, 0, SpriteMeshType.FullRect, Vector4.one, false) - : WearableComponentsUtils.DEFAULT_THUMBNAIL); + : LoadThumbnailsUtils.DEFAULT_THUMBNAIL); + World.Destroy(entity); } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveAvatarAttachmentThumbnailSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Systems/ResolveAvatarAttachmentThumbnailSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveAvatarAttachmentThumbnailSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Thumbnails/Systems/ResolveAvatarAttachmentThumbnailSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests.meta new file mode 100644 index 0000000000..b9ec077fee --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b62e2e203c3544ab85c9c8543a22fd2c +timeCreated: 1724252314 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/ResolveWearableThumbnailSystemShould.cs b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/ResolveWearableThumbnailSystemShould.cs similarity index 52% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/ResolveWearableThumbnailSystemShould.cs rename to Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/ResolveWearableThumbnailSystemShould.cs index b4ae3094a4..aaf4605cbd 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/ResolveWearableThumbnailSystemShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/ResolveWearableThumbnailSystemShould.cs @@ -1,17 +1,19 @@ using CommunicationData.URLHelpers; +using DCL.AvatarRendering.AvatarShape.Tests.EditMode; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.AvatarRendering.Thumbnails.Systems; using DCL.AvatarRendering.Wearables.Components; -using DCL.AvatarRendering.Wearables.Components.Intentions; using DCL.AvatarRendering.Wearables.Helpers; -using DCL.AvatarRendering.Wearables.Systems; using ECS; using ECS.Prioritization.Components; using ECS.SceneLifeCycle.Tests; using ECS.StreamableLoading.Common.Components; using ECS.StreamableLoading.Textures; using ECS.TestSuite; -using NSubstitute; using NUnit.Framework; -using SceneRunner.Scene; +using System.Collections.Generic; using Promise = ECS.StreamableLoading.Common.AssetPromise; namespace DCL.AvatarRendering.Wearables.Tests @@ -22,38 +24,47 @@ public class ResolveWearableThumbnailSystemShould : UnitySystemTestBase(new WearableRegularAsset(null, null, null)); + wearableStorage = new WearableStorage(); + mockedDefaultAB = new StreamableLoadingResult(new AttachmentRegularAsset(null, null, null)); IWearable mockDefaultWearable = CreateMockWearable(defaultWearableUrn, false); - wearableCache.wearablesCache.Add(mockDefaultWearable.GetUrn(), mockDefaultWearable); + wearableStorage.wearablesCache.Add(mockDefaultWearable.GetUrn(), mockDefaultWearable); realmData = new RealmData(new TestIpfsRealm()); system = new ResolveAvatarAttachmentThumbnailSystem(world); } - private StreamableLoadingResult mockedDefaultAB; + private StreamableLoadingResult mockedDefaultAB; private readonly string defaultWearableUrn = "urn:decentraland:off-chain:base-avatars:green_hoodie"; private readonly string unisexTestUrn = "urn:decentraland:off-chain:base-avatars:red_hoodie_unisex"; - private WearableCache wearableCache; + private WearableStorage wearableStorage; private RealmData realmData; - private IWearable CreateMockWearable(URN urn, bool isUnisex) - { - IWearable wearable = Substitute.For(); - wearable.GetUrn().Returns(urn); - wearable.IsUnisex().Returns(isUnisex); - wearable.GetCategory().Returns(WearablesConstants.Categories.UPPER_BODY); - wearable.GetThumbnail().Returns(new URLPath("bafybeie7lzqakerm4n4x7557g3va4sv7aeoniexlomdgjskuoubo6s3mku")); - wearable.WearableDTO.Returns(new StreamableLoadingResult(new WearableDTO { id = urn })); - return wearable; - } + private static IWearable CreateMockWearable(URN urn, bool isUnisex) => + new FakeWearable( + new WearableDTO + { + metadata = new WearableDTO.WearableMetadataDto + { + id = urn, + thumbnail = "bafybeie7lzqakerm4n4x7557g3va4sv7aeoniexlomdgjskuoubo6s3mku", + data = + { + representations = isUnisex + ? new AvatarAttachmentDTO.Representation[] { new (), new () } + : new AvatarAttachmentDTO.Representation[] { new () }, + category = WearablesConstants.Categories.UPPER_BODY, + }, + }, + }, + model: new StreamableLoadingResult(new WearableDTO { id = urn }) + ); [Test] public void ResolveWearableThumbnail() { //Arrange IWearable mockedWearable = CreateMockWearable(unisexTestUrn, false); - wearableCache.wearablesCache.Add(mockedWearable.GetUrn(), mockedWearable); + wearableStorage.wearablesCache.Add(mockedWearable.GetUrn(), mockedWearable); var urlBuilder = new URLBuilder(); urlBuilder.AppendDomain(realmData.Ipfs.ContentBaseUrl).AppendPath(mockedWearable.GetThumbnail()); diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/ResolveWearableThumbnailSystemShould.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/ResolveWearableThumbnailSystemShould.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/ResolveWearableThumbnailSystemShould.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/ResolveWearableThumbnailSystemShould.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/Thumbnails.Tests.asmref b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/Thumbnails.Tests.asmref new file mode 100644 index 0000000000..9c56917b75 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/Thumbnails.Tests.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:da80994a355e49d5b84f91c0a84a721f" +} \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/Thumbnails.Tests.asmref.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/Thumbnails.Tests.asmref.meta new file mode 100644 index 0000000000..93b671043b --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/Thumbnails.Tests.asmref.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8d4e96dc66ca4113a5280b44bc1ddc74 +timeCreated: 1724252326 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/csc.rsp b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/csc.rsp.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/csc.rsp.meta new file mode 100644 index 0000000000..d7ef8b9e59 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Tests/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 48ed40d61924433a9592bea87dc71b03 +timeCreated: 1724252326 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Thumbnails.asmdef b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Thumbnails.asmdef new file mode 100644 index 0000000000..2cdd103fcf --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Thumbnails.asmdef @@ -0,0 +1,34 @@ +{ + "name": "Thumbnails", + "rootNamespace": "", + "references": [ + "GUID:9e314663ce958b746873cb22d57ede55", + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:286980af24684da6acc1caa413039811", + "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", + "GUID:fa7b3fdbb04d67549916da7bd2af58ab", + "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3c7b57a14671040bd8c549056adc04f5", + "GUID:e0eedfa2deb9406daf86fd8368728e39", + "GUID:8322ea9340a544c59ddc56d4793eac74", + "GUID:4794e238ed0f65142a4aea5848b513e5", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", + "GUID:275e22790c04e9b47a5085d7b0c4432a", + "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", + "GUID:b46779583a009f04ba9f5f31d0e7e6ac", + "GUID:56e8195b069a4dca9c4c4f313c65f526", + "GUID:e25ef972de004615a22937e739de2def", + "GUID:5ab29fa8ae5769b49ab29e390caca7a4", + "GUID:91cf8206af184dac8e30eb46747e9939", + "GUID:543b8f091a5947a3880b7f2bca2358bd" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Thumbnails.asmdef.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Thumbnails.asmdef.meta new file mode 100644 index 0000000000..ea1ecc51a4 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Thumbnails.asmdef.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e5a23cdae0ef4d86aafc237a73280975 +timeCreated: 1724251744 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils.meta new file mode 100644 index 0000000000..a4da6e4e05 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 75e95923f1f64ad789c7c3eac7fa277a +timeCreated: 1724252226 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils/LoadThumbnailsUtils.cs b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils/LoadThumbnailsUtils.cs new file mode 100644 index 0000000000..f5e6c59931 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils/LoadThumbnailsUtils.cs @@ -0,0 +1,131 @@ +using Arch.Core; +using AssetManagement; +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.Diagnostics; +using DCL.Optimization.Pools; +using DCL.WebRequests; +using ECS; +using ECS.Prioritization.Components; +using ECS.StreamableLoading.AssetBundles; +using ECS.StreamableLoading.Common.Components; +using ECS.StreamableLoading.Textures; +using SceneRunner.Scene; +using System; +using System.Threading; +using UnityEngine; +using Utility; +using Promise = ECS.StreamableLoading.Common.AssetPromise; +using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; + +namespace DCL.AvatarRendering.Thumbnails.Utils +{ + public static class LoadThumbnailsUtils + { + internal static readonly Sprite DEFAULT_THUMBNAIL = Sprite.Create(Texture2D.grayTexture!, new Rect(0, 0, 1, 1), new Vector2())!; + private static readonly IExtendedObjectPool URL_BUILDER_POOL = new ExtendedObjectPool(() => new URLBuilder(), defaultCapacity: 2); + + public static async UniTask LoadAssetBundleManifestAsync(IWebRequestController webRequestController, URLDomain assetBundleURL, + string hash, ReportData reportCategory, CancellationToken ct) + { + using var scope = URL_BUILDER_POOL.Get(out var urlBuilder); + urlBuilder!.Clear(); + + urlBuilder.AppendDomain(assetBundleURL) + .AppendSubDirectory(URLSubdirectory.FromString("manifest")) + .AppendPath(URLPath.FromString($"{hash}{PlatformUtils.GetCurrentPlatform()}.json")); + + var sceneAbDto = await webRequestController.GetAsync(new CommonArguments(urlBuilder.Build(), attemptsCount: 1), ct, reportCategory) + .CreateFromJson(WRJsonParser.Unity, WRThreadFlags.SwitchBackToMainThread); + + return new SceneAssetBundleManifest(assetBundleURL, sceneAbDto.Version, sceneAbDto.Files); + } + + private static async UniTask TryResolveAssetBundleManifestAsync(IWebRequestController requestController, URLDomain assetBundleURL, IAvatarAttachment attachment, CancellationTokenSource? cancellationTokenSource) + { + if (attachment.ManifestResult?.Asset == null) + try + { + var asset = await LoadAssetBundleManifestAsync(requestController, assetBundleURL, attachment.DTO.GetHash(), ReportCategory.WEARABLE, cancellationTokenSource?.Token ?? CancellationToken.None); + attachment.ManifestResult = new StreamableLoadingResult(asset); + } + catch (Exception) { return false; } + + return true; + } + + private static void CreateWearableThumbnailTexturePromise( + IRealmData realmData, + URLPath thumbnailPath, + IAvatarAttachment attachment, + World world, + IPartitionComponent partitionComponent, + CancellationTokenSource? cancellationTokenSource = null + ) + { + using var urlBuilderScope = URL_BUILDER_POOL.AutoScope(); + var urlBuilder = urlBuilderScope.Value; + urlBuilder.Clear(); + urlBuilder.AppendDomain(realmData.Ipfs.ContentBaseUrl).AppendPath(thumbnailPath); + + var promise = Promise.Create(world, + new GetTextureIntention + { + // If cancellation token source was not provided a new one will be created + CommonArguments = new CommonLoadingArguments(urlBuilder.Build(), cancellationTokenSource: cancellationTokenSource), + }, + partitionComponent); + + world.Create(attachment, promise, partitionComponent); + } + + public static async UniTask CreateWearableThumbnailABPromiseAsync( + IWebRequestController requestController, + URLDomain assetBundleURL, + IRealmData realmData, + IAvatarAttachment attachment, + World world, + IPartitionComponent partitionComponent, + CancellationTokenSource? cancellationTokenSource = null + ) + { + if (attachment.ThumbnailAssetResult != null) + return; + + URLPath thumbnailPath = attachment.GetThumbnail(); + + if (thumbnailPath.IsEmpty()) + { + attachment.ThumbnailAssetResult = new StreamableLoadingResult(DEFAULT_THUMBNAIL); + return; + } + + if (!await TryResolveAssetBundleManifestAsync(requestController, assetBundleURL, attachment, cancellationTokenSource)) + { + ReportHub.Log( + ReportCategory.THUMBNAILS, + $"Cannot load the thumbnail of the wearable {attachment.GetUrn()} {attachment.DTO.GetHash()} since it doesnt have an AB manifest. " + + "Trying to get the texture through content server" + ); + + CreateWearableThumbnailTexturePromise(realmData, thumbnailPath, attachment, world, partitionComponent, cancellationTokenSource); + return; + } + + var promise = AssetBundlePromise.Create( + world, + GetAssetBundleIntention.FromHash( + typeof(Texture2D), + hash: thumbnailPath.Value + PlatformUtils.GetCurrentPlatform(), + permittedSources: AssetSource.ALL, + manifest: attachment.ManifestResult?.Asset, + cancellationTokenSource: cancellationTokenSource ?? new CancellationTokenSource() + ), + partitionComponent); + + world.Create(attachment, promise, partitionComponent); + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestUtils.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils/LoadThumbnailsUtils.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestUtils.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils/LoadThumbnailsUtils.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/csc.rsp b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/csc.rsp.meta b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/csc.rsp.meta new file mode 100644 index 0000000000..a8598ac432 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f6bbd636afa946aa81c7bbcfcffe1b35 +timeCreated: 1724251744 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/HideWearablesResolution.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/HideWearablesResolution.cs index 4e84fdbde6..f949edf323 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/HideWearablesResolution.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/HideWearablesResolution.cs @@ -1,18 +1,17 @@ -using JetBrains.Annotations; using System.Collections.Generic; namespace DCL.AvatarRendering.Wearables.Components { public struct HideWearablesResolution { - public readonly IReadOnlyCollection ForceRender; + public readonly IReadOnlyCollection? ForceRender; - [CanBeNull] public List VisibleWearables; + public List? VisibleWearables; /// /// This list is calculated on wearables resolution and it's used on avatar instantiation /// - [CanBeNull] public HashSet HiddenCategories; + public HashSet? HiddenCategories; public HideWearablesResolution(IReadOnlyCollection forceRender) { diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.Methods.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.Methods.cs deleted file mode 100644 index eef0a1adb4..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.Methods.cs +++ /dev/null @@ -1,59 +0,0 @@ -using CommunicationData.URLHelpers; -using System.Linq; - -namespace DCL.AvatarRendering.Wearables.Components -{ - public partial interface IAvatarAttachment - { - private const string THUMBNAIL_DEFAULT_KEY = "thumbnail.png"; - - // Methods are part of the interface instead of extensions to enable mocking for tests - - bool TryGetMainFileHash(BodyShape bodyShape, out string? hash) - { - AvatarAttachmentDTO wearableDTO = GetDTO(); - - // The length of arrays is small, so O(N) complexity is fine - // Avoid iterator allocations with "for" loop - for (var i = 0; i < wearableDTO.Metadata.AbstractData.representations.Length; i++) - { - var representation = wearableDTO.Metadata.AbstractData.representations[i]; - - if (representation.bodyShapes.Contains(bodyShape)) - return TryGetContentHashByKey(representation.mainFile, out hash); - } - - hash = null; - return false; - } - - bool TryGetContentHashByKey(string key, out string hash) - { - AvatarAttachmentDTO wearableDTO = GetDTO(); - - for (var i = 0; i < wearableDTO.content.Length; i++) - { - if (wearableDTO.content[i].file == key) - { - hash = wearableDTO.content[i].hash; - return true; - } - } - - hash = null; - return false; - } - - URLPath GetThumbnail() - { - AvatarAttachmentDTO wearableDTO = GetDTO(); - - string thumbnailHash = wearableDTO.Metadata.thumbnail; - - if (thumbnailHash == THUMBNAIL_DEFAULT_KEY && TryGetContentHashByKey(THUMBNAIL_DEFAULT_KEY, out string hash)) - thumbnailHash = hash; - - return new URLPath(thumbnailHash); - } - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.cs deleted file mode 100644 index 27f1900f3a..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IAvatarAttachment.cs +++ /dev/null @@ -1,74 +0,0 @@ -using CommunicationData.URLHelpers; -using ECS.StreamableLoading.Common.Components; -using SceneRunner.Scene; -using UnityEngine; - -namespace DCL.AvatarRendering.Wearables.Components -{ - public partial interface IAvatarAttachment - { - private const string DEFAULT_RARITY = "base"; - - bool IsLoading { get; set; } - - /// - /// Might be never resolved if Wearable is loaded from the Embedded Source - /// - StreamableLoadingResult? ManifestResult { get; set; } - - StreamableLoadingResult? ThumbnailAssetResult { get; set; } - - string GetHash() => - GetDTO().id; - - URN GetUrn() => - GetDTO().Metadata.id; - - string GetName(string langCode = "en") - { - string result = GetDTO().Metadata.name; - - if (GetDTO().Metadata.i18n == null) - return result; - - for (var i = 0; i < GetDTO().Metadata.i18n.Length; i++) - { - if (GetDTO().Metadata.i18n[i].code != langCode) - continue; - - result = GetDTO().Metadata.i18n[i].text; - break; - } - - return result; - } - - string GetCategory() => - GetDTO().Metadata.AbstractData.category; - - string GetDescription() => - GetDTO().Metadata.description; - - string GetRarity() - { - string result = GetDTO().Metadata.rarity ?? DEFAULT_RARITY; - if (string.IsNullOrEmpty(result)) - result = DEFAULT_RARITY; - - return result; - } - - bool IsUnisex() => - GetDTO().Metadata.AbstractData.representations.Length > 1; - - bool IsThirdParty() => - GetUrn().IsThirdPartyCollection(); - - bool IsOnChain(); - - AvatarAttachmentDTO GetDTO(); - - public string ToString() => - $"AvatarAttachment({GetHash()} | {GetUrn()})"; - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IWearable.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IWearable.cs index d5a6d7f99a..04869e730a 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IWearable.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/IWearable.cs @@ -1,16 +1,18 @@ -using DCL.AvatarRendering.Wearables.Helpers; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.AvatarRendering.Wearables.Helpers; using ECS.StreamableLoading.Common.Components; +using SceneRunner.Scene; using System; using System.Collections.Generic; +using UnityEngine; namespace DCL.AvatarRendering.Wearables.Components { - public interface IWearable : IAvatarAttachment + public interface IWearable : IAvatarAttachment { WearableType Type { get; } - StreamableLoadingResult WearableDTO { get; } - /// /// Per [MALE, FEMALE] /// @@ -21,8 +23,6 @@ public interface IWearable : IAvatarAttachment /// bool TryResolveDTO(StreamableLoadingResult result); - void ResolvedFailedDTO(StreamableLoadingResult result); - bool TryGetFileHashConditional(BodyShape bodyShape, Func contentMatch, out string? hash); void GetHidingList(string bodyShapeType, HashSet hideListResult); @@ -30,5 +30,8 @@ public interface IWearable : IAvatarAttachment bool IsCompatibleWithBodyShape(string bodyShape); bool HasSameModelsForAllGenders(); + + public static IWearable NewEmpty() => + new Wearable(); } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearableByParamIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearableByParamIntention.cs index 9610e69739..8c2233f891 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearableByParamIntention.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearableByParamIntention.cs @@ -1,4 +1,5 @@ using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Components; using ECS.StreamableLoading.Common.Components; using System; using System.Collections.Generic; @@ -6,7 +7,7 @@ namespace DCL.AvatarRendering.Wearables.Components.Intentions { - public struct GetWearableByParamIntention : IEquatable, ILoadingIntention + public struct GetWearableByParamIntention : IEquatable, IAttachmentsLoadingIntention { public CancellationTokenSource CancellationTokenSource => CommonArguments.CancellationTokenSource; @@ -19,7 +20,17 @@ public struct GetWearableByParamIntention : IEquatable Results; - public int TotalAmount; + public int TotalAmount { get; private set; } + + public void SetTotal(int total) + { + TotalAmount = total; + } + + public void AppendToResult(IWearable resultElement) + { + Results.Add(resultElement); + } public GetWearableByParamIntention(IReadOnlyList<(string, string)> requestParams, string userID, List results, int totalAmount) { diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearableDTOByPointersIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearableDTOByPointersIntention.cs index 1abc5a3c1b..2ba61f3698 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearableDTOByPointersIntention.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearableDTOByPointersIntention.cs @@ -1,4 +1,6 @@ using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Wearables.Helpers; +using DCL.Profiling; using ECS.StreamableLoading.Common.Components; using System; using System.Collections.Generic; @@ -6,17 +8,31 @@ namespace DCL.AvatarRendering.Wearables.Components.Intentions { - public struct GetWearableDTOByPointersIntention : IEquatable, ILoadingIntention + public struct GetWearableDTOByPointersIntention : IEquatable, IPointersLoadingIntention { + private readonly List pointers; + private bool released; + public CancellationTokenSource CancellationTokenSource => CommonArguments.CancellationTokenSource; public CommonLoadingArguments CommonArguments { get; set; } - public readonly List Pointers; + public readonly IReadOnlyList Pointers + { + get + { + if (released) + throw new Exception("Pointers have been released"); + + return pointers; + } + } public GetWearableDTOByPointersIntention(List pointers, CommonLoadingArguments commonArguments) { - Pointers = pointers; + this.pointers = pointers; CommonArguments = commonArguments; + released = false; + ProfilingCounters.GetWearablesIntentionAmount.Value++; } public bool Equals(GetWearableDTOByPointersIntention other) => @@ -27,5 +43,12 @@ public override bool Equals(object obj) => public override int GetHashCode() => HashCode.Combine(Pointers); + + public void ReleasePointers() + { + released = true; + WearableComponentsUtils.POINTERS_POOL.Release(pointers); + ProfilingCounters.GetWearablesIntentionAmount.Value--; + } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearablesByPointersIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearablesByPointersIntention.cs index ff8d12a4bf..2bca8bd83d 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearablesByPointersIntention.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearablesByPointersIntention.cs @@ -1,5 +1,6 @@ using AssetManagement; using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Components; using DCL.Profiling; using ECS.StreamableLoading.Common.Components; using System; @@ -42,7 +43,6 @@ internal GetWearablesByPointersIntention(List pointers, BodyShape bodyShape public void Dispose() { POINTERS_POOL.Release(Pointers); - ProfilingCounters.GetWearablesIntentionAmount.Value--; } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Wearable.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Wearable.cs index 93cc674243..9717b78937 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Wearable.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Wearable.cs @@ -1,3 +1,6 @@ +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; using DCL.AvatarRendering.Wearables.Helpers; using DCL.Diagnostics; using ECS.StreamableLoading.Common.Components; @@ -25,18 +28,21 @@ public class Wearable : IWearable public WearableAssets[] WearableAssetResults { get; } = new WearableAssets[BodyShape.COUNT]; - public StreamableLoadingResult WearableDTO { get; private set; } + public StreamableLoadingResult Model { get; set; } public StreamableLoadingResult? ThumbnailAssetResult { get; set; } public WearableType Type { get; private set; } - public bool IsLoading { get; set; } = true; + public bool IsLoading { get; private set; } = true; - public Wearable() + public void UpdateLoadingStatus(bool isLoading) { + IsLoading = isLoading; } + public Wearable() { } + public Wearable(StreamableLoadingResult dto) { ResolveDTO(dto); @@ -45,19 +51,19 @@ public Wearable(StreamableLoadingResult dto) public bool IsOnChain() { - var id = ((IAvatarAttachment) this).GetUrn().ToString(); - return !id.StartsWith("urn:decentraland:off-chain:base-avatars:"); + var id = ((IAvatarAttachment)this).GetUrn().ToString(); + bool startsWith = id.StartsWith("urn:decentraland:off-chain:base-avatars:", StringComparison.Ordinal); + return startsWith == false; } - public AvatarAttachmentDTO GetDTO() => - WearableDTO.Asset!; + public AvatarAttachmentDTO DTO => Model.Asset!; public string GetCategory() => - WearableDTO.Asset!.metadata.data.category; + Model.Asset!.metadata.data.category; public bool TryResolveDTO(StreamableLoadingResult result) { - if (WearableDTO.IsInitialized) + if (Model.IsInitialized) return false; ResolveDTO(result); @@ -66,7 +72,7 @@ public bool TryResolveDTO(StreamableLoadingResult result) private void ResolveDTO(StreamableLoadingResult result) { - WearableDTO = result; + Model = result; if (IsFacialFeature()) Type = WearableType.FacialFeature; @@ -76,14 +82,9 @@ private void ResolveDTO(StreamableLoadingResult result) Type = WearableType.Regular; } - public void ResolvedFailedDTO(StreamableLoadingResult result) - { - WearableDTO = result; - } - public bool TryGetFileHashConditional(BodyShape bodyShape, Func contentMatch, out string? hash) { - AvatarAttachmentDTO wearableDTO = GetDTO(); + AvatarAttachmentDTO wearableDTO = DTO; for (var i = 0; i < wearableDTO.Metadata.AbstractData.representations.Length; i++) { @@ -114,7 +115,7 @@ public bool TryGetFileHashConditional(BodyShape bodyShape, Func co public void GetHidingList(string bodyShapeType, HashSet hideListResult) { - AvatarAttachmentDTO dto = GetDTO(); + AvatarAttachmentDTO dto = DTO; AvatarAttachmentDTO.Representation? representation = GetRepresentation(bodyShapeType); AvatarAttachmentDTO.DataBase? data = dto.Metadata.AbstractData; @@ -151,7 +152,7 @@ public void GetHidingList(string bodyShapeType, HashSet hideListResult) public bool IsCompatibleWithBodyShape(string bodyShape) { - foreach (AvatarAttachmentDTO.Representation dataRepresentation in GetDTO().Metadata.AbstractData.representations) + foreach (AvatarAttachmentDTO.Representation dataRepresentation in DTO.Metadata.AbstractData.representations) { if (dataRepresentation.bodyShapes.Contains(bodyShape)) return true; @@ -162,7 +163,7 @@ public bool IsCompatibleWithBodyShape(string bodyShape) public bool HasSameModelsForAllGenders() { - IAvatarAttachment attachment = this; + Loading.Components.IAvatarAttachment attachment = this; attachment.TryGetMainFileHash(BodyShape.MALE, out string? maleHash); attachment.TryGetMainFileHash(BodyShape.FEMALE, out string? femaleHash); @@ -181,7 +182,7 @@ private bool IsFacialFeature() => private AvatarAttachmentDTO.Representation? GetRepresentation(string bodyShapeType) { - AvatarAttachmentDTO dto = GetDTO(); + AvatarAttachmentDTO dto = DTO; foreach (AvatarAttachmentDTO.Representation representation in dto.Metadata.AbstractData.representations) { @@ -195,7 +196,7 @@ private bool IsFacialFeature() => private string[]? GetReplacesList(string bodyShapeType) { AvatarAttachmentDTO.Representation? representation = GetRepresentation(bodyShapeType); - AvatarAttachmentDTO dto = GetDTO(); + AvatarAttachmentDTO dto = DTO; if (representation == null) { @@ -220,7 +221,7 @@ public static HashSet ComposeHiddenCategories(string bodyShapeId, List wearableHidesList = new (StringComparer.OrdinalIgnoreCase); diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/WearableAssets.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/WearableAssets.cs index c79aabae44..17d3719a97 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/WearableAssets.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/WearableAssets.cs @@ -1,4 +1,4 @@ -using DCL.AvatarRendering.Wearables.Helpers; +using DCL.AvatarRendering.Loading.Assets; using ECS.StreamableLoading.Common.Components; using UnityEngine.Assertions; @@ -13,7 +13,7 @@ public struct WearableAssets /// /// If the element is null it's a signal that the intent to load it was not yet created /// - public StreamableLoadingResult?[] Results; + public StreamableLoadingResult?[]? Results; /// /// Whether the results were replaced with default ones @@ -22,17 +22,17 @@ public struct WearableAssets public void AddReference() { - for (var i = 0; i < Results.Length; i++) + for (var i = 0; i < Results?.Length; i++) Results[i]?.Asset?.AddReference(); } /// /// Compatibility with the previous code to create the result with a single asset /// - public static implicit operator WearableAssets(StreamableLoadingResult result) + public static implicit operator WearableAssets(StreamableLoadingResult result) { - Assert.IsTrue(!result.Succeeded || result.Asset is WearableRegularAsset); - return new WearableAssets { Results = new StreamableLoadingResult?[] { result } }; + Assert.IsTrue(!result.Succeeded || result.Asset is AttachmentRegularAsset); + return new WearableAssets { Results = new StreamableLoadingResult?[] { result } }; } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Equipped/EquippedWearables.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Equipped/EquippedWearables.cs index 6aa19afb85..e2191c2260 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Equipped/EquippedWearables.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Equipped/EquippedWearables.cs @@ -1,3 +1,4 @@ +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using System; diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets.meta deleted file mode 100644 index a4bc7da4fc..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: d5b275cff16347949e44f009102865a7 -timeCreated: 1710858645 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/IWearableAssetsCache.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/IWearableAssetsCache.cs deleted file mode 100644 index 3f9d0a42c0..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/Assets/IWearableAssetsCache.cs +++ /dev/null @@ -1,15 +0,0 @@ -using DCL.Optimization.PerformanceBudgeting; - -namespace DCL.AvatarRendering.Wearables.Helpers -{ - public interface IWearableAssetsCache - { - int WearablesAssesCount { get; } - - bool TryGet(WearableAssetBase asset, out CachedWearable instance); - - void Release(CachedWearable cachedWearable); - - void Unload(IPerformanceBudget frameTimeBudget, int maxUnloadAmount); - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DTO/WearableDTO.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DTO/WearableDTO.cs index b8ab879165..b1651eb4c4 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DTO/WearableDTO.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DTO/WearableDTO.cs @@ -1,3 +1,6 @@ +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.DTO; +using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -7,42 +10,45 @@ namespace DCL.AvatarRendering.Wearables.Helpers public class WearableDTO : AvatarAttachmentDTO { [Serializable] - public class WearableMetadataDto : AvatarAttachmentDTO.MetadataBase + public class WearableMetadataDto : MetadataBase { - public DataDto data; - public override AvatarAttachmentDTO.DataBase AbstractData => data; + public DataDto data = new (); + public override DataBase AbstractData => data; [Serializable] - public class DataDto : AvatarAttachmentDTO.DataBase + public class DataDto : DataBase { } } [Serializable] - public struct LambdaResponse + public struct LambdaResponse : IAttachmentLambdaResponse { public List elements; public int totalAmount; + + [JsonIgnore] + public IReadOnlyList Page => elements; + + [JsonIgnore] + public int TotalAmount => totalAmount; } [Serializable] - public struct LambdaResponseElementDto + public class LambdaResponseElementDto : ILambdaResponseElement { public string type; public string urn; public string name; public string category; public WearableDTO entity; - public LambdaResponseIndividualDataDto[] individualData; - } + public ElementIndividualDataDto[] individualData; - [Serializable] - public struct LambdaResponseIndividualDataDto - { - public string id; - public string tokenId; - public string transferredAt; - public string price; + [JsonIgnore] + public WearableDTO Entity => entity; + + [JsonIgnore] + public IReadOnlyList IndividualData => individualData; } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DTO/WearablesDTOList.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DTO/WearablesDTOList.cs index 8a558ac693..5fe103ef03 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DTO/WearablesDTOList.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DTO/WearablesDTOList.cs @@ -1,15 +1,18 @@ -using System.Collections.Generic; +using DCL.AvatarRendering.Loading.Components; namespace DCL.AvatarRendering.Wearables.Helpers { // ReSharper disable once InconsistentNaming - public readonly struct WearablesDTOList + public readonly struct WearablesDTOList : IAttachmentsDTOList { - public readonly IReadOnlyList Value; + private readonly RepoolableList value; - public WearablesDTOList(IReadOnlyList value) + public WearablesDTOList(RepoolableList value) { - Value = value; + this.value = value; } + + public ConsumedList ConsumeAttachments() => + IAttachmentsDTOList.DefaultConsumeAttachments(value); } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DefaultFaceFeaturesHandler.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DefaultFaceFeaturesHandler.cs index 90b56edb46..872aab88eb 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DefaultFaceFeaturesHandler.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/DefaultFaceFeaturesHandler.cs @@ -1,3 +1,5 @@ +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; using System.Collections.Generic; using DCL.WebRequests; using UnityEngine; @@ -6,7 +8,7 @@ namespace DCL.AvatarRendering.Wearables.Helpers { public class DefaultFaceFeaturesHandler : IDefaultFaceFeaturesHandler { - private readonly IWearableCache wearableCache; + private readonly IWearableStorage wearableStorage; private readonly FacialFeaturesTextures[] sharedFacialFeatures = new FacialFeaturesTextures[BodyShape.COUNT]; @@ -14,9 +16,9 @@ public class DefaultFaceFeaturesHandler : IDefaultFaceFeaturesHandler private readonly bool isInitialized = false; - public DefaultFaceFeaturesHandler(IWearableCache wearableCache) + public DefaultFaceFeaturesHandler(IWearableStorage wearableStorage) { - this.wearableCache = wearableCache; + this.wearableStorage = wearableStorage; } public FacialFeaturesTextures GetDefaultFacialFeaturesDictionary(BodyShape bodyShape) @@ -54,7 +56,7 @@ private void Initialize() foreach (string facialFeature in WearablesConstants.FACIAL_FEATURES) { // TODO it's quite dangerous to call it like this without any checks - var result = (WearableTextureAsset) wearableCache.GetDefaultWearable(bodyShape, facialFeature) + var result = (AttachmentTextureAsset) wearableStorage.GetDefaultWearable(bodyShape, facialFeature) .WearableAssetResults[bodyShape] .Results[WearablePolymorphicBehaviour.MAIN_ASSET_INDEX]! .Value.Asset; diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IDefaultFaceFeaturesHandler.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IDefaultFaceFeaturesHandler.cs index 3afa10db45..377a1054d9 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IDefaultFaceFeaturesHandler.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IDefaultFaceFeaturesHandler.cs @@ -1,4 +1,6 @@ -namespace DCL.AvatarRendering.Wearables.Helpers +using DCL.AvatarRendering.Loading.Components; + +namespace DCL.AvatarRendering.Wearables.Helpers { public interface IDefaultFaceFeaturesHandler { diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableCache.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableCache.cs deleted file mode 100644 index 400bea5f43..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableCache.cs +++ /dev/null @@ -1,54 +0,0 @@ -using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables.Components; -using DCL.Optimization.PerformanceBudgeting; -using System.Collections.Generic; - -namespace DCL.AvatarRendering.Wearables.Helpers -{ - /// - /// Defines the functionalities for wearable catalog. Works like cache by storing instances of by string keys. - /// - public interface IWearableCache - { - /// - /// Retrieves a wearable by its DTO or adds a new one if it doesn't exist. - /// - /// The wearable DTO - /// Determines if the wearable should be unloaded when memory is full - /// An instance of the type. - IWearable GetOrAddWearableByDTO(WearableDTO wearableDto, bool qualifiedForUnloading = true); - - /// - /// Adds an empty wearable to the catalog. - /// - /// The loading intention pointer. - /// Determines if the wearable should be unloaded when memory is full - void AddEmptyWearable(URN urn, bool qualifiedForUnloading = true); - - /// - /// Attempts to retrieve a wearable from the catalog. - /// - /// The wearable URN identifier. - /// The wearable instance if found. - /// Returns true if the wearable exists; otherwise, false. - bool TryGetWearable(URN wearableURN, out IWearable wearable); - - /// - /// Retrieves default wearable from the catalog. - /// - /// The body shape. - /// The category. - /// An instance of the type. - IWearable GetDefaultWearable(BodyShape bodyShape, string category); - - /// - /// Unloads the wearable from the catalog by a frame time budget provider. - /// - /// The frame time budget provider. - void Unload(IPerformanceBudget frameTimeBudget); - - void SetOwnedNft(URN nftUrn, NftBlockchainOperationEntry entry); - - bool TryGetOwnedNftRegistry(URN nftUrn, out IReadOnlyDictionary registry); - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableStorage.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableStorage.cs new file mode 100644 index 0000000000..b0375859a1 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableStorage.cs @@ -0,0 +1,20 @@ +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Wearables.Components; + +namespace DCL.AvatarRendering.Wearables.Helpers +{ + /// + /// Defines the functionalities for wearable catalog. Works like cache by storing instances of by string keys. + /// + public interface IWearableStorage : IAvatarElementStorage + { + /// + /// Retrieves default wearable from the catalog. + /// + /// The body shape. + /// The category. + /// An instance of the type. + IWearable? GetDefaultWearable(BodyShape bodyShape, string category); + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableCache.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableStorage.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableCache.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/IWearableStorage.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableCache.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableCache.cs deleted file mode 100644 index 5fe382bd3e..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableCache.cs +++ /dev/null @@ -1,152 +0,0 @@ -using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables.Components; -using DCL.Optimization.PerformanceBudgeting; -using ECS.StreamableLoading.Common.Components; -using System.Collections.Generic; -using Utility.Multithreading; - -namespace DCL.AvatarRendering.Wearables.Helpers -{ - public partial class WearableCache : IWearableCache - { - private readonly LinkedList<(URN key, long lastUsedFrame)> listedCacheKeys = new (); - private readonly Dictionary> cacheKeysDictionary = new (new Dictionary>(), URNIgnoreCaseEqualityComparer.Default); - private readonly Dictionary> ownedNftsRegistry = new (new Dictionary>(), URNIgnoreCaseEqualityComparer.Default); - - internal Dictionary wearablesCache { get; } = new (new Dictionary(), URNIgnoreCaseEqualityComparer.Default); - - public IWearable GetOrAddWearableByDTO(WearableDTO wearableDto, bool qualifiedForUnloading = true) => - TryGetWearable(wearableDto.metadata.id, out IWearable existingWearable) - ? existingWearable - : AddWearable(wearableDto.metadata.id, new Wearable(new StreamableLoadingResult(wearableDto)), qualifiedForUnloading); - - public void AddEmptyWearable(URN urn, bool qualifiedForUnloading = true) - { - AddWearable(urn, new Wearable(), qualifiedForUnloading); - } - - internal IWearable AddWearable(URN urn, IWearable wearable, bool qualifiedForUnloading) - { - wearablesCache.Add(urn, wearable); - - if (qualifiedForUnloading) - cacheKeysDictionary[urn] = - listedCacheKeys.AddLast((urn, MultithreadingUtility.FrameCount)); - - return wearable; - } - - public bool TryGetWearable(URN wearableURN, out IWearable wearable) - { - if (wearablesCache.TryGetValue(wearableURN, out wearable)) - { - UpdateListedCachePriority(@for: wearableURN); - return true; - } - - if (wearablesCache.TryGetValue(wearableURN, out wearable)) - { - UpdateListedCachePriority(@for: wearableURN); - return true; - } - - return false; - } - - public IWearable GetDefaultWearable(BodyShape bodyShape, string category) - { - string wearableURN = WearablesConstants.DefaultWearables.GetDefaultWearable(bodyShape, category); - - UpdateListedCachePriority(wearableURN); - - if (wearablesCache.TryGetValue(wearableURN, out IWearable wearable)) - return wearable; - - if (wearablesCache.TryGetValue(wearableURN, out wearable)) - return wearable; - - return null; - } - - private void UpdateListedCachePriority(URN @for) - { - if (cacheKeysDictionary.TryGetValue(@for, out LinkedListNode<(URN key, long lastUsedFrame)> node)) - { - node.Value = (@for, MultithreadingUtility.FrameCount); - - cacheKeysDictionary[@for] = node; - listedCacheKeys.Remove(node); - listedCacheKeys.AddLast(node); - } - } - - public void Unload(IPerformanceBudget frameTimeBudget) - { - for (LinkedListNode<(URN key, long lastUsedFrame)> node = listedCacheKeys.First; frameTimeBudget.TrySpendBudget() && node != null; node = node.Next) - { - URN urn = node.Value.key; - - if (!wearablesCache.TryGetValue(urn, out IWearable wearable)) - continue; - - if (!TryUnloadAllWearableAssets(wearable)) continue; - - wearablesCache.Remove(urn); - cacheKeysDictionary.Remove(urn); - listedCacheKeys.Remove(node); - } - } - - public void SetOwnedNft(URN nftUrn, NftBlockchainOperationEntry entry) - { - if (!ownedNftsRegistry.TryGetValue(nftUrn, out Dictionary ownedWearableRegistry)) - { - ownedWearableRegistry = new Dictionary(new Dictionary(), - URNIgnoreCaseEqualityComparer.Default); - ownedNftsRegistry[nftUrn] = ownedWearableRegistry; - } - - ownedWearableRegistry[entry.Urn] = entry; - } - - public bool TryGetOwnedNftRegistry(URN nftUrn, out IReadOnlyDictionary registry) - { - bool result = ownedNftsRegistry.TryGetValue(nftUrn, out Dictionary r); - registry = r; - return result; - } - - private static bool TryUnloadAllWearableAssets(IWearable wearable) - { - var countNullOrEmpty = 0; - var assetsCount = 0; - - for (var i = 0; i < wearable.WearableAssetResults.Length; i++) - { - ref var assets = ref wearable.WearableAssetResults[i]; - assetsCount += assets.Results?.Length ?? 0; - - for (var j = 0; j < assets.Results?.Length; j++) - { - StreamableLoadingResult? result = assets.Results[j]; - - if (result is not { Succeeded: true }) - { - countNullOrEmpty++; - continue; - } - - WearableAssetBase? wearableAsset = result.Value.Asset; - - if (wearableAsset is { ReferenceCount: 0 }) - { - wearableAsset.Dispose(); - assets.Results[j] = null; - } - } - } - - return countNullOrEmpty == assetsCount; - } - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableCatalog.Debug.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableCatalog.Debug.cs index 9121a36ed4..1a1d872171 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableCatalog.Debug.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableCatalog.Debug.cs @@ -1,11 +1,12 @@ #if UNITY_EDITOR || DEVELOPMENT_BUILD +using DCL.AvatarRendering.Loading.Assets; using DCL.AvatarRendering.Wearables.Components; using ECS.StreamableLoading.Common.Components; namespace DCL.AvatarRendering.Wearables.Helpers { - public partial class WearableCache + public partial class WearableStorage { public int WearableAssetsInCatalog { @@ -17,7 +18,7 @@ public int WearableAssetsInCatalog if (wearable.WearableAssetResults != null) foreach (WearableAssets assets in wearable.WearableAssetResults) if (assets.Results != null) - foreach (StreamableLoadingResult? result in assets.Results) + foreach (StreamableLoadingResult? result in assets.Results) if (result is { Asset: not null }) sum++; diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableComponentsUtils.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableComponentsUtils.cs index 6db079e531..5b0c528852 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableComponentsUtils.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableComponentsUtils.cs @@ -5,16 +5,20 @@ using DCL.Optimization.Pools; using ECS; using ECS.Prioritization.Components; -using ECS.StreamableLoading.Common; using ECS.StreamableLoading.Common.Components; using ECS.StreamableLoading.Textures; using System; using System.Collections.Generic; using System.Threading; -using System.Threading.Tasks; using AssetManagement; using Cysharp.Threading.Tasks; +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.AvatarRendering.Thumbnails.Utils; using DCL.AvatarRendering.Wearables.Systems; +using DCL.AvatarRendering.Wearables.Systems.Load; using DCL.Diagnostics; using DCL.WebRequests; using ECS.StreamableLoading.AssetBundles; @@ -38,13 +42,9 @@ public static class WearableComponentsUtils internal static readonly HashSetObjectPool CATEGORIES_POOL = new (hashsetInstanceDefaultCapacity: WearablesConstants.CATEGORIES_PRIORITY.Count, defaultCapacity: PoolConstants.AVATARS_COUNT); - internal static readonly Sprite DEFAULT_THUMBNAIL = Sprite.Create(Texture2D.grayTexture, new Rect(0, 0, 1, 1), new Vector2()); - - private static readonly IExtendedObjectPool URL_BUILDER_POOL = new ExtendedObjectPool(() => new URLBuilder(), defaultCapacity:2); - public static GetWearablesByPointersIntention CreateGetWearablesByPointersIntention(BodyShape bodyShape, IReadOnlyCollection wearables, IReadOnlyCollection forceRender) { - List pointers = POINTERS_POOL.Get(); + List pointers = POINTERS_POOL.Get()!; pointers.Add(bodyShape); foreach (string wearable in wearables) @@ -55,118 +55,45 @@ public static GetWearablesByPointersIntention CreateGetWearablesByPointersIntent public static GetWearablesByPointersIntention CreateGetWearablesByPointersIntention(BodyShape bodyShape, IReadOnlyCollection wearables, IReadOnlyCollection forceRender) { - List pointers = POINTERS_POOL.Get(); + List pointers = POINTERS_POOL.Get()!; pointers.Add(bodyShape); pointers.AddRange(wearables); return new GetWearablesByPointersIntention(pointers, bodyShape, forceRender); } - public static async UniTask CreateWearableThumbnailABPromiseAsync(IWebRequestController requestController, URLDomain assetBundleURL, IRealmData realmData, IAvatarAttachment attachment, World world, IPartitionComponent partitionComponent, - CancellationTokenSource? cancellationTokenSource = null) - { - if (attachment.ThumbnailAssetResult != null) - return; - - URLPath thumbnailPath = attachment.GetThumbnail(); - - if (string.IsNullOrEmpty(thumbnailPath.Value)) - { - attachment.ThumbnailAssetResult = new StreamableLoadingResult(DEFAULT_THUMBNAIL); - return; - } - - - if (!await TryResolveAssetBundleManifestAsync(requestController, assetBundleURL, realmData, attachment, world, partitionComponent, cancellationTokenSource, thumbnailPath)) - { - ReportHub.Log(ReportCategory.WEARABLE, $"Cannot load the thumbnail of the wearable {attachment.GetUrn()} {attachment.GetHash()} since it doesnt have an AB manifest. " + - "Trying to get the texture through content server"); - CreateWearableThumbnailTexturePromise(realmData, thumbnailPath, attachment, world, partitionComponent, cancellationTokenSource); - return; - } - - - var promise = AssetBundlePromise.Create(world, - GetAssetBundleIntention.FromHash(typeof(Texture2D), - hash: thumbnailPath.Value + PlatformUtils.GetPlatform(), - permittedSources: AssetSource.ALL, - manifest: attachment.ManifestResult?.Asset, - cancellationTokenSource: cancellationTokenSource), - partitionComponent); - - world.Create(attachment, promise, partitionComponent); - } - - private static async UniTask TryResolveAssetBundleManifestAsync(IWebRequestController requestController, URLDomain assetBundleURL, IRealmData realmData, IAvatarAttachment attachment, World world, IPartitionComponent partitionComponent, CancellationTokenSource? cancellationTokenSource, URLPath thumbnailPath) - { - if (attachment.ManifestResult?.Asset == null) - { - try - { - attachment.ManifestResult = new StreamableLoadingResult( - await LoadWearableAssetBundleManifestUtils.LoadWearableAssetBundleManifestAsync(requestController, assetBundleURL, attachment.GetHash(), ReportCategory.WEARABLE, cancellationTokenSource?.Token ?? new CancellationToken())); - } - catch (Exception) - { - return false; - } - } - - return true; - } - - private static void CreateWearableThumbnailTexturePromise(IRealmData realmData, URLPath thumbnailPath, IAvatarAttachment attachment, World world, IPartitionComponent partitionComponent, - CancellationTokenSource? cancellationTokenSource = null) - { - using var urlBuilderScope = URL_BUILDER_POOL.AutoScope(); - var urlBuilder = urlBuilderScope.Value; - urlBuilder.Clear(); - urlBuilder.AppendDomain(realmData.Ipfs.ContentBaseUrl).AppendPath(thumbnailPath); - - var promise = Promise.Create(world, - new GetTextureIntention - { - // If cancellation token source was not provided a new one will be created - CommonArguments = new CommonLoadingArguments(urlBuilder.Build(), cancellationTokenSource: cancellationTokenSource), - }, - partitionComponent); - - world.Create(attachment, promise, partitionComponent); - } - public static void ExtractVisibleWearables(string bodyShapeId, IReadOnlyList wearables, int wearableCount, ref HideWearablesResolution hideWearablesResolution) { - Dictionary wearablesByCategory = DictionaryPool.Get(); - List visibleWearables = WEARABLES_POOL.Get(); + Dictionary wearablesByCategory = DictionaryPool.Get()!; + List visibleWearables = WEARABLES_POOL.Get()!; - for (var i = 0; i < wearableCount; i++) { wearablesByCategory[wearables[i].GetCategory()] = wearables[i]; } + for (var i = 0; i < wearableCount; i++) { wearablesByCategory[wearables[i]!.GetCategory()] = wearables[i]; } - HashSet hidingList = CATEGORIES_POOL.Get(); - HashSet combinedHidingList = CATEGORIES_POOL.Get(); + HashSet hidingList = CATEGORIES_POOL.Get()!; + HashSet combinedHidingList = CATEGORIES_POOL.Get()!; for (var index = 0; index < WearablesConstants.CATEGORIES_PRIORITY.Count; index++) { - string priorityCategory = WearablesConstants.CATEGORIES_PRIORITY[index]; + string priorityCategory = WearablesConstants.CATEGORIES_PRIORITY[index]!; hidingList.Clear(); //If the category is already on the hidden list, then we dont care about what its trying to hide. This avoid possible cyclic hidden categories //Also, if the category is not equipped, then we cant do anything if (combinedHidingList.Contains(priorityCategory) || !wearablesByCategory.TryGetValue(priorityCategory, out IWearable wearable)) continue; - wearable.GetHidingList(bodyShapeId, hidingList); + wearable!.GetHidingList(bodyShapeId, hidingList); foreach (string categoryToHide in hidingList) combinedHidingList.Add(categoryToHide); } if (hideWearablesResolution.ForceRender != null) - foreach (string category in hideWearablesResolution.ForceRender) { combinedHidingList.Remove(category); } + foreach (string category in hideWearablesResolution.ForceRender) + combinedHidingList.Remove(category); foreach (IWearable wearable in wearables) - { if (!combinedHidingList.Contains(wearable.GetCategory())) visibleWearables.Add(wearable); - } hideWearablesResolution.VisibleWearables = visibleWearables; hideWearablesResolution.HiddenCategories = combinedHidingList; @@ -174,5 +101,12 @@ public static void ExtractVisibleWearables(string bodyShapeId, IReadOnlyList.Release(wearablesByCategory); } + + + public static void SetAssetResult(this IWearable wearable, BodyShape bodyShape, int index, StreamableLoadingResult wearableResult) + { + ref var asset = ref wearable.WearableAssetResults[bodyShape]; + asset.Results[index] = wearableResult; + } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearablePolymorphicBehaviour.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearablePolymorphicBehaviour.cs index 0eda0eb729..54cd440c37 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearablePolymorphicBehaviour.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearablePolymorphicBehaviour.cs @@ -1,8 +1,13 @@ using Arch.Core; using AssetManagement; using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Components.Intentions; +using DCL.Diagnostics; using DCL.Optimization.Pools; using ECS.Prioritization.Components; using ECS.StreamableLoading.AssetBundles; @@ -16,6 +21,7 @@ using Utility; using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; using AssetBundleManifestPromise = ECS.StreamableLoading.Common.AssetPromise; +using IAvatarAttachment = DCL.AvatarRendering.Loading.Components.IAvatarAttachment; namespace DCL.AvatarRendering.Wearables.Helpers { @@ -31,11 +37,11 @@ public static bool CreateAssetBundleManifestPromise(this T component, World w where T: IAvatarAttachment { var promise = AssetBundleManifestPromise.Create(world, - new GetWearableAssetBundleManifestIntention(component.GetHash(), new CommonLoadingArguments(component.GetHash(), cancellationTokenSource: cts)), + new GetWearableAssetBundleManifestIntention(component.DTO.GetHash(), new CommonLoadingArguments(component.DTO.GetHash(), cancellationTokenSource: cts)), partitionComponent); component.ManifestResult = new StreamableLoadingResult(); - component.IsLoading = true; + component.UpdateLoadingStatus(true); world.Create(promise, component, bodyShape); return true; } @@ -49,7 +55,9 @@ public static bool TryCreateAssetBundlePromise( in GetWearablesByPointersIntention intention, URLSubdirectory customStreamingSubdirectory, IPartitionComponent partitionComponent, - World world) + World world, + ReportData reportData + ) { SceneAssetBundleManifest? manifest = !EnumUtils.HasFlag(intention.PermittedSources, AssetSource.WEB) ? null : wearable.ManifestResult?.Asset; @@ -65,7 +73,9 @@ public static bool TryCreateAssetBundlePromise( wearable, partitionComponent, bodyShape, - world); + world, + reportData + ); default: return TryCreateSingleGameObjectAssetBundlePromise( manifest, @@ -74,7 +84,9 @@ public static bool TryCreateAssetBundlePromise( wearable, partitionComponent, bodyShape, - world); + world, + reportData + ); } } @@ -85,11 +97,13 @@ public static bool TryCreateSingleGameObjectAssetBundlePromise( IWearable wearable, IPartitionComponent partitionComponent, BodyShape bodyShape, - World world) + World world, + ReportData reportData + ) { ref WearableAssets wearableAssets = ref InitializeResultsArray(wearable, bodyShape, 1); - return TryCreateMainFilePromise(typeof(GameObject), sceneAssetBundleManifest, intention, customStreamingSubdirectory, wearable, partitionComponent, ref wearableAssets, bodyShape, world); + return TryCreateMainFilePromise(typeof(GameObject), sceneAssetBundleManifest, intention, customStreamingSubdirectory, wearable, partitionComponent, ref wearableAssets, bodyShape, world, reportData); } /// @@ -102,13 +116,15 @@ private static bool TryCreateFacialFeaturePromises( IWearable wearable, IPartitionComponent partitionComponent, BodyShape bodyShape, - World world) + World world, + ReportData reportData + ) { ref WearableAssets wearableAssets = ref InitializeResultsArray(wearable, bodyShape, 2); // 0 stands for the main texture // 1 stands for the mask - return TryCreateMainFilePromise(typeof(Texture), sceneAssetBundleManifest, intention, customStreamingSubdirectory, wearable, partitionComponent, ref wearableAssets, bodyShape, world) + return TryCreateMainFilePromise(typeof(Texture), sceneAssetBundleManifest, intention, customStreamingSubdirectory, wearable, partitionComponent, ref wearableAssets, bodyShape, world, reportData) | TryCreateMaskPromise(sceneAssetBundleManifest, intention, customStreamingSubdirectory, wearable, partitionComponent, ref wearableAssets, bodyShape, world); } @@ -127,7 +143,7 @@ private static ref WearableAssets InitializeResultsArray(IWearable wearable, Bod void SetByRef(BodyShape bs) { ref WearableAssets resultForBody = ref wearable.WearableAssetResults[bs]; - resultForBody.Results ??= new StreamableLoadingResult?[size]; + resultForBody.Results ??= new StreamableLoadingResult?[size]; } } @@ -143,7 +159,7 @@ private static bool TryCreateMaskPromise(SceneAssetBundleManifest sceneAssetBund out string mainFileHash)) { // If there is no mask, we don't need to create a promise for it, and it's not an exception - wearableAssets.Results[MASK_ASSET_INDEX] = new StreamableLoadingResult((WearableTextureAsset)null); + wearableAssets.Results[MASK_ASSET_INDEX] = new StreamableLoadingResult((AttachmentTextureAsset)null); return false; } @@ -164,8 +180,15 @@ private static bool TryCreateMaskPromise(SceneAssetBundleManifest sceneAssetBund private static bool TryCreateMainFilePromise( Type expectedObjectType, SceneAssetBundleManifest sceneAssetBundleManifest, - GetWearablesByPointersIntention intention, URLSubdirectory customStreamingSubdirectory, T wearable, - IPartitionComponent partitionComponent, ref WearableAssets wearableAssets, BodyShape bodyShape, World world) + GetWearablesByPointersIntention intention, + URLSubdirectory customStreamingSubdirectory, + T wearable, + IPartitionComponent partitionComponent, + ref WearableAssets wearableAssets, + BodyShape bodyShape, + World world, + ReportData reportData + ) where T: IAvatarAttachment { if (wearableAssets.Results[MAIN_ASSET_INDEX] != null) @@ -174,7 +197,7 @@ private static bool TryCreateMainFilePromise( if (!wearable.TryGetMainFileHash(bodyShape, out string? mainFileHash)) { wearableAssets.Results[MAIN_ASSET_INDEX] = - new StreamableLoadingResult(new Exception("Main file hash not found")); + new StreamableLoadingResult(reportData, new Exception("Main file hash not found")); return false; } @@ -206,61 +229,62 @@ private static void CreatePromise( var promise = AssetBundlePromise.Create(world, GetAssetBundleIntention.FromHash( expectedObjectType, - hash + PlatformUtils.GetPlatform(), + hash + PlatformUtils.GetCurrentPlatform(), permittedSources: intention.PermittedSources, customEmbeddedSubDirectory: customStreamingSubdirectory, manifest: sceneAssetBundleManifest, cancellationTokenSource: intention.CancellationTokenSource), partitionComponent); - wearable.IsLoading = true; + wearable.UpdateLoadingStatus(true); world.Create(promise, wearable, intention.BodyShape, index); // Add an index to the promise so we know to which slot of the WearableAssets it belongs } - public static StreamableLoadingResult ToWearableAsset(this StreamableLoadingResult result, IWearable wearable) + public static StreamableLoadingResult ToWearableAsset(this StreamableLoadingResult result, IWearable wearable) { - if (!result.Succeeded) return new StreamableLoadingResult(result.Exception!); + if (!result.Succeeded) return new StreamableLoadingResult(result.ReportData, result.Exception!); switch (wearable.Type) { case WearableType.FacialFeature: - return new StreamableLoadingResult(new WearableTextureAsset(result.Asset!.GetMainAsset(), result.Asset)); + return new StreamableLoadingResult(new AttachmentTextureAsset(result.Asset!.GetMainAsset(), result.Asset)); default: - return new StreamableLoadingResult(ToRegularAsset(result)); + return new StreamableLoadingResult(ToRegularAsset(result)); } } - public static WearableRegularAsset ToRegularAsset(this StreamableLoadingResult result) + public static AttachmentRegularAsset ToRegularAsset(this StreamableLoadingResult result) { GameObject go = result.Asset!.GetMainAsset(); // collect all renderers - List rendererInfos = WearableRegularAsset.RENDERER_INFO_POOL.Get(); + List rendererInfos = AttachmentRegularAsset.RENDERER_INFO_POOL.Get(); using PoolExtensions.Scope> pooledList = go.GetComponentsInChildrenIntoPooledList(); foreach (SkinnedMeshRenderer skinnedMeshRenderer in pooledList.Value) - rendererInfos.Add(new WearableRegularAsset.RendererInfo(skinnedMeshRenderer, skinnedMeshRenderer.sharedMaterial)); + rendererInfos.Add(new AttachmentRegularAsset.RendererInfo(skinnedMeshRenderer, skinnedMeshRenderer.sharedMaterial)); - return new WearableRegularAsset(go, rendererInfos, result.Asset); + return new AttachmentRegularAsset(go, rendererInfos, result.Asset); } - public static void AssignWearableAsset(this IWearable wearable, WearableRegularAsset wearableRegularAsset, BodyShape bodyShape) + public static void AssignWearableAsset(this IWearable wearable, AttachmentRegularAsset attachmentRegularAsset, BodyShape bodyShape) { ref WearableAssets results = ref wearable.WearableAssetResults[bodyShape]; - results.Results ??= new StreamableLoadingResult?[1]; + results.Results ??= new StreamableLoadingResult?[1]; - results.Results[MAIN_ASSET_INDEX] = new StreamableLoadingResult(wearableRegularAsset); + results.Results[MAIN_ASSET_INDEX] = new StreamableLoadingResult(attachmentRegularAsset); } public static bool HasEssentialAssetsResolved(this IWearable wearable, BodyShape bodyShape) { - StreamableLoadingResult?[] results = wearable.WearableAssetResults[bodyShape].Results; + StreamableLoadingResult?[] results = wearable.WearableAssetResults[bodyShape].Results ?? Array.Empty?>(); if (wearable.Type == WearableType.FacialFeature) { if (results.Length <= 0) return false; + // Exclude texture mask from required assets - StreamableLoadingResult? mainFileAsset = results[0]; + StreamableLoadingResult? mainFileAsset = results[0]; return mainFileAsset is { Succeeded: true }; } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableStorage.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableStorage.cs new file mode 100644 index 0000000000..6bd9057651 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableStorage.cs @@ -0,0 +1,175 @@ +using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Wearables.Components; +using DCL.Optimization.PerformanceBudgeting; +using ECS.StreamableLoading.Common.Components; +using System.Collections.Generic; +using Utility.Multithreading; + +namespace DCL.AvatarRendering.Wearables.Helpers +{ + public partial class WearableStorage : IWearableStorage + { + private readonly LinkedList<(URN key, long lastUsedFrame)> listedCacheKeys = new (); + private readonly Dictionary> cacheKeysDictionary = new (new Dictionary>(), URNIgnoreCaseEqualityComparer.Default); + private readonly Dictionary> ownedNftsRegistry = new (new Dictionary>(), URNIgnoreCaseEqualityComparer.Default); + + internal Dictionary wearablesCache { get; } = new (new Dictionary(), URNIgnoreCaseEqualityComparer.Default); + + private readonly object lockObject = new (); + + public IWearable GetOrAddByDTO(WearableDTO wearableDto, bool qualifiedForUnloading = true) + { + lock (lockObject) + { + return TryGetElement(wearableDto.metadata.id, out IWearable existingWearable) + ? existingWearable + : AddWearable(wearableDto.metadata.id, new Wearable(new StreamableLoadingResult(wearableDto)), qualifiedForUnloading); + } + } + + internal void AddToInternalCache(IWearable wearable) + { + wearablesCache.Add(wearable.GetUrn(), wearable); + } + + public void Set(URN urn, IWearable element) + { + lock (lockObject) + { + wearablesCache[urn] = element; + UpdateListedCachePriority(urn); + } + } + + public bool TryGetElement(URN wearableURN, out IWearable wearable) + { + lock (lockObject) + { + if (wearablesCache.TryGetValue(wearableURN, out wearable)) + { + UpdateListedCachePriority(@for: wearableURN); + return true; + } + + return false; + } + } + + public IWearable? GetDefaultWearable(BodyShape bodyShape, string category) + { + lock (lockObject) + { + string wearableURN = WearablesConstants.DefaultWearables.GetDefaultWearable(bodyShape, category); + UpdateListedCachePriority(wearableURN); + return wearablesCache.TryGetValue(wearableURN, out IWearable wearable) ? wearable : null; + } + } + + public void Unload(IPerformanceBudget frameTimeBudget) + { + lock (lockObject) + { + for (LinkedListNode<(URN key, long lastUsedFrame)> node = listedCacheKeys.First; frameTimeBudget.TrySpendBudget() && node != null; node = node.Next) + { + URN urn = node.Value.key; + + if (!wearablesCache.TryGetValue(urn, out IWearable wearable)) + continue; + + if (!TryUnloadAllWearableAssets(wearable)) continue; + + wearablesCache.Remove(urn); + cacheKeysDictionary.Remove(urn); + listedCacheKeys.Remove(node); + } + } + } + + public void SetOwnedNft(URN nftUrn, NftBlockchainOperationEntry entry) + { + lock (lockObject) + { + if (!ownedNftsRegistry.TryGetValue(nftUrn, out Dictionary ownedWearableRegistry)) + { + ownedWearableRegistry = new Dictionary(new Dictionary(), + URNIgnoreCaseEqualityComparer.Default); + + ownedNftsRegistry[nftUrn] = ownedWearableRegistry; + } + + ownedWearableRegistry[entry.Urn] = entry; + } + } + + public bool TryGetOwnedNftRegistry(URN nftUrn, out IReadOnlyDictionary registry) + { + lock (lockObject) + { + bool result = ownedNftsRegistry.TryGetValue(nftUrn, out Dictionary r); + registry = r; + return result; + } + } + + internal IWearable AddWearable(URN urn, IWearable wearable, bool qualifiedForUnloading) + { + lock (lockObject) + { + wearablesCache.Add(urn, wearable); + + if (qualifiedForUnloading) + cacheKeysDictionary[urn] = + listedCacheKeys.AddLast((urn, MultithreadingUtility.FrameCount)); + + return wearable; + } + } + + private static bool TryUnloadAllWearableAssets(IWearable wearable) + { + var countNullOrEmpty = 0; + var assetsCount = 0; + + for (var i = 0; i < wearable.WearableAssetResults.Length; i++) + { + ref var assets = ref wearable.WearableAssetResults[i]; + assetsCount += assets.Results?.Length ?? 0; + + for (var j = 0; j < assets.Results?.Length; j++) + { + StreamableLoadingResult? result = assets.Results[j]; + + if (result is not { Succeeded: true }) + { + countNullOrEmpty++; + continue; + } + + AttachmentAssetBase? wearableAsset = result.Value.Asset; + + if (wearableAsset is { ReferenceCount: 0 }) + { + wearableAsset.Dispose(); + assets.Results[j] = null; + } + } + } + + return countNullOrEmpty == assetsCount; + } + + private void UpdateListedCachePriority(URN @for) + { + if (cacheKeysDictionary.TryGetValue(@for, out LinkedListNode<(URN key, long lastUsedFrame)> node)) + { + node.Value = (@for, MultithreadingUtility.FrameCount); + + cacheKeysDictionary[@for] = node; + listedCacheKeys.Remove(node); + listedCacheKeys.AddLast(node); + } + } + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableCache.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableStorage.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableCache.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearableStorage.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearablesConstants.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearablesConstants.cs index 9fa198e9fc..84662fcc36 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearablesConstants.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Helpers/WearablesConstants.cs @@ -1,6 +1,7 @@ #nullable enable using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Components; using Decentraland.Common; using System.Collections.Generic; using System.Linq; diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveWearableByPointerSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/FinalizeWearableLoadingSystem.cs similarity index 70% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveWearableByPointerSystem.cs rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/FinalizeWearableLoadingSystem.cs index e77693e28e..6505a9c3d9 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveWearableByPointerSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/FinalizeWearableLoadingSystem.cs @@ -4,6 +4,11 @@ using Arch.SystemGroups.DefaultSystemGroups; using AssetManagement; using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; +using DCL.AvatarRendering.Loading.Systems.Abstract; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Components.Intentions; using DCL.AvatarRendering.Wearables.Helpers; @@ -19,9 +24,6 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; -using Cysharp.Threading.Tasks; -using UnityEngine; -using UnityEngine.Assertions; using Utility; using AssetBundleManifestPromise = ECS.StreamableLoading.Common.AssetPromise; using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; @@ -32,30 +34,34 @@ namespace DCL.AvatarRendering.Wearables.Systems [UpdateInGroup(typeof(PresentationSystemGroup))] [UpdateBefore(typeof(PrepareGlobalAssetBundleLoadingParametersSystem))] [LogCategory(ReportCategory.WEARABLE)] - public partial class ResolveWearableByPointerSystem : BaseUnityLoopSystem + public partial class FinalizeWearableLoadingSystem : FinalizeElementsLoadingSystem { private readonly URLSubdirectory customStreamingSubdirectory; private readonly IRealmData realmData; - private readonly IWearableCache wearableCache; + private readonly IWearableStorage wearableStorage; private SingleInstanceEntity defaultWearablesState; - public ResolveWearableByPointerSystem(World world, IWearableCache wearableCache, IRealmData realmData, - URLSubdirectory customStreamingSubdirectory) : base(world) + public FinalizeWearableLoadingSystem( + World world, + IWearableStorage wearableStorage, + IRealmData realmData, + URLSubdirectory customStreamingSubdirectory + ) : base(world, wearableStorage, WearableComponentsUtils.POINTERS_POOL) { - this.wearableCache = wearableCache; + this.wearableStorage = wearableStorage; this.realmData = realmData; this.customStreamingSubdirectory = customStreamingSubdirectory; } public override void Initialize() { - defaultWearablesState = World.CacheDefaultWearablesState(); + defaultWearablesState = World!.CacheDefaultWearablesState(); } protected override void Update(float t) { - bool defaultWearablesResolved = defaultWearablesState.GetDefaultWearablesState(World).ResolvedState == DefaultWearablesComponent.State.Success; + bool defaultWearablesResolved = defaultWearablesState.GetDefaultWearablesState(World!).ResolvedState == DefaultWearablesComponent.State.Success; // Only DTO loading requires realmData if (realmData.Configured) @@ -74,7 +80,7 @@ private void ResolveWearablePromise([Data] bool defaultWearablesResolved, in Ent { if (wearablesByPointersIntention.CancellationTokenSource.IsCancellationRequested) { - World.Add(entity, new StreamableResult(new Exception("Pointer request cancelled"))); + World!.Add(entity, new StreamableResult(GetReportCategory(), new Exception("Pointer request cancelled"))); return; } @@ -83,8 +89,8 @@ private void ResolveWearablePromise([Data] bool defaultWearablesResolved, in Ent if (wearablesByPointersIntention.FallbackToDefaultWearables && !defaultWearablesResolved) return; // Wait for default wearables to be resolved - List missingPointers = WearableComponentsUtils.POINTERS_POOL.Get(); - List resolvedDTOs = WearableComponentsUtils.WEARABLES_POOL.Get(); + List missingPointers = WearableComponentsUtils.POINTERS_POOL.Get()!; + List resolvedDTOs = WearableComponentsUtils.WEARABLES_POOL.Get()!; var successfulResults = 0; int finishedDTOs = 0; @@ -96,7 +102,7 @@ private void ResolveWearablePromise([Data] bool defaultWearablesResolved, in Ent if (loadingIntentionPointer.IsNullOrEmpty()) { ReportHub.LogError( - GetReportCategory(), + GetReportData(), $"ResolveWearableByPointerSystem: Null pointer found in the list of pointers: index {index}" ); @@ -106,22 +112,20 @@ private void ResolveWearablePromise([Data] bool defaultWearablesResolved, in Ent URN shortenedPointer = loadingIntentionPointer; loadingIntentionPointer = shortenedPointer.Shorten(); - if (!wearableCache.TryGetWearable(loadingIntentionPointer, out IWearable wearable)) + if (!wearableStorage.TryGetElement(loadingIntentionPointer, out IWearable wearable)) { - wearableCache.AddEmptyWearable(loadingIntentionPointer); + wearableStorage.Set(loadingIntentionPointer, IWearable.NewEmpty()); missingPointers.Add(loadingIntentionPointer); continue; } - if (wearable.WearableDTO.Succeeded) + if (wearable.Model.Succeeded) { finishedDTOs++; resolvedDTOs.Add(wearable); } - else if (wearable.WearableDTO.Exception != null) - { + else if (wearable.Model.Exception != null) finishedDTOs++; - } } if (missingPointers.Count > 0) @@ -166,23 +170,14 @@ private void ResolveWearablePromise([Data] bool defaultWearablesResolved, in Ent World.Add(entity, new StreamableResult(new WearablesResolution(hideWearablesResolution.VisibleWearables, hideWearablesResolution.HiddenCategories))); } + //TODO extract!!! [Query] - private void FinalizeWearableDTO(in Entity entity, ref AssetPromise promise, ref BodyShape bodyShape) + private void FinalizeWearableDTO(Entity entity, ref AssetPromise promise, ref BodyShape bodyShape) { - if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested) - { - foreach (string pointerID in promise.LoadingIntention.Pointers) - { - wearableCache.TryGetWearable(pointerID, out IWearable component); - component.IsLoading = false; - } - - promise.ForgetLoading(World); - World.Destroy(entity); + if (TryFinalizeIfCancelled(entity, promise)) return; - } - if (promise.SafeTryConsume(World, out StreamableLoadingResult promiseResult)) + if (promise.SafeTryConsume(World!, GetReportCategory(), out StreamableLoadingResult promiseResult)) { if (!promiseResult.Succeeded) { @@ -192,79 +187,62 @@ private void FinalizeWearableDTO(in Entity entity, ref AssetPromise(assetEntity))) - ReportHub.LogError(new ReportData(GetReportCategory()), $"Wearable DTO has already been initialized: {assetEntity.metadata.id}"); + if (component!.TryResolveDTO(new StreamableLoadingResult(assetEntity)) == false) + ReportHub.LogError(GetReportData(), $"Wearable DTO has already been initialized: {assetEntity.Metadata.id}"); - failedDTOList.Remove(assetEntity.metadata.id); - component.IsLoading = false; - } + failedDTOList.Remove(assetEntity.Metadata.id); + component.UpdateLoadingStatus(false); + } //If this list is not empty, it means we have at least one unresolvedDTO that was not completed. We need to finalize it as error foreach (var urn in failedDTOList) ReportAndFinalizeWithError(urn); - - WearableComponentsUtils.POINTERS_POOL.Release(failedDTOList); } - WearableComponentsUtils.POINTERS_POOL.Release(promise.LoadingIntention.Pointers); + promise.LoadingIntention.ReleasePointers(); World.Destroy(entity); - - void ReportAndFinalizeWithError(URN urn) - { - //We have some missing pointers that were not completed. We have to consider them as failure - var e = new ArgumentNullException($"Wearable DTO is null for for {urn}"); - ReportHub.LogError(new ReportData(GetReportCategory()), e); - if (wearableCache.TryGetWearable(urn, out var component)) - { - //If its not in the catalog, we cannot determine which one has failed - component.ResolvedFailedDTO(new StreamableLoadingResult(e)); - component.IsLoading = false; - } - } } } [Query] - private void FinalizeAssetBundleManifestLoading([Data] bool defaultWearablesResolved, in Entity entity, ref AssetBundleManifestPromise promise, ref IWearable wearable, ref BodyShape bodyShape) + private void FinalizeAssetBundleManifestLoading([Data] bool defaultWearablesResolved, Entity entity, ref AssetBundleManifestPromise promise, ref IWearable wearable, ref BodyShape bodyShape) { - if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested) + if (promise.TryForgetWithEntityIfCancelled(entity, World!)) { - wearable.IsLoading = false; - wearable.ManifestResult = null; - promise.ForgetLoading(World); - World.Destroy(entity); + wearable.ResetManifest(); return; } - if (promise.SafeTryConsume(World, out StreamableLoadingResult result)) + if (promise.SafeTryConsume(World, GetReportCategory(), out StreamableLoadingResult result)) { if (result.Succeeded) wearable.ManifestResult = result; else SetDefaultWearables(defaultWearablesResolved, wearable, in bodyShape); - wearable.IsLoading = false; + wearable.UpdateLoadingStatus(false); World.Destroy(entity); } } [Query] - private void FinalizeAssetBundleLoading([Data] bool defaultWearablesResolved, in Entity entity, ref AssetBundlePromise promise, ref IWearable wearable, in BodyShape bodyShape, - int index) + private void FinalizeAssetBundleLoading( + [Data] bool defaultWearablesResolved, + Entity entity, + ref AssetBundlePromise promise, + ref IWearable wearable, + in BodyShape bodyShape, + int index + ) { if (promise.LoadingIntention.CancellationTokenSource.IsCancellationRequested) { @@ -274,7 +252,7 @@ private void FinalizeAssetBundleLoading([Data] bool defaultWearablesResolved, in return; } - if (promise.SafeTryConsume(World, out StreamableLoadingResult result)) + if (promise.SafeTryConsume(World, GetReportCategory(), out StreamableLoadingResult result)) { // every asset in the batch is mandatory => if at least one has already failed set the default wearables if (result.Succeeded && !AnyAssetHasFailed(wearable, bodyShape)) @@ -282,7 +260,7 @@ private void FinalizeAssetBundleLoading([Data] bool defaultWearablesResolved, in else SetDefaultWearables(defaultWearablesResolved, wearable, in bodyShape); - wearable.IsLoading = !AllAssetsAreLoaded(wearable, bodyShape); + wearable.UpdateLoadingStatus(!AllAssetsAreLoaded(wearable, bodyShape)); World.Destroy(entity); } } @@ -304,9 +282,9 @@ private bool CreateAssetBundlePromiseIfRequired(IWearable component, in GetWeara if (component.ManifestResult == null && EnumUtils.HasFlag(intention.PermittedSources, AssetSource.WEB)) return component.CreateAssetBundleManifestPromise(World, intention.BodyShape, intention.CancellationTokenSource, partitionComponent); - if (component.TryCreateAssetBundlePromise(in intention, customStreamingSubdirectory, partitionComponent, World)) + if (component.TryCreateAssetBundlePromise(in intention, customStreamingSubdirectory, partitionComponent, World, GetReportCategory())) { - component.IsLoading = true; + component.UpdateLoadingStatus(true); return true; } @@ -327,10 +305,10 @@ private void SetDefaultWearables(bool defaultWearablesLoaded, IWearable wearable { if (!defaultWearablesLoaded) { - ReportHub.LogError(GetReportCategory(), $"Default wearable {wearable.GetHash()} failed to load"); - - StreamableLoadingResult failedResult = new StreamableLoadingResult(new Exception("Default wearable failed to load")) - .ToWearableAsset(wearable); + StreamableLoadingResult failedResult = new StreamableLoadingResult( + GetReportData(), + new Exception($"Default wearable {wearable.DTO.GetHash()} failed to load") + ).ToWearableAsset(wearable); if (wearable.IsUnisex() && wearable.HasSameModelsForAllGenders()) { @@ -346,13 +324,13 @@ void SetFailure(BodyShape bs) { // the destination array might be not created if DTO itself has failed to load ref var result = ref wearable.WearableAssetResults[bs]; - result.Results ??= new StreamableLoadingResult?[1]; // default capacity, can't tell without the DTO + result.Results ??= new StreamableLoadingResult?[1]; // default capacity, can't tell without the DTO result.ReplacedWithDefaults = true; result.Results[0] = failedResult; } } - ReportHub.Log(GetReportCategory(), $"Request for wearable with hash {wearable.GetHash()} and urn {wearable.GetUrn()} failed, loading default wearable"); + ReportHub.Log(GetReportData(), $"Request for wearable with hash {wearable.DTO.GetHash()} and urn {wearable.GetUrn()} failed, loading default wearable"); if (wearable.IsUnisex() && wearable.HasSameModelsForAllGenders()) { @@ -366,12 +344,12 @@ void SetFailure(BodyShape bs) void CopyDefaultResults(BodyShape bs) { - IWearable defaultWearable = wearableCache.GetDefaultWearable(bs, wearable.GetCategory()); + IWearable defaultWearable = wearableStorage.GetDefaultWearable(bs, wearable.GetCategory()); var defaultWearableResults = defaultWearable.WearableAssetResults[bs]; // the destination array might be not created if DTO itself has failed to load ref var result = ref wearable.WearableAssetResults[bs]; - result.Results ??= new StreamableLoadingResult?[defaultWearableResults.Results.Length]; + result.Results ??= new StreamableLoadingResult?[defaultWearableResults.Results.Length]; result.ReplacedWithDefaults = true; Array.Copy(defaultWearableResults.Results, result.Results, defaultWearableResults.Results.Length); @@ -383,7 +361,7 @@ void CopyDefaultResults(BodyShape bs) /// private static void ResetWearableResultOnCancellation(IWearable wearable, in BodyShape bodyShape, int index) { - wearable.IsLoading = false; + wearable.UpdateLoadingStatus(false); void ResetBodyShape(BodyShape bs) { @@ -405,7 +383,7 @@ void ResetBodyShape(BodyShape bs) private static void SetWearableResult(IWearable wearable, StreamableLoadingResult result, in BodyShape bodyShape, int index) { - StreamableLoadingResult wearableResult = result.ToWearableAsset(wearable); + StreamableLoadingResult wearableResult = result.ToWearableAsset(wearable); if (wearable.IsUnisex() && wearable.HasSameModelsForAllGenders()) { diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveWearableByPointerSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/FinalizeWearableLoadingSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/ResolveWearableByPointerSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/FinalizeWearableLoadingSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load.meta new file mode 100644 index 0000000000..071f17cf14 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 126385b21add471485d99ad139b3b498 +timeCreated: 1724251193 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadDefaultWearablesSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadDefaultWearablesSystem.cs similarity index 81% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadDefaultWearablesSystem.cs rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadDefaultWearablesSystem.cs index 57ef9692a0..7b6bc033d6 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadDefaultWearablesSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadDefaultWearablesSystem.cs @@ -4,6 +4,8 @@ using Arch.SystemGroups.DefaultSystemGroups; using AssetManagement; using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Components.Intentions; using DCL.AvatarRendering.Wearables.Helpers; @@ -16,38 +18,39 @@ using System.Collections.Generic; using UnityEngine; -namespace DCL.AvatarRendering.Wearables.Systems +namespace DCL.AvatarRendering.Wearables.Systems.Load { [UpdateInGroup(typeof(InitializationSystemGroup))] // It is updated first so other systems can depend on it asap [LogCategory(ReportCategory.WEARABLE)] public partial class LoadDefaultWearablesSystem : BaseUnityLoopSystem { private readonly WearablesDTOList defaultWearableDefinition; - private readonly IWearableCache wearableCache; + private readonly IWearableStorage wearableStorage; private readonly GameObject emptyDefaultWearable; internal LoadDefaultWearablesSystem(World world, WearablesDTOList defaultWearableDefinition, GameObject emptyDefaultWearable, - IWearableCache wearableCache) : base(world) + IWearableStorage wearableStorage) : base(world) { this.defaultWearableDefinition = defaultWearableDefinition; - this.wearableCache = wearableCache; + this.wearableStorage = wearableStorage; this.emptyDefaultWearable = emptyDefaultWearable; } public override void Initialize() { var pointersRequest = new List[BodyShape.COUNT]; + using var consumedDefaultWearableDefinition = defaultWearableDefinition.ConsumeAttachments(); for (var i = 0; i < BodyShape.VALUES.Count; i++) - pointersRequest[BodyShape.VALUES[i]] = new List(defaultWearableDefinition.Value.Count); + pointersRequest[BodyShape.VALUES[i]] = new List(consumedDefaultWearableDefinition.Value.Count); var state = new DefaultWearablesComponent(new AssetPromise[BodyShape.COUNT]); - for (var i = 0; i < defaultWearableDefinition.Value.Count; i++) + for (var i = 0; i < consumedDefaultWearableDefinition.Value.Count; i++) { - WearableDTO dto = defaultWearableDefinition.Value[i]; - IWearable wearable = wearableCache.GetOrAddWearableByDTO(dto, false); + WearableDTO dto = consumedDefaultWearableDefinition.Value[i]; + IWearable wearable = wearableStorage.GetOrAddByDTO(dto, false); BodyShape analyzedBodyShape = wearable.IsCompatibleWithBodyShape(BodyShape.MALE) ? BodyShape.MALE : BodyShape.FEMALE; pointersRequest[analyzedBodyShape].Add(wearable.GetUrn()); @@ -84,15 +87,15 @@ public override void Initialize() boneWeights[0].weight0 = 1; // 100% influence from the first (and only) bone mesh.boneWeights = boneWeights; - var rendererInfos = new List(); + var rendererInfos = new List(); foreach (var skinnedMeshRenderer in emptyDefaultWearable.GetComponentsInChildren()) { skinnedMeshRenderer.sharedMesh = mesh; - rendererInfos.Add(new WearableRegularAsset.RendererInfo(skinnedMeshRenderer, skinnedMeshRenderer.sharedMaterial)); + rendererInfos.Add(new AttachmentRegularAsset.RendererInfo(skinnedMeshRenderer, skinnedMeshRenderer.sharedMaterial)); } - IWearable emptyWearable = wearableCache.GetOrAddWearableByDTO(wearableDTO, false); - var wearableAsset = new WearableRegularAsset(emptyDefaultWearable, rendererInfos, null); + IWearable emptyWearable = wearableStorage.GetOrAddByDTO(wearableDTO, false); + var wearableAsset = new AttachmentRegularAsset(emptyDefaultWearable, rendererInfos, null); wearableAsset.AddReference(); // only game-objects here diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadDefaultWearablesSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadDefaultWearablesSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadDefaultWearablesSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadDefaultWearablesSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearableAssetBundleManifestSystem.cs similarity index 76% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestSystem.cs rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearableAssetBundleManifestSystem.cs index 1890f4cbea..95ce74c72e 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestSystem.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearableAssetBundleManifestSystem.cs @@ -3,6 +3,7 @@ using Arch.SystemGroups.DefaultSystemGroups; using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.AvatarRendering.Thumbnails.Utils; using DCL.AvatarRendering.Wearables.Components; using DCL.Diagnostics; using DCL.Optimization.PerformanceBudgeting; @@ -13,9 +14,8 @@ using ECS.StreamableLoading.Common.Systems; using SceneRunner.Scene; using System.Threading; -using Utility; -namespace DCL.AvatarRendering.Wearables.Systems +namespace DCL.AvatarRendering.Wearables.Systems.Load { [UpdateInGroup(typeof(PresentationSystemGroup))] [LogCategory(ReportCategory.ASSET_BUNDLES)] @@ -31,10 +31,15 @@ internal LoadWearableAssetBundleManifestSystem(World world, this.webRequestController = webRequestController; } - protected override async UniTask> FlowInternalAsync(GetWearableAssetBundleManifestIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) - { - return new StreamableLoadingResult( - await LoadWearableAssetBundleManifestUtils.LoadWearableAssetBundleManifestAsync(webRequestController, assetBundleURL, intention.Hash, GetReportCategory(), ct)); - } + protected override async UniTask> FlowInternalAsync(GetWearableAssetBundleManifestIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) => + new ( + await LoadThumbnailsUtils.LoadAssetBundleManifestAsync( + webRequestController, + assetBundleURL, + intention.Hash, + GetReportData(), + ct + ) + ); } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearableAssetBundleManifestSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearableAssetBundleManifestSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesByParamSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesByParamSystem.cs new file mode 100644 index 0000000000..d87b329966 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesByParamSystem.cs @@ -0,0 +1,62 @@ +using Arch.Core; +using Arch.SystemGroups; +using Arch.SystemGroups.DefaultSystemGroups; +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using DCL.AvatarRendering.Loading; +using DCL.AvatarRendering.Loading.Systems.Abstract; +using DCL.AvatarRendering.Wearables.Components; +using DCL.AvatarRendering.Wearables.Components.Intentions; +using DCL.AvatarRendering.Wearables.Helpers; +using DCL.Diagnostics; +using DCL.WebRequests; +using ECS; +using ECS.StreamableLoading.Cache; +using System.Collections.Generic; + +namespace DCL.AvatarRendering.Wearables.Systems.Load +{ + [UpdateInGroup(typeof(PresentationSystemGroup))] + [LogCategory(ReportCategory.WEARABLE)] + public partial class LoadWearablesByParamSystem : LoadElementsByIntentionSystem + { + private readonly URLSubdirectory lambdaSubdirectory; + private readonly URLSubdirectory wearablesSubdirectory; + private readonly IRealmData realmData; + + internal IURLBuilder urlBuilder = new URLBuilder(); + + public LoadWearablesByParamSystem( + World world, IWebRequestController webRequestController, IStreamableCache cache, + IRealmData realmData, URLSubdirectory lambdaSubdirectory, URLSubdirectory wearablesSubdirectory, + IWearableStorage wearableStorage + ) : base(world, cache, wearableStorage, webRequestController, realmData) + { + this.realmData = realmData; + this.lambdaSubdirectory = lambdaSubdirectory; + this.wearablesSubdirectory = wearablesSubdirectory; + } + + protected override URLAddress BuildUrlFromIntention(in GetWearableByParamIntention intention) + { + string userID = intention.UserID; + IReadOnlyList<(string, string)> urlEncodedParams = intention.Params; + urlBuilder.Clear(); + + urlBuilder.AppendDomainWithReplacedPath(realmData.Ipfs.LambdasBaseUrl, lambdaSubdirectory) + .AppendSubDirectory(URLSubdirectory.FromString(userID)) + .AppendSubDirectory(wearablesSubdirectory); + + for (var i = 0; i < urlEncodedParams.Count; i++) + urlBuilder.AppendParameter(urlEncodedParams[i]); + + return urlBuilder.Build(); + } + + protected override WearablesResponse AssetFromPreparedIntention(in GetWearableByParamIntention intention) => + new (intention.Results, intention.TotalAmount); + + protected override async UniTask>> ParsedResponseAsync(GenericDownloadHandlerUtils.Adapter adapter) => + await adapter.CreateFromJson(WRJsonParser.Unity); + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesByParamSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesByParamSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesByParamSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesByParamSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesDTOByPointersSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesDTOByPointersSystem.cs new file mode 100644 index 0000000000..3441bee97e --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesDTOByPointersSystem.cs @@ -0,0 +1,29 @@ +using Arch.Core; +using Arch.SystemGroups; +using Arch.SystemGroups.DefaultSystemGroups; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.Systems.Abstract; +using DCL.AvatarRendering.Wearables.Components.Intentions; +using DCL.AvatarRendering.Wearables.Helpers; +using DCL.Diagnostics; +using DCL.WebRequests; +using ECS.StreamableLoading.Cache; + +namespace DCL.AvatarRendering.Wearables.Systems.Load +{ + [UpdateInGroup(typeof(PresentationSystemGroup))] + [LogCategory(ReportCategory.WEARABLE)] + public partial class LoadWearablesDTOByPointersSystem : LoadElementsByPointersSystem + { + internal LoadWearablesDTOByPointersSystem( + World world, + IWebRequestController webRequestController, + IStreamableCache cache + ) : base(world, cache, webRequestController) + { + } + + protected override WearablesDTOList CreateAssetFromListOfDTOs(RepoolableList list) => + new (list); + } +} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesDTOByPointersSystem.cs.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesDTOByPointersSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesDTOByPointersSystem.cs.meta rename to Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadWearablesDTOByPointersSystem.cs.meta diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestUtils.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestUtils.cs deleted file mode 100644 index 20ded76f42..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearableAssetBundleManifestUtils.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Threading; -using CommunicationData.URLHelpers; -using Cysharp.Threading.Tasks; -using DCL.Optimization.PerformanceBudgeting; -using DCL.WebRequests; -using ECS.StreamableLoading.Common.Components; -using SceneRunner.Scene; -using Utility; - -namespace DCL.AvatarRendering.Wearables.Systems -{ - public static class LoadWearableAssetBundleManifestUtils - { - private static readonly URLBuilder urlBuilder = new (); - - public static async UniTask LoadWearableAssetBundleManifestAsync(IWebRequestController webRequestController, URLDomain assetBundleURL, - string hash, string reportCategory, CancellationToken ct) - { - urlBuilder.Clear(); - - urlBuilder.AppendDomain(assetBundleURL) - .AppendSubDirectory(URLSubdirectory.FromString("manifest")) - .AppendPath(URLPath.FromString($"{hash}{PlatformUtils.GetPlatform()}.json")); - - var sceneAbDto = await webRequestController.GetAsync(new CommonArguments(urlBuilder.Build(), attemptsCount: 1), ct, reportCategory) - .CreateFromJson(WRJsonParser.Unity, WRThreadFlags.SwitchBackToMainThread); - - return new SceneAssetBundleManifest(assetBundleURL, sceneAbDto.Version, sceneAbDto.Files); - } - } -} \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesByParamSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesByParamSystem.cs deleted file mode 100644 index de64231841..0000000000 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/LoadWearablesByParamSystem.cs +++ /dev/null @@ -1,106 +0,0 @@ -using Arch.Core; -using Arch.SystemGroups; -using Arch.SystemGroups.DefaultSystemGroups; -using CommunicationData.URLHelpers; -using Cysharp.Threading.Tasks; -using DCL.AvatarRendering.Wearables.Components; -using DCL.AvatarRendering.Wearables.Components.Intentions; -using DCL.AvatarRendering.Wearables.Helpers; -using DCL.Diagnostics; -using DCL.Optimization.PerformanceBudgeting; -using DCL.WebRequests; -using ECS; -using ECS.Prioritization.Components; -using ECS.StreamableLoading.Cache; -using ECS.StreamableLoading.Common.Components; -using ECS.StreamableLoading.Common.Systems; -using System; -using System.Collections.Generic; -using System.Threading; - -namespace DCL.AvatarRendering.Wearables.Systems -{ - [UpdateInGroup(typeof(PresentationSystemGroup))] - [LogCategory(ReportCategory.WEARABLE)] - public partial class LoadWearablesByParamSystem : LoadSystemBase - { - private readonly URLSubdirectory lambdaSubdirectory; - private readonly IRealmData realmData; - private readonly URLSubdirectory wearablesSubdirectory; - private readonly IWearableCache wearableCache; - private readonly IWebRequestController webRequestController; - private readonly Func isRealmDataReady; - - internal IURLBuilder urlBuilder = new URLBuilder(); - - public LoadWearablesByParamSystem( - World world, IWebRequestController webRequestController, IStreamableCache cache, - IRealmData realmData, URLSubdirectory lambdaSubdirectory, URLSubdirectory wearablesSubdirectory, - IWearableCache wearableCache) : base(world, cache) - { - this.realmData = realmData; - this.lambdaSubdirectory = lambdaSubdirectory; - this.wearableCache = wearableCache; - this.webRequestController = webRequestController; - this.wearablesSubdirectory = wearablesSubdirectory; - - isRealmDataReady = () => realmData.Configured; - } - - protected override async UniTask> FlowInternalAsync(GetWearableByParamIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) - { - await UniTask.WaitUntil(isRealmDataReady, cancellationToken: ct); - - WearableDTO.LambdaResponse lambdaResponse = - await webRequestController.GetAsync(new CommonArguments(BuildURL(intention.UserID, intention.Params), attemptsCount: 1), ct, GetReportCategory()) - .CreateFromJson(WRJsonParser.Unity); - - // The following logic is not thread-safe! - // TODO make it thread-safe: cache and CreateWearableThumbnailPromise - - intention.TotalAmount = lambdaResponse.totalAmount; - - foreach (var element in lambdaResponse.elements) - { - WearableDTO wearableDto = element.entity; - - IWearable wearable = wearableCache.GetOrAddWearableByDTO(wearableDto); - - foreach (WearableDTO.LambdaResponseIndividualDataDto individualData in element.individualData) - { - // Probably a base wearable, wrongly return individual data. Skip it - if (wearableDto.metadata.id == individualData.id) continue; - - long.TryParse(individualData.transferredAt, out long transferredAt); - decimal.TryParse(individualData.price, out decimal price); - - wearableCache.SetOwnedNft(wearableDto.metadata.id, - new NftBlockchainOperationEntry(individualData.id, - individualData.tokenId, DateTimeOffset.FromUnixTimeSeconds(transferredAt).DateTime, - price)); - } - - intention.Results.Add(wearable); - } - - return new StreamableLoadingResult(new WearablesResponse(intention.Results, intention.TotalAmount)); - } - - private URLAddress BuildURL(string userID, IReadOnlyList<(string, string)> urlEncodedParams) - { - urlBuilder.Clear(); - - urlBuilder.AppendDomainWithReplacedPath(realmData.Ipfs.LambdasBaseUrl, lambdaSubdirectory) - .AppendSubDirectory(URLSubdirectory.FromString(userID)) - .AppendSubDirectory(wearablesSubdirectory); - - if (urlEncodedParams.Count > 0) - { - for (var i = 0; i < urlEncodedParams.Count; i++) - urlBuilder.AppendParameter(urlEncodedParams[i]); - } - - return urlBuilder.Build(); - } - } -} diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/DefaultFaceFeatureHandlerShould.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/DefaultFaceFeatureHandlerShould.cs index 0b2828b982..f51e4e29c5 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/DefaultFaceFeatureHandlerShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/DefaultFaceFeatureHandlerShould.cs @@ -1,4 +1,6 @@ -using DCL.AvatarRendering.Wearables.Components; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using ECS.StreamableLoading.Common.Components; using NSubstitute; @@ -11,7 +13,7 @@ public class DefaultFaceFeatureHandlerShould { private IDefaultFaceFeaturesHandler defaultFaceFeaturesHandler; - private IWearableCache wearableCache; + private IWearableStorage wearableStorage; private Texture eyesTexture; private Texture mouthTexture; @@ -20,13 +22,13 @@ public class DefaultFaceFeatureHandlerShould [SetUp] public void SetUp() { - wearableCache = Substitute.For(); + wearableStorage = Substitute.For(); eyesTexture = CreateFacialFeatureWearable(1, WearablesConstants.Categories.EYES); mouthTexture = CreateFacialFeatureWearable(2, WearablesConstants.Categories.MOUTH); eyebrowsTexture = CreateFacialFeatureWearable(3, WearablesConstants.Categories.EYEBROWS); - defaultFaceFeaturesHandler = new DefaultFaceFeaturesHandler(wearableCache); + defaultFaceFeaturesHandler = new DefaultFaceFeaturesHandler(wearableStorage); } private Texture CreateFacialFeatureWearable(int resolution, string category) @@ -34,14 +36,14 @@ private Texture CreateFacialFeatureWearable(int resolution, string category) var mock = Substitute.For(); var tex = new Texture2D(resolution, resolution); - var main = new StreamableLoadingResult(new WearableTextureAsset(tex, null)); - var mask = new StreamableLoadingResult((WearableTextureAsset)null); // no mask + var main = new StreamableLoadingResult(new AttachmentTextureAsset(tex, null)); + var mask = new StreamableLoadingResult((AttachmentTextureAsset)null); // no mask var array = new WearableAssets[BodyShape.COUNT]; for (var i = 0; i < array.Length; i++) { - var innerArray = new StreamableLoadingResult?[2]; + var innerArray = new StreamableLoadingResult?[2]; innerArray[WearablePolymorphicBehaviour.MAIN_ASSET_INDEX] = main; innerArray[WearablePolymorphicBehaviour.MASK_ASSET_INDEX] = mask; @@ -50,7 +52,7 @@ private Texture CreateFacialFeatureWearable(int resolution, string category) mock.WearableAssetResults.Returns(array); - wearableCache.GetDefaultWearable(Arg.Any(), category).Returns(mock); + wearableStorage.GetDefaultWearable(Arg.Any(), category).Returns(mock); return tex; } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/LoadDefaultWearablesSystemShould.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/LoadDefaultWearablesSystemShould.cs index 561959950f..c9c4aac31b 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/LoadDefaultWearablesSystemShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/LoadDefaultWearablesSystemShould.cs @@ -1,4 +1,6 @@ using AssetManagement; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Components.Intentions; using DCL.AvatarRendering.Wearables.Helpers; @@ -8,12 +10,12 @@ using ECS.TestSuite; using Newtonsoft.Json; using NUnit.Framework; -using System; using System.Collections.Generic; using System.IO; using DCL.Optimization.PerformanceBudgeting; using NSubstitute; using UnityEngine; +using LoadDefaultWearablesSystem = DCL.AvatarRendering.Wearables.Systems.Load.LoadDefaultWearablesSystem; namespace DCL.AvatarRendering.Wearables.Tests { @@ -21,20 +23,23 @@ public class LoadDefaultWearablesSystemShould : UnitySystemTestBase(64); + var repoolableList = RepoolableList.NewList(); + var partialTargetList = repoolableList.List; + partialTargetList.Capacity = 64; + JsonConvert.PopulateObject(File.ReadAllText(definitionsPath), partialTargetList); - wearableCache = new WearableCache(); + wearableStorage = new WearableStorage(); emptyDefaultWearable = new GameObject(); - system = new LoadDefaultWearablesSystem(world, new WearablesDTOList(partialTargetList), + system = new LoadDefaultWearablesSystem(world, new WearablesDTOList(repoolableList), emptyDefaultWearable, - wearableCache); + wearableStorage); system.Initialize(); } @@ -82,12 +87,12 @@ public void LoadEmptyDefaultWearable() { //Look for an empty and a non-empty default wearable IWearable tiaraDefaultWearable = - wearableCache.GetDefaultWearable(BodyShape.MALE, WearablesConstants.Categories.TIARA); + wearableStorage.GetDefaultWearable(BodyShape.MALE, WearablesConstants.Categories.TIARA); IWearable upperBodyDefaultWearable = - wearableCache.GetDefaultWearable(BodyShape.MALE, WearablesConstants.Categories.UPPER_BODY); + wearableStorage.GetDefaultWearable(BodyShape.MALE, WearablesConstants.Categories.UPPER_BODY); - Assert.AreEqual(((WearableRegularAsset)tiaraDefaultWearable.WearableAssetResults[BodyShape.MALE].Results[0].Value.Asset).MainAsset, + Assert.AreEqual(((AttachmentRegularAsset)tiaraDefaultWearable.WearableAssetResults[BodyShape.MALE].Results[0].Value.Asset).MainAsset, emptyDefaultWearable); Assert.AreEqual(tiaraDefaultWearable.GetUrn().ToString(), WearablesConstants.EMPTY_DEFAULT_WEARABLE); @@ -102,15 +107,15 @@ public void LoadEmptyDefaultWearable() [Test] public void HasUnloadPolicySet() { - int defaultWearableCount = wearableCache.wearablesCache.Keys.Count; - wearableCache.AddEmptyWearable("Wearable_To_Be_Unloaded"); - Assert.AreEqual(wearableCache.wearablesCache.Keys.Count, defaultWearableCount + 1); + int defaultWearableCount = wearableStorage.wearablesCache.Keys.Count; + wearableStorage.AddWearable("Wearable_To_Be_Unloaded", IWearable.NewEmpty(), true); + Assert.AreEqual(wearableStorage.wearablesCache.Keys.Count, defaultWearableCount + 1); IReleasablePerformanceBudget concurrentBudgetProvider = Substitute.For(); concurrentBudgetProvider.TrySpendBudget().Returns(true); - wearableCache.Unload(concurrentBudgetProvider); + wearableStorage.Unload(concurrentBudgetProvider); - Assert.AreEqual(wearableCache.wearablesCache.Keys.Count, defaultWearableCount); + Assert.AreEqual(wearableStorage.wearablesCache.Keys.Count, defaultWearableCount); } } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/LoadWearableByParamSystemShould.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/LoadWearableByParamSystemShould.cs index 95389c7e88..bdf736ebcd 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/LoadWearableByParamSystemShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/LoadWearableByParamSystemShould.cs @@ -13,13 +13,14 @@ using System.Threading.Tasks; using UnityEngine; using Utility.Multithreading; +using LoadWearablesByParamSystem = DCL.AvatarRendering.Wearables.Systems.Load.LoadWearablesByParamSystem; namespace DCL.AvatarRendering.Wearables.Tests { [TestFixture] public class LoadWearableByParamSystemShould : LoadSystemBaseShould { - private WearableCache wearableCache; + private WearableStorage wearableStorage; private readonly string existingURN = "urn:decentraland:off-chain:base-avatars:aviatorstyle"; private string successPath => $"file://{Application.dataPath}/../TestResources/Wearables/SuccessUserParam"; @@ -30,30 +31,30 @@ public class LoadWearableByParamSystemShould : LoadSystemBaseShould(); realmData.Configured.Returns(true); return new LoadWearablesByParamSystem(world, TestWebRequestController.INSTANCE, cache, realmData, - URLSubdirectory.EMPTY, URLSubdirectory.FromString("Wearables"), wearableCache); + URLSubdirectory.EMPTY, URLSubdirectory.FromString("Wearables"), wearableStorage); } protected override void AssertSuccess(WearablesResponse asset) { base.AssertSuccess(asset); - foreach (string wearableCatalogKey in wearableCache.wearablesCache.Keys) + foreach (string wearableCatalogKey in wearableStorage.wearablesCache.Keys) Debug.Log(wearableCatalogKey); - Assert.AreEqual(wearableCache.wearablesCache.Count, 1); - Assert.NotNull(wearableCache.wearablesCache[existingURN]); + Assert.AreEqual(wearableStorage.wearablesCache.Count, 1); + Assert.NotNull(wearableStorage.wearablesCache[existingURN]); } [Test] public async Task ConcludeSuccessOnExistingWearable() { - wearableCache.wearablesCache.Add(existingURN, Substitute.For()); + wearableStorage.wearablesCache.Add(existingURN, Substitute.For()); await ConcludeSuccess(); } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/ResolveWearableByPointerSystemShould.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/ResolveWearableByPointerSystemShould.cs index 373b768bd0..96d1e82745 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/ResolveWearableByPointerSystemShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/ResolveWearableByPointerSystemShould.cs @@ -1,21 +1,26 @@ using Arch.Core; using CommunicationData.URLHelpers; +using DCL.AvatarRendering.AvatarShape.Tests.EditMode; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Loading.DTO; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Components.Intentions; using DCL.AvatarRendering.Wearables.Helpers; using DCL.AvatarRendering.Wearables.Systems; +using DCL.Diagnostics; using ECS; using ECS.Prioritization.Components; using ECS.SceneLifeCycle.Tests; using ECS.StreamableLoading.AssetBundles; using ECS.StreamableLoading.Common.Components; using ECS.TestSuite; -using NSubstitute; using NUnit.Framework; using SceneRunner.Scene; using System; using System.Collections.Generic; using System.Threading; +using UnityEngine.TestTools; using Promise = ECS.StreamableLoading.Common.AssetPromise; using AssetBundleManifestPromise = ECS.StreamableLoading.Common.AssetPromise; using AssetBundlePromise = ECS.StreamableLoading.Common.AssetPromise; @@ -23,60 +28,68 @@ namespace DCL.AvatarRendering.Wearables.Tests { [TestFixture] - public class ResolveWearableByPointerSystemShould : UnitySystemTestBase + public class ResolveWearableByPointerSystemShould : UnitySystemTestBase { [SetUp] public void Setup() { mockedABManifest = new StreamableLoadingResult(new SceneAssetBundleManifest(URLDomain.EMPTY, "0", Array.Empty())); - wearableCache = new WearableCache(); + wearableStorage = new WearableStorage(); - mockedAB = new StreamableLoadingResult(new WearableRegularAsset(null, null, null)); + mockedAB = new StreamableLoadingResult(new AttachmentRegularAsset(null, null, null)); - mockedDefaultAB = new StreamableLoadingResult(new WearableRegularAsset(null, null, null)); + mockedDefaultAB = new StreamableLoadingResult(new AttachmentRegularAsset(null, null, null)); IWearable mockDefaultWearable = CreateMockWearable(defaultWearableUrn, false, true); - wearableCache.wearablesCache.Add(mockDefaultWearable.GetUrn(), mockDefaultWearable); + wearableStorage.wearablesCache.Add(mockDefaultWearable.GetUrn(), mockDefaultWearable); + world.Create(new DefaultWearablesComponent { ResolvedState = DefaultWearablesComponent.State.Success, }); - system = new ResolveWearableByPointerSystem(world, wearableCache, new RealmData(new TestIpfsRealm()), URLSubdirectory.EMPTY); + system = new FinalizeWearableLoadingSystem(world, wearableStorage, new RealmData(new TestIpfsRealm()), URLSubdirectory.EMPTY); + system.Initialize(); } - private WearableCache wearableCache; + private WearableStorage wearableStorage; private readonly string testUrn = "urn:decentraland:off-chain:base-avatars:red_hoodie"; private readonly string unisexTestUrn = "urn:decentraland:off-chain:base-avatars:red_hoodie_unisex"; private readonly string defaultWearableUrn = "urn:decentraland:off-chain:base-avatars:green_hoodie"; - private StreamableLoadingResult mockedDefaultAB; + private StreamableLoadingResult mockedDefaultAB; private StreamableLoadingResult mockedABManifest; - private StreamableLoadingResult mockedAB; + private StreamableLoadingResult mockedAB; private IWearable CreateMockWearable(URN urn, bool isUnisex, bool isDefaultWearable) { - IWearable wearable = Substitute.For(); - wearable.GetUrn().Returns(urn); - wearable.IsUnisex().Returns(isUnisex); - wearable.GetCategory().Returns(WearablesConstants.Categories.UPPER_BODY); - var wearableAssets = new WearableAssets[BodyShape.COUNT]; if (isDefaultWearable) wearableAssets[BodyShape.MALE] = mockedDefaultAB; - wearable.WearableAssetResults.Returns(wearableAssets); - wearable.WearableDTO.Returns(new StreamableLoadingResult(new WearableDTO { id = urn })); - wearable.TryGetMainFileHash(Arg.Any(), out Arg.Any()).Returns(x => - { - x[1] = "mockedHash"; - return true; - }); - wearable.GetHash().Returns((string)urn); - return wearable; + return new FakeWearable( + new WearableDTO + { + id = urn, + metadata = new WearableDTO.WearableMetadataDto + { + id = urn, + data = + { + representations = isUnisex + ? new[] { AvatarAttachmentDTO.Representation.NewFakeRepresentation(), AvatarAttachmentDTO.Representation.NewFakeRepresentation() } + : new[] { AvatarAttachmentDTO.Representation.NewFakeRepresentation() }, + category = WearablesConstants.Categories.UPPER_BODY, + }, + } + }, + model: new StreamableLoadingResult(new WearableDTO { id = urn }), + mainHash: "mockedHash", + wearableAssetResults: wearableAssets + ); } private void MockWearableManifestResult(CancellationTokenSource cts, IWearable mockWearable, bool failed) @@ -90,8 +103,8 @@ var assetBundleManifestPromise world.Create(assetBundleManifestPromise, mockWearable, BodyShape.MALE); EntityReference assetBundleManifestPromiseEntity = assetBundleManifestPromise.Entity; - world.Add(assetBundleManifestPromiseEntity, failed ? new StreamableLoadingResult(new Exception("FAILED")) : mockedABManifest); - system.Update(0); + world.Add(assetBundleManifestPromiseEntity, failed ? new StreamableLoadingResult(ReportData.UNSPECIFIED, new Exception("FAILED")) : mockedABManifest); + system!.Update(0); } private void MockABResult(CancellationTokenSource cts, IWearable mockWearable, bool failed) @@ -105,21 +118,23 @@ var assetBundlePromise world.Create(assetBundlePromise, mockWearable, BodyShape.MALE); EntityReference assetBundlePromiseEntity = assetBundlePromise.Entity; - world.Add(assetBundlePromiseEntity, failed ? new StreamableLoadingResult(new Exception("FAILED")) : mockedAB); + world.Add(assetBundlePromiseEntity, failed ? new StreamableLoadingResult(ReportData.UNSPECIFIED, new Exception("FAILED")) : mockedAB); } [Test] public void ResolveWearable() { + LogAssert.ignoreFailingMessages = true; + //Arrange IWearable mockWearable = CreateMockWearable(testUrn, false, false); - wearableCache.wearablesCache.Add(mockWearable.GetUrn(), mockWearable); + wearableStorage.wearablesCache.Add(mockWearable.GetUrn(), mockWearable); var getWearablesByPointersIntention = new GetWearablesByPointersIntention(new List { testUrn }, BodyShape.MALE, Array.Empty()); Promise.Create(world, getWearablesByPointersIntention, PartitionComponent.TOP_PRIORITY); - system.Update(0); + system!.Update(0); //Act MockWearableManifestResult(getWearablesByPointersIntention.CancellationTokenSource, mockWearable, false); @@ -127,21 +142,23 @@ public void ResolveWearable() //Assert mockWearable.WearableAssetResults[BodyShape.MALE] = mockedAB; - mockWearable.Received().ManifestResult = mockedABManifest; + mockWearable.ManifestResult = mockedABManifest; } [Test] public void ResolveUnisexWearable() { + LogAssert.ignoreFailingMessages = true; + //Arrange IWearable mockUnisexWearable = CreateMockWearable(unisexTestUrn, false, true); - wearableCache.wearablesCache.Add(mockUnisexWearable.GetUrn(), mockUnisexWearable); + wearableStorage.wearablesCache.Add(mockUnisexWearable.GetUrn(), mockUnisexWearable); var getWearablesByPointersIntention = new GetWearablesByPointersIntention(new List { unisexTestUrn }, BodyShape.MALE, Array.Empty()); Promise.Create(world, getWearablesByPointersIntention, PartitionComponent.TOP_PRIORITY); - system.Update(0); + system!.Update(0); //Act MockWearableManifestResult(getWearablesByPointersIntention.CancellationTokenSource, mockUnisexWearable, false); @@ -150,15 +167,17 @@ public void ResolveUnisexWearable() //Assert mockUnisexWearable.WearableAssetResults[BodyShape.MALE] = mockedAB; mockUnisexWearable.WearableAssetResults[BodyShape.FEMALE] = mockedAB; - mockUnisexWearable.Received().ManifestResult = mockedABManifest; + mockUnisexWearable.ManifestResult = mockedABManifest; } [Test] public void ResolveDefaultWearableOnManifestFail() { + LogAssert.ignoreFailingMessages = true; + //Arrange IWearable mockWearable = CreateMockWearable(testUrn, false, false); - wearableCache.wearablesCache.Add(mockWearable.GetUrn(), mockWearable); + wearableStorage.wearablesCache.Add(mockWearable.GetUrn(), mockWearable); var getWearablesByPointersIntention = new GetWearablesByPointersIntention(new List { testUrn }, BodyShape.MALE, Array.Empty()); @@ -166,26 +185,28 @@ public void ResolveDefaultWearableOnManifestFail() Promise.Create(world, getWearablesByPointersIntention, PartitionComponent.TOP_PRIORITY); //Act - system.Update(0); + system!.Update(0); MockWearableManifestResult(getWearablesByPointersIntention.CancellationTokenSource, mockWearable, true); //Assert mockWearable.WearableAssetResults[BodyShape.MALE] = mockedDefaultAB; - mockWearable.DidNotReceive().ManifestResult = mockedABManifest; + mockWearable.ManifestResult = mockedABManifest; } [Test] public void ResolveDefaultWearableOnABFail() { + LogAssert.ignoreFailingMessages = true; + //Arrange IWearable mockWearable = CreateMockWearable(testUrn, false, false); - wearableCache.wearablesCache.Add(mockWearable.GetUrn(), mockWearable); + wearableStorage.wearablesCache.Add(mockWearable.GetUrn(), mockWearable); var getWearablesByPointersIntention = new GetWearablesByPointersIntention(new List { testUrn }, BodyShape.MALE, Array.Empty()); Promise.Create(world, getWearablesByPointersIntention, PartitionComponent.TOP_PRIORITY); - system.Update(0); + system!.Update(0); //Act MockWearableManifestResult(getWearablesByPointersIntention.CancellationTokenSource, mockWearable, false); @@ -193,22 +214,24 @@ public void ResolveDefaultWearableOnABFail() //Assert mockWearable.WearableAssetResults[BodyShape.MALE] = mockedDefaultAB; - mockWearable.Received().ManifestResult = mockedABManifest; + mockWearable.ManifestResult = mockedABManifest; } [Test] public void CancelIntentionOnManifestStage() { + LogAssert.ignoreFailingMessages = true; + //Arrange IWearable mockWearable = CreateMockWearable(testUrn, false, false); - wearableCache.wearablesCache.Add(mockWearable.GetUrn(), mockWearable); + wearableStorage.wearablesCache.Add(mockWearable.GetUrn(), mockWearable); var getWearablesByPointersIntention = new GetWearablesByPointersIntention(new List { testUrn }, BodyShape.MALE, Array.Empty()); var promise = Promise.Create(world, getWearablesByPointersIntention, PartitionComponent.TOP_PRIORITY); - system.Update(0); + system!.Update(0); //Act Assert.AreEqual(1, world.CountEntities(in new QueryDescription().WithAll())); @@ -226,21 +249,24 @@ var getWearablesByPointersIntention [Test] public void CancelIntentionOnABStage() { + LogAssert.ignoreFailingMessages = true; + //Arrange IWearable mockWearable = CreateMockWearable(testUrn, false, false); - wearableCache.wearablesCache.Add(mockWearable.GetUrn(), mockWearable); + wearableStorage.AddToInternalCache(mockWearable); var getWearablesByPointersIntention = new GetWearablesByPointersIntention(new List { testUrn }, BodyShape.MALE, Array.Empty()); var promise = Promise.Create(world, getWearablesByPointersIntention, PartitionComponent.TOP_PRIORITY); - system.Update(0); + system!.Update(0); + Assert.AreEqual(0, world.CountEntities(in new QueryDescription().WithAll())); //Mock result and start the next promise //Act MockWearableManifestResult(getWearablesByPointersIntention.CancellationTokenSource, mockWearable, false); + Assert.AreEqual(0, world.CountEntities(in new QueryDescription().WithAll())); system.Update(0); - Assert.AreEqual(1, world.CountEntities(in new QueryDescription().WithAll())); promise.ForgetLoading(world); system.Update(0); diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/WearableAssetShould.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/WearableAssetShould.cs index eb976c9f79..c370e2c107 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/WearableAssetShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/WearableAssetShould.cs @@ -1,4 +1,5 @@ -using DCL.AvatarRendering.Wearables.Helpers; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Wearables.Helpers; using NUnit.Framework; using System.Collections.Generic; using UnityEngine; @@ -12,7 +13,7 @@ public class WearableAssetShould public void ProperlyCountReferenceWhenAddReferenceCalled(int refCount) { // Arrange - var wearableAsset = new WearableRegularAsset(new GameObject(), new List(5), null); + var wearableAsset = new AttachmentRegularAsset(new GameObject(), new List(5), null); // Act for (var i = 0; i < refCount; i++) @@ -28,7 +29,7 @@ public void ProperlyCountReferenceWhenAddReferenceCalled(int refCount) public void ProperlyRemoveReferenceWhenDereferenced(int initialRefs, int derefs, int remainedRefs) { // Arrange - var wearableAsset = new WearableRegularAsset(new GameObject(), new List(5), null); + var wearableAsset = new AttachmentRegularAsset(new GameObject(), new List(5), null); for (var i = 0; i < initialRefs; i++) wearableAsset.AddReference(); diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/WearableCacheShould.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/WearableCacheShould.cs index d4cbf791bd..64cb417176 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/WearableCacheShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/WearableCacheShould.cs @@ -1,4 +1,5 @@ -using DCL.AvatarRendering.Wearables.Helpers; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Wearables.Helpers; using NUnit.Framework; using System.Collections.Generic; using UnityEngine; @@ -7,12 +8,12 @@ namespace DCL.AvatarRendering.Wearables.Tests { public class WearableCacheShould { - private WearableAssetsCache cache; + private AttachmentsAssetsCache cache; [SetUp] public void SetUp() { - cache = new WearableAssetsCache(100); + cache = new AttachmentsAssetsCache(100); } [TearDown] @@ -24,10 +25,10 @@ public void TearDown() [Test] public void ReturnToPool() { - var asset = new WearableRegularAsset(new GameObject("ORIGINAL"), new List(), null); + var asset = new AttachmentRegularAsset(new GameObject("ORIGINAL"), new List(), null); for (var i = 0; i < 2; i++) - cache.Release(new CachedWearable(asset, new GameObject("INSTANCE" + i))); + cache.Release(new CachedAttachment(asset, new GameObject("INSTANCE" + i))); for (var i = 0; i < 2; i++) Assert.That(cache.TryGet(asset, out _), Is.True); @@ -36,10 +37,10 @@ public void ReturnToPool() [Test] public void GetPooledObject() { - var asset = new WearableRegularAsset(new GameObject("ORIGINAL"), new List(), null); + var asset = new AttachmentRegularAsset(new GameObject("ORIGINAL"), new List(), null); for (var i = 0; i < 2; i++) - cache.Release(new CachedWearable(asset, new GameObject("INSTANCE" + i))); + cache.Release(new CachedAttachment(asset, new GameObject("INSTANCE" + i))); for (var i = 0; i < 2; i++) Assert.That(cache.TryGet(asset, out _), Is.True); diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/csc.rsp b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/csc.rsp.meta b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/csc.rsp.meta new file mode 100644 index 0000000000..f3cf2dcfb0 --- /dev/null +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Tests/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b9d3f4b09bc14d6bac669160f8aee9a9 +timeCreated: 1724252319 \ No newline at end of file diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/ThirdParty/IThirdPartyNftProviderSource.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/ThirdParty/IThirdPartyNftProviderSource.cs index 185ca239ab..2fc90b269f 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/ThirdParty/IThirdPartyNftProviderSource.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/ThirdParty/IThirdPartyNftProviderSource.cs @@ -1,4 +1,5 @@ using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using System.Collections.Generic; using System.Threading; @@ -6,6 +7,6 @@ namespace DCL.AvatarRendering.Wearables.ThirdParty { public interface IThirdPartyNftProviderSource { - UniTask> GetAsync(CancellationToken ct); + UniTask> GetAsync(ReportData reportData, CancellationToken ct); } } diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/ThirdParty/RealmThirdPartyNftProviderSource.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/ThirdParty/RealmThirdPartyNftProviderSource.cs index be215794ab..870389fd69 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/ThirdParty/RealmThirdPartyNftProviderSource.cs +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/ThirdParty/RealmThirdPartyNftProviderSource.cs @@ -1,5 +1,6 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using DCL.WebRequests; using ECS; using System.Collections.Generic; @@ -21,7 +22,7 @@ public RealmThirdPartyNftProviderSource(IWebRequestController webRequestControll this.realmData = realmData; } - public async UniTask> GetAsync(CancellationToken ct) + public async UniTask> GetAsync(ReportData reportData, CancellationToken ct) { if (providers != null) return providers; URLBuilder urlBuilder = new URLBuilder(); @@ -30,7 +31,7 @@ public async UniTask> GetAsync(Ca .AppendPath(URLPath.FromString("third-party-integrations")) .Build(); - var request = webRequestController.GetAsync(new CommonArguments(url), ct); + GenericDownloadHandlerUtils.Adapter request = webRequestController.GetAsync(new CommonArguments(url), ct, reportData); ThirdPartyProviderListJsonDto providersDto = await request.CreateFromJson(WRJsonParser.Unity); providers = providersDto.data; return providers; diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Wearables.asmdef b/Explorer/Assets/DCL/AvatarRendering/Wearables/Wearables.asmdef index 0c2e1fc6a2..075e59a6eb 100644 --- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Wearables.asmdef +++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Wearables.asmdef @@ -20,7 +20,9 @@ "GUID:e25ef972de004615a22937e739de2def", "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b", "GUID:5ab29fa8ae5769b49ab29e390caca7a4", - "GUID:91cf8206af184dac8e30eb46747e9939" + "GUID:91cf8206af184dac8e30eb46747e9939", + "GUID:543b8f091a5947a3880b7f2bca2358bd", + "GUID:e5a23cdae0ef4d86aafc237a73280975" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Backpack/Backpack.asmdef b/Explorer/Assets/DCL/Backpack/Backpack.asmdef index 5e205eebe8..09a57585c0 100644 --- a/Explorer/Assets/DCL/Backpack/Backpack.asmdef +++ b/Explorer/Assets/DCL/Backpack/Backpack.asmdef @@ -22,11 +22,12 @@ "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:2f30d6e5229a74284acedda491abcc6e", "GUID:166b65e6dfc848bb9fb075f53c293a38", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:e7751264a6735a942a64770d71eb49e0", "GUID:eec0964c48f6f4e40bc3ec2257ccf8c5", "GUID:ac3295688c7c22745a96e6ac34718181", "GUID:d832748739a186646b8656bdbd447ad0", + "GUID:543b8f091a5947a3880b7f2bca2358bd", + "GUID:e5a23cdae0ef4d86aafc237a73280975", "GUID:f95dba842fdbb470fb6d1dced822ba04", "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b" ], diff --git a/Explorer/Assets/DCL/Backpack/BackpackBus/BackpackBusController.cs b/Explorer/Assets/DCL/Backpack/BackpackBus/BackpackBusController.cs index d18b183550..0b13fef71f 100644 --- a/Explorer/Assets/DCL/Backpack/BackpackBus/BackpackBusController.cs +++ b/Explorer/Assets/DCL/Backpack/BackpackBus/BackpackBusController.cs @@ -1,5 +1,6 @@ using DCL.AvatarRendering.Emotes; using DCL.AvatarRendering.Emotes.Equipped; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Equipped; using DCL.AvatarRendering.Wearables.Helpers; @@ -13,28 +14,28 @@ namespace DCL.Backpack.BackpackBus { public class BackpackBusController : IDisposable { - private readonly IWearableCache wearableCache; + private readonly IWearableStorage wearableStorage; private readonly IBackpackEventBus backpackEventBus; private readonly IBackpackCommandBus backpackCommandBus; private readonly IEquippedEmotes equippedEmotes; - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; private int currentEmoteSlot = -1; private readonly IReadOnlyEquippedWearables equippedWearables; public BackpackBusController( - IWearableCache wearableCache, + IWearableStorage wearableStorage, IBackpackEventBus backpackEventBus, IBackpackCommandBus backpackCommandBus, IReadOnlyEquippedWearables equippedWearables, IEquippedEmotes equippedEmotes, - IEmoteCache emoteCache) + IEmoteStorage emoteStorage) { - this.wearableCache = wearableCache; + this.wearableStorage = wearableStorage; this.backpackEventBus = backpackEventBus; this.backpackCommandBus = backpackCommandBus; this.equippedEmotes = equippedEmotes; - this.emoteCache = emoteCache; + this.emoteStorage = emoteStorage; this.equippedWearables = equippedWearables; this.backpackCommandBus.EquipWearableMessageReceived += HandleEquipWearableCommand; @@ -94,7 +95,7 @@ private void HandleSearchCommand(BackpackSearchCommand command) private void HandleSelectWearableCommand(BackpackSelectWearableCommand command) { - if (wearableCache.TryGetWearable(command.Id, out IWearable wearable)) + if (wearableStorage.TryGetElement(command.Id, out IWearable wearable)) backpackEventBus.SendWearableSelect(wearable); } @@ -106,7 +107,7 @@ private void HandleFilterCategoryCommand(BackpackFilterCategoryCommand command) private void HandleEquipWearableCommand(BackpackEquipWearableCommand command) { - if (!wearableCache.TryGetWearable(command.Id, out IWearable wearable)) + if (!wearableStorage.TryGetElement(command.Id, out IWearable wearable)) { ReportHub.LogError(new ReportData(ReportCategory.WEARABLE), $"Cannot equip wearable, not found: {command.Id}"); return; @@ -162,7 +163,7 @@ private void UnEquipIncompatibleWearables(IWearable bodyShape) private void HandleEmoteEquipCommand(BackpackEquipEmoteCommand command) { - if (!emoteCache.TryGetEmote(command.Id, out IEmote emote)) + if (!emoteStorage.TryGetElement(command.Id, out IEmote emote)) { ReportHub.LogError(new ReportData(ReportCategory.EMOTE), $"Cannot equip emote, not found: {command.Id}"); return; @@ -182,7 +183,7 @@ private void HandleEmoteEquipCommand(BackpackEquipEmoteCommand command) private void HandleUnEquipWearableCommand(BackpackUnEquipWearableCommand command) { - if (!wearableCache.TryGetWearable(command.Id, out IWearable? wearable)) + if (!wearableStorage.TryGetElement(command.Id, out IWearable? wearable)) { ReportHub.LogError(new ReportData(ReportCategory.WEARABLE), $"Cannot un-equip wearable, not found: {command.Id}"); return; @@ -211,7 +212,7 @@ private void HandleUnEquipEmoteCommand(BackpackUnEquipEmoteCommand command) private void HandleSelectEmoteCommand(BackpackSelectEmoteCommand command) { - if (emoteCache.TryGetEmote(command.Id, out IEmote emote)) + if (emoteStorage.TryGetElement(command.Id, out IEmote emote)) backpackEventBus.SendEmoteSelect(emote); } diff --git a/Explorer/Assets/DCL/Backpack/BackpackGridController.cs b/Explorer/Assets/DCL/Backpack/BackpackGridController.cs index a554679764..d1c39fe273 100644 --- a/Explorer/Assets/DCL/Backpack/BackpackGridController.cs +++ b/Explorer/Assets/DCL/Backpack/BackpackGridController.cs @@ -1,6 +1,7 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; using DCL.AssetsProvision; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Equipped; @@ -15,6 +16,7 @@ using UnityEngine; using UnityEngine.Pool; using Utility; +using IAvatarAttachment = DCL.AvatarRendering.Loading.Components.IAvatarAttachment; using Object = UnityEngine.Object; namespace DCL.Backpack diff --git a/Explorer/Assets/DCL/Backpack/BackpackInfoPanel/BackpackInfoPanelController.cs b/Explorer/Assets/DCL/Backpack/BackpackInfoPanel/BackpackInfoPanelController.cs index 35f963387a..1b1fd3f4e7 100644 --- a/Explorer/Assets/DCL/Backpack/BackpackInfoPanel/BackpackInfoPanelController.cs +++ b/Explorer/Assets/DCL/Backpack/BackpackInfoPanel/BackpackInfoPanelController.cs @@ -2,14 +2,17 @@ using Cysharp.Threading.Tasks; using DCL.AssetsProvision; using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Equipped; using DCL.AvatarRendering.Wearables.ThirdParty; using DCL.Backpack.BackpackBus; +using DCL.Diagnostics; using System; using System.Collections.Generic; using System.Threading; using Utility; +using IAvatarAttachment = DCL.AvatarRendering.Loading.Components.IAvatarAttachment; namespace DCL.Backpack { @@ -115,7 +118,7 @@ private async UniTaskVoid WaitForThumbnailAsync(IAvatarAttachment itemWearable, private async UniTaskVoid TrySetThirdPartyProviderNameAsync(IAvatarAttachment nft, CancellationToken ct) { - IReadOnlyList tpws = await thirdPartyNftProviderSource.GetAsync(ct); + IReadOnlyList tpws = await thirdPartyNftProviderSource.GetAsync(ReportCategory.BACKPACK, ct); URN urn = nft.GetUrn(); foreach (ThirdPartyNftProviderDefinition tpw in tpws) diff --git a/Explorer/Assets/DCL/Backpack/BackpackInfoPanel/HideCategoriesController.cs b/Explorer/Assets/DCL/Backpack/BackpackInfoPanel/HideCategoriesController.cs index 15c985949e..7392e094be 100644 --- a/Explorer/Assets/DCL/Backpack/BackpackInfoPanel/HideCategoriesController.cs +++ b/Explorer/Assets/DCL/Backpack/BackpackInfoPanel/HideCategoriesController.cs @@ -2,6 +2,7 @@ using Cysharp.Threading.Tasks; using DCL.AssetsProvision; using DCL.AvatarRendering.AvatarShape.Helpers; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.AvatarRendering.Wearables.Equipped; diff --git a/Explorer/Assets/DCL/Backpack/BackpackSearchController.cs b/Explorer/Assets/DCL/Backpack/BackpackSearchController.cs index 5a88f195e7..efa44924c0 100644 --- a/Explorer/Assets/DCL/Backpack/BackpackSearchController.cs +++ b/Explorer/Assets/DCL/Backpack/BackpackSearchController.cs @@ -37,12 +37,12 @@ public BackpackSearchController(SearchBarView view, private void RestoreInput(string text) { - inputBlock.Enable(InputMapComponent.Kind.Shortcuts); + inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS); } private void DisableShortcutsInput(string text) { - inputBlock.Disable(InputMapComponent.Kind.Shortcuts); + inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS); } private void OnSearchEvent(string searchString) diff --git a/Explorer/Assets/DCL/Backpack/BackpackSlotsController.cs b/Explorer/Assets/DCL/Backpack/BackpackSlotsController.cs index 7cef600399..2e0ed3dd37 100644 --- a/Explorer/Assets/DCL/Backpack/BackpackSlotsController.cs +++ b/Explorer/Assets/DCL/Backpack/BackpackSlotsController.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using DCL.AvatarRendering.AvatarShape.Helpers; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables; using DCL.AvatarRendering.Wearables.Components; using DCL.Backpack.BackpackBus; diff --git a/Explorer/Assets/DCL/Backpack/CharacterPreview/BackpackCharacterPreviewController.cs b/Explorer/Assets/DCL/Backpack/CharacterPreview/BackpackCharacterPreviewController.cs index 0c67064aef..c46d21dd57 100644 --- a/Explorer/Assets/DCL/Backpack/CharacterPreview/BackpackCharacterPreviewController.cs +++ b/Explorer/Assets/DCL/Backpack/CharacterPreview/BackpackCharacterPreviewController.cs @@ -3,6 +3,7 @@ using Cysharp.Threading.Tasks; using DCL.AvatarRendering.Emotes; using DCL.AvatarRendering.Emotes.Equipped; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.Backpack.BackpackBus; diff --git a/Explorer/Assets/DCL/Backpack/EmotesSection/BackpackEmoteGridController.cs b/Explorer/Assets/DCL/Backpack/EmotesSection/BackpackEmoteGridController.cs index e799e48665..99619e8bea 100644 --- a/Explorer/Assets/DCL/Backpack/EmotesSection/BackpackEmoteGridController.cs +++ b/Explorer/Assets/DCL/Backpack/EmotesSection/BackpackEmoteGridController.cs @@ -3,11 +3,13 @@ using DCL.AssetsProvision; using DCL.AvatarRendering.Emotes; using DCL.AvatarRendering.Emotes.Equipped; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.Backpack.BackpackBus; using DCL.UI; +using DCL.Utilities.Extensions; using DCL.Web3.Identities; using System; using System.Collections.Generic; @@ -16,6 +18,7 @@ using UnityEngine; using UnityEngine.Pool; using Utility; +using IAvatarAttachment = DCL.AvatarRendering.Loading.Components.IAvatarAttachment; using Object = UnityEngine.Object; namespace DCL.Backpack.EmotesSection @@ -134,23 +137,37 @@ async UniTaskVoid RequestPageAsync(CancellationToken ct) { IReadOnlyList emotes; - (IReadOnlyList? customOwnedEmotes, int totalAmount) = await emoteProvider.GetOwnedEmotesAsync(web3IdentityCache.Identity!.Address, - pageNum: pageNumber, pageSize: CURRENT_PAGE_SIZE, - orderOperation: currentOrder, - name: currentSearch, - ct: ct); + using var _ = ListPool.Get(out var customOwnedEmotes); + customOwnedEmotes = customOwnedEmotes.EnsureNotNull(); + + int totalAmount = await emoteProvider.GetOwnedEmotesAsync( + web3IdentityCache.Identity!.Address, + ct, + new IEmoteProvider.OwnedEmotesRequestOptions( + pageNum: pageNumber, + pageSize: CURRENT_PAGE_SIZE, + collectionId: null, + orderOperation: currentOrder, + name: currentSearch + ), + customOwnedEmotes + ); if (onChainEmotesOnly) emotes = customOwnedEmotes; else { - IReadOnlyList embeddedEmotes = await emoteProvider.GetEmotesAsync(embeddedEmoteIds, currentBodyShape, ct); + using var scope = ListPool.Get(out var embeddedEmotes); + embeddedEmotes = embeddedEmotes.EnsureNotNull(); + + await emoteProvider.GetEmotesAsync(embeddedEmoteIds, currentBodyShape, ct, embeddedEmotes); + IEnumerable filteredEmotes = embeddedEmotes; - if (!string.IsNullOrEmpty(currentSearch)) + if (!string.IsNullOrEmpty(currentSearch!)) filteredEmotes = embeddedEmotes.Where(emote => emote.GetName().Contains(currentSearch)); - if (!string.IsNullOrEmpty(currentCategory)) + if (!string.IsNullOrEmpty(currentCategory!)) filteredEmotes = embeddedEmotes.Where(emote => emote.GetCategory() == currentCategory); filteredEmotes = currentOrder.By switch diff --git a/Explorer/Assets/DCL/Backpack/EmotesSection/BackpackEmoteSlotsController.cs b/Explorer/Assets/DCL/Backpack/EmotesSection/BackpackEmoteSlotsController.cs index 8b8c51f6df..442a8f3536 100644 --- a/Explorer/Assets/DCL/Backpack/EmotesSection/BackpackEmoteSlotsController.cs +++ b/Explorer/Assets/DCL/Backpack/EmotesSection/BackpackEmoteSlotsController.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Components; using DCL.Backpack.BackpackBus; using System; using System.Threading; diff --git a/Explorer/Assets/DCL/BadgesAPIService.meta b/Explorer/Assets/DCL/BadgesAPIService.meta new file mode 100644 index 0000000000..d576f8876c --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a234c3acc85f41cf9c5f1abb6336d05d +timeCreated: 1723639088 \ No newline at end of file diff --git a/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIClient.cs b/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIClient.cs new file mode 100644 index 0000000000..eeed2d8561 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIClient.cs @@ -0,0 +1,100 @@ +using Cysharp.Threading.Tasks; +using DCL.Diagnostics; +using DCL.Multiplayer.Connections.DecentralandUrls; +using DCL.WebRequests; +using System; +using System.Collections.Generic; +using System.Threading; +using UnityEngine.Pool; + +namespace DCL.BadgesAPIService +{ + public class BadgesAPIClient + { + private readonly IWebRequestController webRequestController; + private readonly IDecentralandUrlsSource decentralandUrlsSource; + + private readonly IObjectPool> overviewBadgesPool; + + private readonly BadgesInfo instantiatedDetailedBadges; + + private string badgesBaseUrl => decentralandUrlsSource.Url(DecentralandUrl.Badges); + + public BadgesAPIClient(IWebRequestController webRequestController, IDecentralandUrlsSource decentralandUrlsSource) + { + this.webRequestController = webRequestController; + this.decentralandUrlsSource = decentralandUrlsSource; + + instantiatedDetailedBadges = new BadgesInfo + { + achieved = new List(), + notAchieved = new List(), + }; + } + + public async UniTask> FetchBadgeCategoriesAsync(CancellationToken ct) + { + var url = $"{badgesBaseUrl}/categories"; + + CategoriesResponse badgesResponse = await webRequestController.GetAsync(url, ct, reportData: ReportCategory.BADGES) + .CreateFromJson(WRJsonParser.Newtonsoft); + + return badgesResponse.data.categories; + } + + public async UniTask> FetchLatestAchievedBadgesAsync(string walletId, CancellationToken ct) + { + var url = $"{badgesBaseUrl}/users/{walletId}/preview"; + + LatestAchievedBadgesResponse latestAchievedBadgesResponse = await webRequestController.GetAsync(url, ct, reportData: ReportCategory.BADGES) + .CreateFromJson(WRJsonParser.Newtonsoft); + + return (IReadOnlyList)latestAchievedBadgesResponse.data.latestAchievedBadges ?? Array.Empty(); + } + + public async UniTask FetchBadgesAsync(string walletId, bool isOwnProfile, CancellationToken ct) + { + ClearDetailedBadges(); + + var url = $"{badgesBaseUrl}/users/{walletId}/badges?includeNotAchieved={(isOwnProfile ? "true" : "false")}"; + + BadgesResponse badgesResponse = await webRequestController.GetAsync(url, ct, reportData: ReportCategory.BADGES) + .CreateFromJson(WRJsonParser.Newtonsoft); + + return DetailedBadgesResponseToBadgesInfo(badgesResponse, isOwnProfile); + } + + public async UniTask> FetchTiersAsync(string badgeId, CancellationToken ct) + { + var url = $"{badgesBaseUrl}/badges/{badgeId}/tiers"; + + TiersResponse tiersResponse = await webRequestController.GetAsync(url, ct, reportData: ReportCategory.BADGES) + .CreateFromJson(WRJsonParser.Newtonsoft); + + return (IReadOnlyList)tiersResponse.data.tiers ?? Array.Empty(); + } + + private void ClearDetailedBadges() + { + instantiatedDetailedBadges.achieved.Clear(); + instantiatedDetailedBadges.notAchieved.Clear(); + } + + private BadgesInfo DetailedBadgesResponseToBadgesInfo(BadgesResponse badgesResponse, bool isOwnProfile) + { + foreach (var badge in badgesResponse.data.achieved) + instantiatedDetailedBadges.achieved.Add(ResponseToBadgeInfo(badge, false, isOwnProfile)); + + foreach (var badge in badgesResponse.data.notAchieved) + instantiatedDetailedBadges.notAchieved.Add(ResponseToBadgeInfo(badge, true, isOwnProfile)); + + return instantiatedDetailedBadges; + } + + private BadgeInfo ResponseToBadgeInfo(BadgeData badge, bool isLocked, bool isOwnProfile) + { + var achievedBadgeInfo = new BadgeInfo(badge, isLocked, isOwnProfile && BadgesUtils.IsBadgeNew(badge.id)); + return achievedBadgeInfo; + } + } +} diff --git a/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIClient.cs.meta b/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIClient.cs.meta new file mode 100644 index 0000000000..8361c1d3f7 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIClient.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6d8ba802820e48119ebe3ae21a0b80a0 +timeCreated: 1723640509 \ No newline at end of file diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/Diagnostics.asmdef b/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIService.asmdef similarity index 58% rename from Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/Diagnostics.asmdef rename to Explorer/Assets/DCL/BadgesAPIService/BadgesAPIService.asmdef index 39a65777b9..f54e16c4ed 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/Diagnostics.asmdef +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIService.asmdef @@ -1,11 +1,11 @@ { - "name": "Diagnostics", + "name": "BadgesAPIService", "rootNamespace": "", "references": [ - "GUID:fa7b3fdbb04d67549916da7bd2af58ab", - "GUID:275e22790c04e9b47a5085d7b0c4432a", - "GUID:9887bf5401cdc9140916d3edbea10b69", - "GUID:8e4451082aee64eec9b1cf3f1f114bbd" + "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", + "GUID:91cf8206af184dac8e30eb46747e9939", + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIService.asmdef.meta b/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIService.asmdef.meta new file mode 100644 index 0000000000..15b24ccbf3 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesAPIService.asmdef.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 009d9a3e28944e8590be5228174e6979 +timeCreated: 1723639674 \ No newline at end of file diff --git a/Explorer/Assets/DCL/BadgesAPIService/BadgesInfo.cs b/Explorer/Assets/DCL/BadgesAPIService/BadgesInfo.cs new file mode 100644 index 0000000000..14c90894eb --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesInfo.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; + +namespace DCL.BadgesAPIService +{ + [Serializable] + public class BadgesInfo + { + public List achieved; + public List notAchieved; + } + + public struct BadgeInfo + { + public readonly BadgeData data; + public readonly bool isLocked; + public readonly bool isNew; + + public BadgeInfo(BadgeData data, bool isLocked, bool isNew) + { + this.data = data; + this.isLocked = isLocked; + this.isNew = isNew; + } + } +} diff --git a/Explorer/Assets/DCL/BadgesAPIService/BadgesInfo.cs.meta b/Explorer/Assets/DCL/BadgesAPIService/BadgesInfo.cs.meta new file mode 100644 index 0000000000..35c2da9b10 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesInfo.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2931747e8d3c416cb7d7fb7821c8d496 +timeCreated: 1724063037 \ No newline at end of file diff --git a/Explorer/Assets/DCL/BadgesAPIService/BadgesResponse.cs b/Explorer/Assets/DCL/BadgesAPIService/BadgesResponse.cs new file mode 100644 index 0000000000..e4c4c36702 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesResponse.cs @@ -0,0 +1,69 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; + +namespace DCL.BadgesAPIService +{ + [Serializable] + public class BadgesResponse + { + public ProfileBadgesData data; + } + + [Serializable] + public class ProfileBadgesData + { + public List achieved; + public List notAchieved; + } + + [Serializable] + public class BadgeData + { + public string id; + public string name; + public string description; + public string category; + public bool isTier; + public string completedAt; + public BadgeAssetsData assets; + public BadgeProgressData progress; + } + + [Serializable] + public class BadgeProgressData + { + public int stepsDone; + public int? nextStepsTarget; + public int totalStepsTarget; + public string lastCompletedTierAt; + public string lastCompletedTierName; + public string lastCompletedTierImage; + public List achievedTiers; + } + + [Serializable] + public class AchievedTierData + { + public string tierId; + public string completedAt; + } + + [Serializable] + public class BadgeAssetsData + { + [JsonProperty("2d")] + public BadgeTexturesData textures2d; + + [JsonProperty("3d")] + public BadgeTexturesData textures3d; + } + + [Serializable] + public class BadgeTexturesData + { + public string normal; + public string hrm; + public string baseColor; + } +} diff --git a/Explorer/Assets/DCL/BadgesAPIService/BadgesResponse.cs.meta b/Explorer/Assets/DCL/BadgesAPIService/BadgesResponse.cs.meta new file mode 100644 index 0000000000..65c8fa0625 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesResponse.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9b7ea569152d452b835007a1a46087ed +timeCreated: 1723639731 \ No newline at end of file diff --git a/Explorer/Assets/DCL/BadgesAPIService/BadgesUtils.cs b/Explorer/Assets/DCL/BadgesAPIService/BadgesUtils.cs new file mode 100644 index 0000000000..d4c83ce5b4 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesUtils.cs @@ -0,0 +1,64 @@ +using System; +using System.Globalization; +using UnityEngine; + +namespace DCL.BadgesAPIService +{ + public static class BadgesUtils + { + private const string NEW_BADGES_LOCAL_STORAGE_KEY = "NewBadges"; + + public static string FormatTimestampDate(string timestampString) + { + DateTime date = DateTimeOffset.FromUnixTimeMilliseconds(long.Parse(timestampString)).DateTime; + var formattedDate = date.ToString("MMM. yyyy", CultureInfo.InvariantCulture); + return formattedDate; + } + + public static bool IsBadgeNew(string badgeId) + { + string allNewBadges = PlayerPrefs.GetString(NEW_BADGES_LOCAL_STORAGE_KEY, string.Empty); + return allNewBadges.Contains(badgeId); + } + + public static void SetBadgeAsNew(string badgeId) + { + string allNewBadges = PlayerPrefs.GetString(NEW_BADGES_LOCAL_STORAGE_KEY, string.Empty); + + if (allNewBadges.Contains(badgeId)) + return; + + PlayerPrefs.SetString(NEW_BADGES_LOCAL_STORAGE_KEY, $"{allNewBadges}{badgeId},"); + PlayerPrefs.Save(); + } + + public static void SetBadgeAsRead(string badgeId) + { + string allNewBadges = PlayerPrefs.GetString(NEW_BADGES_LOCAL_STORAGE_KEY, string.Empty); + PlayerPrefs.SetString(NEW_BADGES_LOCAL_STORAGE_KEY, allNewBadges.Replace($"{badgeId},", string.Empty)); + PlayerPrefs.Save(); + } + + public static string GetTierCompletedDate(this BadgeInfo badgeInfo, string tierId) + { + string tierCompletedAt = string.Empty; + + if (badgeInfo.data.progress.achievedTiers != null) + { + foreach (var achievedTier in badgeInfo.data.progress.achievedTiers) + { + if (tierId != achievedTier.tierId) + continue; + + tierCompletedAt = achievedTier.completedAt; + break; + } + } + + return tierCompletedAt; + } + + public static int GetProgressPercentage(this in BadgeInfo badgeInfo) => + badgeInfo.isLocked ? 0 : badgeInfo.data.progress.stepsDone * 100 / (badgeInfo.data.progress.nextStepsTarget ?? badgeInfo.data.progress.totalStepsTarget); + } +} diff --git a/Explorer/Assets/DCL/BadgesAPIService/BadgesUtils.cs.meta b/Explorer/Assets/DCL/BadgesAPIService/BadgesUtils.cs.meta new file mode 100644 index 0000000000..4bfb7f8e0a --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/BadgesUtils.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0a4995a8ed094a4798a8f19601d663f0 +timeCreated: 1723741185 \ No newline at end of file diff --git a/Explorer/Assets/DCL/BadgesAPIService/CategoriesResponse.cs b/Explorer/Assets/DCL/BadgesAPIService/CategoriesResponse.cs new file mode 100644 index 0000000000..767b705783 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/CategoriesResponse.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace DCL.BadgesAPIService +{ + [Serializable] + public class CategoriesResponse + { + public CategoriesData data; + } + + [Serializable] + public class CategoriesData + { + public List categories; + } +} diff --git a/Explorer/Assets/DCL/BadgesAPIService/CategoriesResponse.cs.meta b/Explorer/Assets/DCL/BadgesAPIService/CategoriesResponse.cs.meta new file mode 100644 index 0000000000..d9de0ae740 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/CategoriesResponse.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f98fdaaa18c44a5dbe447f16aa4df50f +timeCreated: 1724145741 \ No newline at end of file diff --git a/Explorer/Assets/DCL/BadgesAPIService/LatestAchievedBadgesResponse.cs b/Explorer/Assets/DCL/BadgesAPIService/LatestAchievedBadgesResponse.cs new file mode 100644 index 0000000000..590b302bc6 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/LatestAchievedBadgesResponse.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; + +namespace DCL.BadgesAPIService +{ + [Serializable] + public class LatestAchievedBadgesResponse + { + public LatestAchievedBadgesData data; + } + + [Serializable] + public class LatestAchievedBadgesData + { + public List latestAchievedBadges; + } + + [Serializable] + public class LatestAchievedBadgeData + { + public string id; + public string name; + public string tierName; + public string image; + } +} diff --git a/Explorer/Assets/DCL/BadgesAPIService/LatestAchievedBadgesResponse.cs.meta b/Explorer/Assets/DCL/BadgesAPIService/LatestAchievedBadgesResponse.cs.meta new file mode 100644 index 0000000000..eb98e85d2e --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/LatestAchievedBadgesResponse.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 97015665f79044d496dee65c736ef026 +timeCreated: 1724404083 \ No newline at end of file diff --git a/Explorer/Assets/DCL/BadgesAPIService/TiersResponse.cs b/Explorer/Assets/DCL/BadgesAPIService/TiersResponse.cs new file mode 100644 index 0000000000..144e038c0c --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/TiersResponse.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; + +namespace DCL.BadgesAPIService +{ + [Serializable] + public class TiersResponse + { + public TiersData data; + } + + [Serializable] + public class TiersData + { + public List tiers; + } + + [Serializable] + public class TierData + { + public string tierId; + public string tierName; + public string description; + public BadgeAssetsData assets; + public BadgeTierCriteria criteria; + } + + [Serializable] + public class BadgeTierCriteria + { + public int steps; + } +} diff --git a/Explorer/Assets/DCL/BadgesAPIService/TiersResponse.cs.meta b/Explorer/Assets/DCL/BadgesAPIService/TiersResponse.cs.meta new file mode 100644 index 0000000000..9c703daa30 --- /dev/null +++ b/Explorer/Assets/DCL/BadgesAPIService/TiersResponse.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6b09c3d59e57490cac0c08492c856b3e +timeCreated: 1724409711 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Browser/DecentralandUrls/DecentralandUrl.cs b/Explorer/Assets/DCL/Browser/DecentralandUrls/DecentralandUrl.cs index 462fdff571..b5710d9fdf 100644 --- a/Explorer/Assets/DCL/Browser/DecentralandUrls/DecentralandUrl.cs +++ b/Explorer/Assets/DCL/Browser/DecentralandUrls/DecentralandUrl.cs @@ -33,10 +33,14 @@ public enum DecentralandUrl Notification, NotificationRead, + Help, + FeatureFlags, Market, AssetBundlesCDN, + + Badges, } } diff --git a/Explorer/Assets/DCL/Browser/DecentralandUrls/DecentralandUrlsSource.cs b/Explorer/Assets/DCL/Browser/DecentralandUrls/DecentralandUrlsSource.cs index a288611528..776775bb30 100644 --- a/Explorer/Assets/DCL/Browser/DecentralandUrls/DecentralandUrlsSource.cs +++ b/Explorer/Assets/DCL/Browser/DecentralandUrls/DecentralandUrlsSource.cs @@ -47,14 +47,16 @@ private static string RawUrl(DecentralandUrl decentralandUrl) => DecentralandUrl.ApiChunks => $"https://api.decentraland.{ENV}/v1/map.png", DecentralandUrl.PeerAbout => $"https://peer.decentraland.{ENV}/about", DecentralandUrl.DAO => $"https://decentraland.{ENV}/dao/", - DecentralandUrl.Notification => $"https://notifications.decentraland.{ENV}/notifications", - DecentralandUrl.NotificationRead => $"https://notifications.decentraland.{ENV}/notifications/read", + DecentralandUrl.Notification => $"https://notifications.decentraland.org/notifications", + DecentralandUrl.NotificationRead => $"https://notifications.decentraland.org/notifications/read", DecentralandUrl.FeatureFlags => $"https://feature-flags.decentraland.{ENV}", + DecentralandUrl.Help => "https://decentraland.org/help/", DecentralandUrl.Market => "https://market.decentraland.org", DecentralandUrl.AssetBundlesCDN => "https://ab-cdn.decentraland.org", DecentralandUrl.ArchipelagoStatus => $"https://archipelago-stats.decentraland.{ENV}/status", DecentralandUrl.GatekeeperStatus => $"https://comms-gatekeeper.decentraland.{ENV}/status", DecentralandUrl.Genesis => $"https://realm-provider-ea.decentraland.{ENV}/main", + DecentralandUrl.Badges => $"https://badges.decentraland.org", _ => throw new ArgumentOutOfRangeException(nameof(decentralandUrl), decentralandUrl, null!) }; } diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs b/Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs index 4a8dbece63..9834af1c01 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs @@ -5,6 +5,7 @@ public enum CameraMode : byte FirstPerson, ThirdPerson, DroneView, + SDKCamera, /// /// Free-fly, does not follow character, intercepts controls designated for character movement diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Character Camera.prefab b/Explorer/Assets/DCL/Character/CharacterCamera/Character Camera.prefab index 0e871a6118..4e1c1a51d1 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/Character Camera.prefab +++ b/Explorer/Assets/DCL/Character/CharacterCamera/Character Camera.prefab @@ -1050,7 +1050,7 @@ MonoBehaviour: FocusDistance: 10 m_SensorSize: {x: 1, y: 1} m_Transitions: - m_BlendHint: 0 + m_BlendHint: 1 m_InheritPosition: 0 m_OnCameraLive: m_PersistentCalls: @@ -1443,7 +1443,7 @@ MonoBehaviour: FocusDistance: 10 m_SensorSize: {x: 1, y: 1} m_Transitions: - m_BlendHint: 0 + m_BlendHint: 1 m_InheritPosition: 0 m_OnCameraLive: m_PersistentCalls: @@ -1997,12 +1997,12 @@ MonoBehaviour: m_RequiresColorTexture: 0 m_Version: 2 m_TaaSettings: - quality: 3 - frameInfluence: 0.1 - jitterScale: 1 - mipBias: 0 - varianceClampScale: 0.9 - contrastAdaptiveSharpening: 0 + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!114 &1924827267997815873 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/ExposedCameraData.cs b/Explorer/Assets/DCL/Character/CharacterCamera/ExposedCameraData.cs index 85ac94db86..6696605ecc 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/ExposedCameraData.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/ExposedCameraData.cs @@ -1,4 +1,5 @@ using Arch.Core; +using Cinemachine; using DCL.Utilities; using System.Collections.Generic; using UnityEngine; @@ -17,6 +18,8 @@ public class ExposedCameraData : IExposedCameraData public CanBeDirty PointerIsLocked; public CanBeDirty CameraType = CanBeDirty.FromEnum(); public ObjectProxy CameraEntityProxy { get; } = new (); + public CinemachineBrain? CinemachineBrain { get; set; } + public CameraMode CameraMode { get; set; } CanBeDirty IExposedCameraData.WorldPosition => WorldPosition; CanBeDirty IExposedCameraData.WorldRotation => WorldRotation; diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/IExposedCameraData.cs b/Explorer/Assets/DCL/Character/CharacterCamera/IExposedCameraData.cs index 8e028ea0a0..01ac01b418 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/IExposedCameraData.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/IExposedCameraData.cs @@ -1,4 +1,5 @@ using Arch.Core; +using Cinemachine; using DCL.Utilities; using System.Collections.Generic; using UnityEngine; @@ -25,6 +26,8 @@ public interface IExposedCameraData : IExposedTransform CanBeDirty IExposedTransform.Position => WorldPosition; CanBeDirty IExposedTransform.Rotation => WorldRotation; + CinemachineBrain? CinemachineBrain { get; set; } + CameraMode CameraMode { get; set; } public class Fake : IExposedCameraData { @@ -34,6 +37,8 @@ public class Fake : IExposedCameraData public CanBeDirty PointerIsLocked { get; } public ObjectProxy CameraEntityProxy { get; } = new (); + public CinemachineBrain? CinemachineBrain { get; set; } + public CameraMode CameraMode { get; set; } public Fake(Vector3 worldPosition, Quaternion worldRotation, CameraType cameraType, bool pointerIsLocked) { @@ -59,6 +64,8 @@ public class Random : IExposedCameraData public CanBeDirty CameraType { get; } public CanBeDirty PointerIsLocked { get; } public ObjectProxy CameraEntityProxy { get; } = new (); + public CinemachineBrain? CinemachineBrain { get; set; } + public CameraMode CameraMode { get; set; } public Random() { diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Settings/Character Camera Blends.asset b/Explorer/Assets/DCL/Character/CharacterCamera/Settings/Character Camera Blends.asset index 4467c65345..f98c1e9d45 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/Settings/Character Camera Blends.asset +++ b/Explorer/Assets/DCL/Character/CharacterCamera/Settings/Character Camera Blends.asset @@ -13,7 +13,7 @@ MonoBehaviour: m_Name: Character Camera Blends m_EditorClassIdentifier: m_CustomBlends: - - m_From: FirstPersonCameraSettings + - m_From: '**ANY CAMERA**' m_To: ThirdPersonCameraSettings m_Blend: m_Style: 1 @@ -24,7 +24,7 @@ MonoBehaviour: m_PreInfinity: 0 m_PostInfinity: 0 m_RotationOrder: 0 - - m_From: ThirdPersonCameraSettings + - m_From: '**ANY CAMERA**' m_To: FirstPersonCameraSettings m_Blend: m_Style: 1 @@ -35,7 +35,7 @@ MonoBehaviour: m_PreInfinity: 0 m_PostInfinity: 0 m_RotationOrder: 0 - - m_From: ThirdPersonCameraSettings + - m_From: '**ANY CAMERA**' m_To: DroneViewCameraSettings m_Blend: m_Style: 1 @@ -46,10 +46,10 @@ MonoBehaviour: m_PreInfinity: 0 m_PostInfinity: 0 m_RotationOrder: 0 - - m_From: DroneViewCameraSettings - m_To: ThirdPersonCameraSettings + - m_From: '**ANY CAMERA**' + m_To: PreviewCamera m_Blend: - m_Style: 1 + m_Style: 0 m_Time: 0.5 m_CustomCurve: serializedVersion: 2 diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ApplyCinemachineCameraInputSystem.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ApplyCinemachineCameraInputSystem.cs index db2b1ab0a7..58a899d6fc 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ApplyCinemachineCameraInputSystem.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ApplyCinemachineCameraInputSystem.cs @@ -45,6 +45,7 @@ private void Apply([Data] float dt, ref CameraComponent camera, ref CameraInput dvc.m_YAxis.m_InputAxisValue = cameraInput.Delta.y; break; case CameraMode.ThirdPerson: + case CameraMode.SDKCamera: CinemachineFreeLook tpc = cinemachinePreset.ThirdPersonCameraData.Camera; tpc.m_XAxis.m_InputAxisValue = cameraInput.Delta.x; tpc.m_YAxis.m_InputAxisValue = cameraInput.Delta.y; @@ -63,7 +64,7 @@ private void Apply([Data] float dt, ref CameraComponent camera, ref CameraInput ApplyFOV(dt, cinemachinePreset, in cameraInput); break; default: - ReportHub.LogError(GetReportCategory(), $"Camera mode is unknown {camera.Mode}"); + ReportHub.LogError(GetReportData(), $"Camera mode is unknown {camera.Mode}"); break; } @@ -93,7 +94,7 @@ private void ForceLookAt(in Entity entity, ref CameraComponent camera, ref ICine cinemachinePreset.ForceFreeCameraLookAt(lookAtIntent); break; default: - ReportHub.LogError(GetReportCategory(), $"Camera mode is unknown {camera.Mode}"); + ReportHub.LogError(GetReportData(), $"Camera mode is unknown {camera.Mode}"); break; } diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ControlCinemachineVirtualCameraSystem.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ControlCinemachineVirtualCameraSystem.cs index 149d54dc0b..f0062430a1 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ControlCinemachineVirtualCameraSystem.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ControlCinemachineVirtualCameraSystem.cs @@ -7,9 +7,9 @@ using DCL.CharacterCamera; using DCL.CharacterCamera.Components; using DCL.CharacterCamera.Settings; -using DCL.CharacterMotion.Components; using DCL.Input; using DCL.Input.Component; +using DCL.Input.Systems; using ECS.Abstract; using UnityEngine; @@ -58,9 +58,10 @@ protected override void Update(float t) [None(typeof(CameraBlockerComponent))] private void HandleCameraInput([Data] float dt, in CameraComponent cameraComponent) { + if (cameraComponent.Mode == CameraMode.SDKCamera) return; + // this blocks the user of changing the current camera, but the SDK still can do it - if (!cameraComponent.CameraInputChangeEnabled) - return; + if (!cameraComponent.CameraInputChangeEnabled) return; HandleZoomingQuery(World); HandleSwitchStateQuery(World); @@ -71,6 +72,7 @@ private void HandleCameraInput([Data] float dt, in CameraComponent cameraCompone [Query] private void UpdateCameraState(ref CameraComponent cameraComponent, ref ICinemachinePreset cinemachinePreset, ref CinemachineCameraState state) { + if (cameraComponent.Mode == CameraMode.SDKCamera) return; SwitchCamera(cameraComponent.Mode, ref cinemachinePreset, ref cameraComponent, ref state); } @@ -128,14 +130,14 @@ private void SetActiveCamera(CameraMode targetCameraMode, ICinemachinePreset cin if (targetCameraMode != CameraMode.Free && currentCameraMode == CameraMode.Free) { ref InputMapComponent inputMapComponent = ref inputMap.GetInputMapComponent(World); - inputMapComponent.UnblockInput(InputMapComponent.Kind.Player); - inputMapComponent.BlockInput(InputMapComponent.Kind.FreeCamera); + inputMapComponent.UnblockInput(InputMapComponent.Kind.PLAYER); + inputMapComponent.BlockInput(InputMapComponent.Kind.FREE_CAMERA); } else if (targetCameraMode == CameraMode.Free && currentCameraMode != CameraMode.Free) { ref InputMapComponent inputMapComponent = ref inputMap.GetInputMapComponent(World); - inputMapComponent.UnblockInput(InputMapComponent.Kind.FreeCamera); - inputMapComponent.BlockInput(InputMapComponent.Kind.Player); + inputMapComponent.UnblockInput(InputMapComponent.Kind.FREE_CAMERA); + inputMapComponent.BlockInput(InputMapComponent.Kind.PLAYER); } switch (camera.Mode) diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/PrepareExposedCameraDataSystem.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/PrepareExposedCameraDataSystem.cs index 646ee941bd..bead0def1d 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/PrepareExposedCameraDataSystem.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/PrepareExposedCameraDataSystem.cs @@ -1,6 +1,7 @@ using Arch.Core; using Arch.System; using Arch.SystemGroups; +using Cinemachine; using DCL.Character.CharacterCamera.Components; using DCL.CharacterCamera.Components; using ECS.Abstract; @@ -15,7 +16,12 @@ namespace DCL.CharacterCamera.Systems [UpdateAfter(typeof(ApplyCinemachineCameraInputSystem))] public partial class PrepareExposedCameraDataSystem : BaseUnityLoopSystem { - internal PrepareExposedCameraDataSystem(World world) : base(world) { } + private readonly CinemachineBrain cinemachineBrain; + + internal PrepareExposedCameraDataSystem(World world, CinemachineBrain cinemachineBrain) : base(world) + { + this.cinemachineBrain = cinemachineBrain; + } protected override void Update(float t) { @@ -25,11 +31,13 @@ protected override void Update(float t) [Query] private void Prepare(ref CameraComponent cameraComponent, ref ExposedCameraData exposedCameraData, in CursorComponent cursorComponent) { + exposedCameraData.CameraMode = cameraComponent.Mode; exposedCameraData.CameraType.Value = cameraComponent.Mode.ToSDKCameraType(); exposedCameraData.PointerIsLocked.Value = cursorComponent.CursorState != CursorState.Free; Transform transform = cameraComponent.Camera.transform; exposedCameraData.WorldPosition.Value = transform.position; exposedCameraData.WorldRotation.Value = transform.rotation; + exposedCameraData.CinemachineBrain = cinemachineBrain; } } } diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/UpdateCameraInputSystem.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/UpdateCameraInputSystem.cs index 28d7f855fe..1a88691d36 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/UpdateCameraInputSystem.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/UpdateCameraInputSystem.cs @@ -3,7 +3,6 @@ using Arch.SystemGroups; using DCL.Character.CharacterCamera.Components; using DCL.CharacterCamera.Components; -using DCL.CharacterMotion.Components; using DCL.Input; using DCL.Input.Systems; using UnityEngine; diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/WriteCameraComponentsSystem.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/WriteCameraComponentsSystem.cs index a809a7fb51..dd16cc2b04 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/WriteCameraComponentsSystem.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/WriteCameraComponentsSystem.cs @@ -26,12 +26,11 @@ public partial class WriteCameraComponentsSystem : BaseUnityLoopSystem private readonly IPartitionComponent scenePartition; private readonly byte propagationThreshold; private readonly IComponentPool sdkTransformPool; + private readonly IComponentPool mainCameraPool; private readonly Entity cameraEntity; - - internal WriteCameraComponentsSystem(World world, IECSToCRDTWriter ecsToCrdtWriter, IExposedCameraData exposedCameraData, ISceneData sceneData, IPartitionComponent scenePartition, - byte propagationThreshold, IComponentPool sdkTransformPool, Entity cameraEntity) : base(world) + byte propagationThreshold, IComponentPool sdkTransformPool, IComponentPool mainCameraPool, Entity cameraEntity) : base(world) { this.ecsToCrdtWriter = ecsToCrdtWriter; this.exposedCameraData = exposedCameraData; @@ -39,26 +38,34 @@ internal WriteCameraComponentsSystem(World world, IECSToCRDTWriter ecsToCrdtWrit this.propagationThreshold = propagationThreshold; this.sdkTransformPool = sdkTransformPool; this.cameraEntity = cameraEntity; + this.mainCameraPool = mainCameraPool; this.scenePartition = scenePartition; } public override void Initialize() { - // set camera position for a newly created scene + // Set camera position for a newly created scene var sdkTransform = ExposedTransformUtils.Put(ecsToCrdtWriter, exposedCameraData, SpecialEntitiesID.CAMERA_ENTITY, sceneData.Geometry.BaseParcelPosition, false) .EnsureNotNull(); if (!World.Has(cameraEntity)) { var newComponent = sdkTransformPool.Get(); - // Copy all fields newComponent.Position = sdkTransform.Position; newComponent.Rotation = sdkTransform.Rotation; newComponent.Scale = sdkTransform.Scale; World.Add(cameraEntity, newComponent); } - + + // Initialize SDK Main Camera component + PBMainCamera pbMainCamera = mainCameraPool.Get(); + + // you can't put the same instance as it will be returned to the pool after writing to the JS + ecsToCrdtWriter.PutMessage(static (dataToWrite, ecsInstance) => { dataToWrite.VirtualCameraEntity = ecsInstance.VirtualCameraEntity; }, SpecialEntitiesID.CAMERA_ENTITY, pbMainCamera); + + World.Add(cameraEntity, pbMainCamera); + PropagateCameraData(false); } diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/CinemachineVirtualCameraSystemShould.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/CinemachineVirtualCameraSystemShould.cs index 4a2a470860..7d56435046 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/CinemachineVirtualCameraSystemShould.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/CinemachineVirtualCameraSystemShould.cs @@ -75,7 +75,9 @@ public void CreateCameraSetup() cinemachinePreset.DefaultCameraMode.Returns(CameraMode.ThirdPerson); cinemachineCameraAudioSettings = Substitute.For(); system = new ControlCinemachineVirtualCameraSystem(world, cinemachineCameraAudioSettings); - world.Create(new InputMapComponent(InputMapComponent.Kind.Player | InputMapComponent.Kind.Camera | InputMapComponent.Kind.Shortcuts)); + world.Create(new InputMapComponent(InputMapComponent.Kind.PLAYER | InputMapComponent.Kind.CAMERA | InputMapComponent.Kind.SHORTCUTS)); + + inputMap = world.CacheInputMap(); entity = world.Create(cinemachinePreset, new CameraComponent(camera), new CinemachineCameraState(), new CameraInput(), new CursorComponent()); @@ -91,7 +93,7 @@ public void DisposeCameraSetup() [Test] public void InitInputMapComponent() { - Assert.That(inputMap.GetInputMapComponent(world).Active, Is.EqualTo(InputMapComponent.Kind.Player | InputMapComponent.Kind.Camera | InputMapComponent.Kind.Shortcuts)); + Assert.That(inputMap.GetInputMapComponent(world).Active, Is.EqualTo(InputMapComponent.Kind.PLAYER | InputMapComponent.Kind.CAMERA | InputMapComponent.Kind.SHORTCUTS)); Assert.That(world.Get(entity).CurrentCamera, Is.EqualTo(thirdPersonCameraData.Camera)); } diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/UpdateCursorInputSystemShould.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/UpdateCursorInputSystemShould.cs index c0a03533a4..2ac44b1d04 100644 --- a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/UpdateCursorInputSystemShould.cs +++ b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/UpdateCursorInputSystemShould.cs @@ -51,7 +51,7 @@ public void CreateCameraSetup() positionControl = mouse.GetChildControl("Position"); Move(positionControl, new Vector2(50, 50), new Vector2(0.5f, 0.5f)); - system = new UpdateCursorInputSystem(world, dlcInput, eventSystem, cursor, crosshairView); + system = new UpdateCursorInputSystem(world, dlcInput, eventSystem, cursor, crosshairView, Substitute.For()); system.Initialize(); } diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/CharacterMotion.asmdef b/Explorer/Assets/DCL/Character/CharacterMotion/CharacterMotion.asmdef index 3be09aef54..d4a867c81b 100644 --- a/Explorer/Assets/DCL/Character/CharacterMotion/CharacterMotion.asmdef +++ b/Explorer/Assets/DCL/Character/CharacterMotion/CharacterMotion.asmdef @@ -9,14 +9,13 @@ "GUID:ac3295688c7c22745a96e6ac34718181", "GUID:75469ad4d38634e559750d17036d5f7c", "GUID:c80c82a8f4e04453b85fbab973d6774a", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:d0ec51c740809fd4680d3ea27279dca7", "GUID:7f7d1af65c2641843945d409d28f2e20", "GUID:4725c02394ab4ce19f889e4e8001f989", "GUID:78e0b5197588c4841a6544409324031c", "GUID:275e22790c04e9b47a5085d7b0c4432a", "GUID:286980af24684da6acc1caa413039811", - "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:8322ea9340a544c59ddc56d4793eac74", "GUID:d832748739a186646b8656bdbd447ad0", "GUID:0a1d7205ccd4b584f950752a974a3afe", diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateCharacterVelocitySystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateCharacterVelocitySystem.cs index d9c8ffb461..8f8eefbc85 100644 --- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateCharacterVelocitySystem.cs +++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateCharacterVelocitySystem.cs @@ -9,7 +9,6 @@ using DCL.CharacterMotion.Settings; using DCL.DebugUtilities; using DCL.DebugUtilities.UIBindings; -using DCL.Input; using DCL.Time.Systems; using ECS.Abstract; using UnityEngine; diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputJumpSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputJumpSystem.cs index 8eede06f77..28e8326e3a 100644 --- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputJumpSystem.cs +++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputJumpSystem.cs @@ -5,6 +5,7 @@ using DCL.Character.Components; using DCL.Input; using DCL.Input.Systems; +using DCL.SDKComponents.InputModifier.Components; using ECS.Abstract; using UnityEngine.InputSystem; @@ -33,9 +34,9 @@ protected override void Update(float t) } [Query] - private void UpdateInput([Data] int tickValue, ref JumpInputComponent inputToUpdate) + private void UpdateInput([Data] int tickValue, ref JumpInputComponent inputToUpdate, in InputModifierComponent inputModifierComponent) { - if (!inputAction.enabled) return; + if(inputModifierComponent.DisableJump || !inputAction.enabled) return; if (inputAction.WasPressedThisFrame()) inputToUpdate.Trigger.TickWhenJumpOccurred = tickValue + 1; diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputMovementSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputMovementSystem.cs index 3e3388c279..b198b81cc1 100644 --- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputMovementSystem.cs +++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputMovementSystem.cs @@ -5,6 +5,7 @@ using DCL.CharacterMotion.Components; using DCL.Input; using DCL.Input.Systems; +using DCL.SDKComponents.InputModifier.Components; using UnityEngine; using UnityEngine.InputSystem; @@ -32,9 +33,9 @@ protected override void Update(float t) } [Query] - private void UpdateInput(ref MovementInputComponent inputToUpdate) + private void UpdateInput(ref MovementInputComponent inputToUpdate, in InputModifierComponent inputModifierComponent) { - if (!movementAxis.enabled) + if (!movementAxis.enabled || inputModifierComponent is { DisableAll: true } or { DisableWalk: true, DisableJog: true, DisableRun: true }) { inputToUpdate.Axes = Vector2.zero; return; @@ -42,16 +43,21 @@ private void UpdateInput(ref MovementInputComponent inputToUpdate) inputToUpdate.Axes = movementAxis.ReadValue(); - if (autoWalkAction.WasPerformedThisFrame()) { inputToUpdate.AutoWalk = !inputToUpdate.AutoWalk; } + if (!inputModifierComponent.DisableWalk && autoWalkAction.WasPerformedThisFrame()) + inputToUpdate.AutoWalk = !inputToUpdate.AutoWalk; - if (inputToUpdate.Axes.sqrMagnitude > 0.1f) { inputToUpdate.AutoWalk = false; } - - // Running action wins over walking - inputToUpdate.Kind = sprintAction.IsPressed() ? MovementKind.RUN : - walkAction.IsPressed() ? MovementKind.WALK : MovementKind.JOG; + if (inputToUpdate is { AutoWalk: true, Axes: { sqrMagnitude: > 0.1f } }) + inputToUpdate.AutoWalk = false; if (inputToUpdate.Axes == Vector2.zero) inputToUpdate.Kind = MovementKind.IDLE; + else + { + bool runPressed = sprintAction.IsPressed(); + bool walkPressed = walkAction.IsPressed(); + + inputToUpdate.Kind = ProcessInputMovementKind(inputModifierComponent, runPressed, walkPressed); + } if (inputToUpdate.AutoWalk) { @@ -59,5 +65,35 @@ private void UpdateInput(ref MovementInputComponent inputToUpdate) inputToUpdate.Kind = MovementKind.WALK; } } + + private static MovementKind ProcessInputMovementKind(InputModifierComponent inputModifierComponent, bool runPressed, bool walkPressed) + { + // Running action wins over walking + if (runPressed) + { + if (inputModifierComponent.DisableRun) + return inputModifierComponent.DisableJog ? MovementKind.WALK : MovementKind.JOG; + + return MovementKind.RUN; + } + + if (walkPressed) + { + if (inputModifierComponent.DisableWalk) + return inputModifierComponent.DisableJog ? MovementKind.RUN : MovementKind.JOG; + + return MovementKind.WALK; + } + + if (inputModifierComponent.DisableJog) + { + if (inputModifierComponent.DisableWalk) + return MovementKind.RUN; + + return MovementKind.WALK; + } + + return MovementKind.JOG; + } } } diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/JumpButtonShould.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/JumpButtonShould.cs index ebc4e8d53e..3ede7ff27d 100644 --- a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/JumpButtonShould.cs +++ b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/JumpButtonShould.cs @@ -5,6 +5,7 @@ using DCL.CharacterMotion.Components; using DCL.CharacterMotion.Settings; using DCL.CharacterMotion.Systems; +using DCL.SDKComponents.InputModifier.Components; using DCL.Time; using DCL.Time.Systems; using ECS.Abstract; @@ -31,7 +32,11 @@ public void SetUp() ICharacterControllerSettings controllerSettings = Substitute.For(); controllerSettings.LongJumpTime.Returns(1f); - playerEntity = world.Create(new PlayerComponent(), controllerSettings, new CharacterRigidTransform { IsGrounded = true }); + playerEntity = world.Create( + new PlayerComponent(), + controllerSettings, + new CharacterRigidTransform { IsGrounded = true }, + new InputModifierComponent()); updatePhysicsTickSystem = new UpdatePhysicsTickSystem(world, new PhysicsTickProvider()); updateInputJumpSystem = new UpdateInputJumpSystem(world, dlcInput.Player.Jump); diff --git a/Explorer/Assets/DCL/Character/CharacterObject/Character.asmdef b/Explorer/Assets/DCL/Character/CharacterObject/Character.asmdef index 6fdc5a2925..a22a476fb3 100644 --- a/Explorer/Assets/DCL/Character/CharacterObject/Character.asmdef +++ b/Explorer/Assets/DCL/Character/CharacterObject/Character.asmdef @@ -1,4 +1,18 @@ -{ - "name": "Character", - "references":[ "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:1b8e1e1bd01505f478f0369c04a4fb2f" ] +{ + "name": "Character", + "rootNamespace": "", + "references": [ + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", + "GUID:fa7b3fdbb04d67549916da7bd2af58ab", + "GUID:1b8e1e1bd01505f478f0369c04a4fb2f" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false } \ No newline at end of file diff --git a/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewAvatarContainer.cs b/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewAvatarContainer.cs index 3e34a6c6d7..d8a44f66ba 100644 --- a/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewAvatarContainer.cs +++ b/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewAvatarContainer.cs @@ -44,7 +44,8 @@ public void Initialize(RenderTexture targetTexture) public void SetCameraPosition(CharacterPreviewCameraPreset preset) { - cameraTarget.localPosition = preset.verticalPosition; + if (cameraTarget != null) + cameraTarget.localPosition = preset.verticalPosition; StopCameraTween(); diff --git a/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewController.cs b/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewController.cs index 0550049d2a..db4c532631 100644 --- a/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewController.cs +++ b/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewController.cs @@ -3,6 +3,7 @@ using Cysharp.Threading.Tasks; using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Components.Intentions; diff --git a/Explorer/Assets/DCL/Character/CharacterPreview/DCL.CharacterPreview.asmdef b/Explorer/Assets/DCL/Character/CharacterPreview/DCL.CharacterPreview.asmdef index f7ee5934b3..c5f0ef895b 100644 --- a/Explorer/Assets/DCL/Character/CharacterPreview/DCL.CharacterPreview.asmdef +++ b/Explorer/Assets/DCL/Character/CharacterPreview/DCL.CharacterPreview.asmdef @@ -20,7 +20,8 @@ "GUID:15fc0a57446b3144c949da3e2b9737a9", "GUID:e7751264a6735a942a64770d71eb49e0", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", - "GUID:2f30d6e5229a74284acedda491abcc6e" + "GUID:2f30d6e5229a74284acedda491abcc6e", + "GUID:543b8f091a5947a3880b7f2bca2358bd" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Character/MovementBlocker.meta b/Explorer/Assets/DCL/Character/MovementBlocker.meta deleted file mode 100644 index 3197c36002..0000000000 --- a/Explorer/Assets/DCL/Character/MovementBlocker.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 9d5fa3c463d248d9b466ca8ba358a164 -timeCreated: 1711377768 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Character/MovementBlocker/Components/CameraBlockerComponent.cs.meta b/Explorer/Assets/DCL/Character/MovementBlocker/Components/CameraBlockerComponent.cs.meta deleted file mode 100644 index e73a2a021c..0000000000 --- a/Explorer/Assets/DCL/Character/MovementBlocker/Components/CameraBlockerComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 442b8c4d10ed4109abf2b4a597176157 -timeCreated: 1711380258 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Character/MovementBlocker/MovementBlocker.asmdef b/Explorer/Assets/DCL/Character/MovementBlocker/MovementBlocker.asmdef deleted file mode 100644 index 297a269ff4..0000000000 --- a/Explorer/Assets/DCL/Character/MovementBlocker/MovementBlocker.asmdef +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "MovementBlocker", - "rootNamespace": "", - "references": [ - ], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/Explorer/Assets/DCL/Character/MovementBlocker/MovementBlocker.asmdef.meta b/Explorer/Assets/DCL/Character/MovementBlocker/MovementBlocker.asmdef.meta deleted file mode 100644 index cdcdf22921..0000000000 --- a/Explorer/Assets/DCL/Character/MovementBlocker/MovementBlocker.asmdef.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 4e9911d3faa34ce3ad61855f4f549665 -timeCreated: 1711377818 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Character/Plugin/CharacterContainer.cs b/Explorer/Assets/DCL/Character/Plugin/CharacterContainer.cs index 8a02f0e1e2..57ef438f0e 100644 --- a/Explorer/Assets/DCL/Character/Plugin/CharacterContainer.cs +++ b/Explorer/Assets/DCL/Character/Plugin/CharacterContainer.cs @@ -9,12 +9,14 @@ using DCL.CharacterCamera; using DCL.CharacterCamera.Systems; using DCL.CharacterMotion.Systems; +using DCL.ECSComponents; using DCL.Multiplayer.Movement; using DCL.Optimization.Pools; using DCL.PluginSystem; using DCL.PluginSystem.Global; using DCL.PluginSystem.World; using DCL.PluginSystem.World.Dependencies; +using DCL.SDKComponents.InputModifier.Components; using ECS.LifeCycle; using System; using System.Collections.Generic; @@ -79,12 +81,14 @@ public GlobalPlugin CreateGlobalPlugin() => public UniTask InitializeAsync(NoExposedPluginSettings settings, CancellationToken ct) => UniTask.CompletedTask; - public Entity CreatePlayerEntity(World world) => - world.Create( - new CRDTEntity(SpecialEntitiesID.PLAYER_ENTITY), + public void InitializePlayerEntity(World world, Entity playerEntity) + { + world.Add(playerEntity, new PlayerComponent(characterObject.Value.CameraFocus), new CharacterTransform(characterObject.Value.Transform), - new PlayerMovementNetworkComponent(characterObject.Value.Controller)); + new PlayerMovementNetworkComponent(characterObject.Value.Controller) + , new InputModifierComponent()); + } public class GlobalPlugin : IDCLGlobalPluginWithoutSettings { @@ -107,6 +111,7 @@ public class WorldPlugin : IDCLWorldPluginWithoutSettings private readonly IExposedCameraData exposedCameraData; private readonly ExposedTransform exposedTransform; private readonly IComponentPool sdkTransformPool; + private readonly IComponentPool mainCameraPool; public WorldPlugin(ExposedTransform exposedTransform, IExposedCameraData exposedCameraData, IComponentPoolsRegistry componentPoolsRegistry, byte bucketPropagationLimit) @@ -115,6 +120,7 @@ public WorldPlugin(ExposedTransform exposedTransform, IExposedCameraData exposed this.bucketPropagationLimit = bucketPropagationLimit; this.exposedCameraData = exposedCameraData; sdkTransformPool = componentPoolsRegistry.GetReferenceTypePool(); + mainCameraPool = componentPoolsRegistry.GetReferenceTypePool(); } public void InjectToWorld(ref ArchSystemsWorldBuilder builder, in ECSWorldInstanceSharedDependencies sharedDependencies, in PersistentEntities persistentEntities, List finalizeWorldSystems, List sceneIsCurrentListeners) @@ -123,7 +129,7 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder builder, in ECSWorl exposedTransform, sharedDependencies.ScenePartition, bucketPropagationLimit, sdkTransformPool, persistentEntities.Player); WriteCameraComponentsSystem.InjectToWorld(ref builder, sharedDependencies.EcsToCRDTWriter, exposedCameraData, sharedDependencies.SceneData, - sharedDependencies.ScenePartition, bucketPropagationLimit, sdkTransformPool, persistentEntities.Camera); + sharedDependencies.ScenePartition, bucketPropagationLimit, sdkTransformPool, mainCameraPool, persistentEntities.Camera); } } diff --git a/Explorer/Assets/DCL/CharacterTriggerArea/CharacterTriggerArea.cs b/Explorer/Assets/DCL/CharacterTriggerArea/CharacterTriggerArea.cs index 01dc84c859..c6ecc62ae6 100644 --- a/Explorer/Assets/DCL/CharacterTriggerArea/CharacterTriggerArea.cs +++ b/Explorer/Assets/DCL/CharacterTriggerArea/CharacterTriggerArea.cs @@ -9,27 +9,29 @@ public class CharacterTriggerArea : MonoBehaviour, IDisposable [field: SerializeField] public BoxCollider BoxCollider { get; private set; } private readonly HashSet currentAvatarsInside = new (); - internal readonly HashSet enteredThisFrame = new (); - internal readonly HashSet exitedThisFrame = new (); + internal readonly HashSet enteredAvatarsToBeProcessed = new (); + internal readonly HashSet exitedAvatarsToBeProcessed = new (); [NonSerialized] public Transform TargetTransform; - public IReadOnlyCollection EnteredThisFrame => enteredThisFrame; - public IReadOnlyCollection ExitedThisFrame => exitedThisFrame; + public IReadOnlyCollection EnteredAvatarsToBeProcessed => enteredAvatarsToBeProcessed; + public IReadOnlyCollection ExitedAvatarsToBeProcessed => exitedAvatarsToBeProcessed; public IReadOnlyCollection CurrentAvatarsInside => currentAvatarsInside; public void OnTriggerEnter(Collider other) { if (TargetTransform != null && TargetTransform != other.transform) return; - enteredThisFrame.Add(other.transform); + enteredAvatarsToBeProcessed.Add(other.transform); currentAvatarsInside.Add(other.transform); + exitedAvatarsToBeProcessed.Remove(other.transform); } public void OnTriggerExit(Collider other) { if (TargetTransform != null && TargetTransform != other.transform) return; - exitedThisFrame.Add(other.transform); + exitedAvatarsToBeProcessed.Add(other.transform); + enteredAvatarsToBeProcessed.Remove(other.transform); currentAvatarsInside.Remove(other.transform); } @@ -38,15 +40,21 @@ public void Dispose() BoxCollider.enabled = false; foreach (Transform avatarTransform in currentAvatarsInside) - exitedThisFrame.Add(avatarTransform); + exitedAvatarsToBeProcessed.Add(avatarTransform); currentAvatarsInside.Clear(); } public void Clear() { - enteredThisFrame.Clear(); - exitedThisFrame.Clear(); + enteredAvatarsToBeProcessed.Clear(); + exitedAvatarsToBeProcessed.Clear(); } + + public void ClearEnteredAvatarsToBeProcessed() => + enteredAvatarsToBeProcessed.Clear(); + + public void ClearExitedAvatarsToBeProcessed() => + exitedAvatarsToBeProcessed.Clear(); } } diff --git a/Explorer/Assets/DCL/CharacterTriggerArea/Components/CharacterTriggerAreaComponent.cs b/Explorer/Assets/DCL/CharacterTriggerArea/Components/CharacterTriggerAreaComponent.cs index b7b57e0cd4..f39d94ee6d 100644 --- a/Explorer/Assets/DCL/CharacterTriggerArea/Components/CharacterTriggerAreaComponent.cs +++ b/Explorer/Assets/DCL/CharacterTriggerArea/Components/CharacterTriggerAreaComponent.cs @@ -11,16 +11,16 @@ namespace DCL.CharacterTriggerArea.Components public struct CharacterTriggerAreaComponent : IDirtyMarker { private static readonly IReadOnlyCollection EMPTY_COLLECTION = Array.Empty(); - public Vector3 AreaSize; private CharacterTriggerArea? monoBehaviour; private readonly bool targetOnlyMainPlayer; + public Vector3 AreaSize { get; private set; } - public readonly IReadOnlyCollection EnteredThisFrame => monoBehaviour != null - ? monoBehaviour.EnteredThisFrame + public readonly IReadOnlyCollection EnteredAvatarsToBeProcessed => monoBehaviour != null + ? monoBehaviour.EnteredAvatarsToBeProcessed : EMPTY_COLLECTION; - public readonly IReadOnlyCollection ExitedThisFrame => monoBehaviour != null - ? monoBehaviour.ExitedThisFrame + public readonly IReadOnlyCollection ExitedAvatarsToBeProcessed => monoBehaviour != null + ? monoBehaviour.ExitedAvatarsToBeProcessed : EMPTY_COLLECTION; public readonly IReadOnlyCollection CurrentAvatarsInside => monoBehaviour != null @@ -59,6 +59,12 @@ public void TryAssignArea(IComponentPool pool, Transform m monoBehaviour!.BoxCollider.size = AreaSize; } + public void UpdateAreaSize(Vector3 size) + { + AreaSize = size; + IsDirty = true; + } + public readonly void TryUpdateTransform(ref TransformComponent transformComponent) { if (monoBehaviour == null) @@ -85,11 +91,13 @@ public void TryRelease(IComponentPool pool) } } - public void TryClear() - { - if (monoBehaviour != null) - monoBehaviour.Clear(); - } + public void TryClear() => monoBehaviour?.Clear(); + + public void TryClearEnteredAvatarsToBeProcessed() => + monoBehaviour?.ClearEnteredAvatarsToBeProcessed(); + + public void TryClearExitedAvatarsToBeProcessed() => + monoBehaviour?.ClearExitedAvatarsToBeProcessed(); public bool TryDispose(ISceneStateProvider sceneStateProvider) { diff --git a/Explorer/Assets/DCL/CharacterTriggerArea/DCL.CharacterTriggerArea.asmdef b/Explorer/Assets/DCL/CharacterTriggerArea/DCL.CharacterTriggerArea.asmdef index f83e5b63fc..35f8417bd7 100644 --- a/Explorer/Assets/DCL/CharacterTriggerArea/DCL.CharacterTriggerArea.asmdef +++ b/Explorer/Assets/DCL/CharacterTriggerArea/DCL.CharacterTriggerArea.asmdef @@ -4,10 +4,9 @@ "references": [ "GUID:275e22790c04e9b47a5085d7b0c4432a", "GUID:4794e238ed0f65142a4aea5848b513e5", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", "GUID:9e314663ce958b746873cb22d57ede55", - "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:3c7b57a14671040bd8c549056adc04f5", "GUID:d414ef88f3b15f746a4b97636b50dfb4", "GUID:d0ec51c740809fd4680d3ea27279dca7", diff --git a/Explorer/Assets/DCL/CharacterTriggerArea/Systems/CharacterTriggerAreaCleanUpRegisteredCollisionsSystem.cs b/Explorer/Assets/DCL/CharacterTriggerArea/Systems/CharacterTriggerAreaCleanUpRegisteredCollisionsSystem.cs deleted file mode 100644 index 61eb14c75a..0000000000 --- a/Explorer/Assets/DCL/CharacterTriggerArea/Systems/CharacterTriggerAreaCleanUpRegisteredCollisionsSystem.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Arch.Core; -using Arch.System; -using Arch.SystemGroups; -using DCL.CharacterTriggerArea.Components; -using ECS.Abstract; -using ECS.Groups; - -namespace DCL.CharacterTriggerArea.Systems -{ - [UpdateInGroup(typeof(SyncedInitializationFixedUpdateThrottledGroup))] - public partial class CharacterTriggerAreaCleanUpRegisteredCollisionsSystem : BaseUnityLoopSystem - { - internal CharacterTriggerAreaCleanUpRegisteredCollisionsSystem(World world) : base(world) - { - } - - protected override void Update(float t) - { - ClearDetectedCharactersCollectionQuery(World); - } - - [Query] - private void ClearDetectedCharactersCollection(ref CharacterTriggerAreaComponent component) - { - component.TryClear(); - } - } -} diff --git a/Explorer/Assets/DCL/CharacterTriggerArea/Systems/CharacterTriggerAreaCleanUpRegisteredCollisionsSystem.cs.meta b/Explorer/Assets/DCL/CharacterTriggerArea/Systems/CharacterTriggerAreaCleanUpRegisteredCollisionsSystem.cs.meta deleted file mode 100644 index 5cd9ae4b22..0000000000 --- a/Explorer/Assets/DCL/CharacterTriggerArea/Systems/CharacterTriggerAreaCleanUpRegisteredCollisionsSystem.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 105092feb3474fc4a0b3b17ff65d6b11 -timeCreated: 1714389921 \ No newline at end of file diff --git a/Explorer/Assets/DCL/CharacterTriggerArea/Tests/EditMode/CharacterTriggerAreaCleanUpRegisteredCollisionsSystemShould.cs b/Explorer/Assets/DCL/CharacterTriggerArea/Tests/EditMode/CharacterTriggerAreaCleanUpRegisteredCollisionsSystemShould.cs deleted file mode 100644 index fe75cc4d02..0000000000 --- a/Explorer/Assets/DCL/CharacterTriggerArea/Tests/EditMode/CharacterTriggerAreaCleanUpRegisteredCollisionsSystemShould.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Arch.Core; -using DCL.CharacterTriggerArea.Components; -using DCL.CharacterTriggerArea.Systems; -using DCL.ECSComponents; -using ECS.Prioritization.Components; -using ECS.TestSuite; -using NUnit.Framework; -using UnityEngine; - -namespace DCL.CharacterTriggerArea.Tests -{ - public class CharacterTriggerAreaCleanUpRegisteredCollisionsSystemShould - : UnitySystemTestBase - { - private CharacterTriggerArea characterTriggerArea; - private Entity entity; - private GameObject fakeAvatarGO; - private GameObject fakeTriggerAreaGO; - - [SetUp] - public void Setup() - { - entity = world.Create(PartitionComponent.TOP_PRIORITY); - - fakeAvatarGO = new GameObject(); - fakeTriggerAreaGO = new GameObject(); - characterTriggerArea = fakeTriggerAreaGO.AddComponent(); - system = new CharacterTriggerAreaCleanUpRegisteredCollisionsSystem(world); - } - - [TearDown] - public void Teardown() - { - Object.DestroyImmediate(fakeAvatarGO); - Object.DestroyImmediate(fakeTriggerAreaGO); - } - - [Test] - public void ClearEnterExitCollectionsCorrectly() - { - var component = new CharacterTriggerAreaComponent(Vector3.one, monoBehaviour: characterTriggerArea); - world.Add(entity, component, new PBCameraModeArea()); - - characterTriggerArea.enteredThisFrame.Add(fakeAvatarGO.transform); - world.Set(entity, component); - Assert.AreEqual(1, component.EnteredThisFrame.Count); - - system.Update(0); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - - characterTriggerArea.exitedThisFrame.Add(fakeAvatarGO.transform); - world.Set(entity, component); - Assert.AreEqual(1, component.ExitedThisFrame.Count); - - system.Update(0); - Assert.AreEqual(0, component.ExitedThisFrame.Count); - - characterTriggerArea.enteredThisFrame.Add(fakeAvatarGO.transform); - characterTriggerArea.exitedThisFrame.Add(fakeAvatarGO.transform); - world.Set(entity, component); - Assert.AreEqual(1, component.EnteredThisFrame.Count); - Assert.AreEqual(1, component.ExitedThisFrame.Count); - - system.Update(0); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); - } - } -} diff --git a/Explorer/Assets/DCL/CharacterTriggerArea/Tests/EditMode/CharacterTriggerAreaCleanUpRegisteredCollisionsSystemShould.cs.meta b/Explorer/Assets/DCL/CharacterTriggerArea/Tests/EditMode/CharacterTriggerAreaCleanUpRegisteredCollisionsSystemShould.cs.meta deleted file mode 100644 index bd7c37ec14..0000000000 --- a/Explorer/Assets/DCL/CharacterTriggerArea/Tests/EditMode/CharacterTriggerAreaCleanUpRegisteredCollisionsSystemShould.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 1c18b262f3764008a00eaeac0ad5888e -timeCreated: 1714397844 \ No newline at end of file diff --git a/Explorer/Assets/DCL/CharacterTriggerArea/Tests/PlayMode/CharacterTriggerAreaHandlerSystemShould.cs b/Explorer/Assets/DCL/CharacterTriggerArea/Tests/PlayMode/CharacterTriggerAreaHandlerSystemShould.cs index df4470e906..65756a5fbf 100644 --- a/Explorer/Assets/DCL/CharacterTriggerArea/Tests/PlayMode/CharacterTriggerAreaHandlerSystemShould.cs +++ b/Explorer/Assets/DCL/CharacterTriggerArea/Tests/PlayMode/CharacterTriggerAreaHandlerSystemShould.cs @@ -134,8 +134,7 @@ public async Task UpdateTriggerAreaSizeCorrectly() // update component values targetAreaSize /= 3; - component.AreaSize = targetAreaSize; - component.IsDirty = true; + component.UpdateAreaSize(targetAreaSize); world.Set(entity, component); Assert.AreNotEqual(targetAreaSize, characterTriggerArea.BoxCollider.size); @@ -192,16 +191,16 @@ public async Task TrackEnterExitCollectionsCorrectly() system.Update(0); component = world.Get(entity); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(0, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); // Move character inside area fakeMainPlayerGO.transform.position = entityTransformComponent.Transform.position; await WaitForPhysics(); - Assert.AreEqual(1, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(1, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); component.TryClear(); // Move character outside area @@ -209,8 +208,8 @@ public async Task TrackEnterExitCollectionsCorrectly() await WaitForPhysics(); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(1, component.ExitedThisFrame.Count); + Assert.AreEqual(0, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(1, component.ExitedAvatarsToBeProcessed.Count); } [Test] @@ -228,16 +227,16 @@ public async Task HandlePlayerLeaveSceneCorrectly() system.Update(0); component = world.Get(entity); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(0, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); // Move character inside area fakeMainPlayerGO.transform.position = entityTransformComponent.Transform.position; await WaitForPhysics(); - Assert.AreEqual(1, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(1, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); component.TryClear(); // Simulate "getting outside current scene" @@ -245,8 +244,8 @@ public async Task HandlePlayerLeaveSceneCorrectly() system.Update(0); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(1, component.ExitedThisFrame.Count); + Assert.AreEqual(0, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(1, component.ExitedAvatarsToBeProcessed.Count); Assert.IsFalse(characterTriggerArea.BoxCollider.enabled); } @@ -265,15 +264,15 @@ public async Task DetectCharacterWhenAlreadyInside() world.Add(entity, component, pbComponent); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(0, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); system.Update(0); await WaitForPhysics(); component = world.Get(entity); - Assert.AreEqual(1, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(1, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); } [Test] @@ -295,15 +294,15 @@ public async Task WaitUntilAvatarBaseIsConfiguredBeforeDetecting() world.Add(entity, component, pbComponent); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(0, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); system.Update(0); await WaitForPhysics(); component = world.Get(entity); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(0, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); mainPlayerAvatarBaseProxy.SetObject(fakeMainPlayerAvatarGO.GetComponent()); @@ -311,8 +310,8 @@ public async Task WaitUntilAvatarBaseIsConfiguredBeforeDetecting() await WaitForPhysics(); component = world.Get(entity); - Assert.AreEqual(1, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(1, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); } [Test] @@ -335,8 +334,8 @@ public async Task DiscriminateCharacterTypeCorrectly(bool onlyMainPlayer) system.Update(0); component = world.Get(entity); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(0, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); // Move both characters inside area fakeMainPlayerGO.transform.position = entityTransformComponent.Transform.position; @@ -344,8 +343,8 @@ public async Task DiscriminateCharacterTypeCorrectly(bool onlyMainPlayer) await WaitForPhysics(); - Assert.AreEqual(onlyMainPlayer ? 1 : 2, component.EnteredThisFrame.Count); - Assert.AreEqual(0, component.ExitedThisFrame.Count); + Assert.AreEqual(onlyMainPlayer ? 1 : 2, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(0, component.ExitedAvatarsToBeProcessed.Count); component.TryClear(); // Move both characters outside area @@ -354,8 +353,8 @@ public async Task DiscriminateCharacterTypeCorrectly(bool onlyMainPlayer) await WaitForPhysics(); - Assert.AreEqual(0, component.EnteredThisFrame.Count); - Assert.AreEqual(onlyMainPlayer ? 1 : 2, component.ExitedThisFrame.Count); + Assert.AreEqual(0, component.EnteredAvatarsToBeProcessed.Count); + Assert.AreEqual(onlyMainPlayer ? 1 : 2, component.ExitedAvatarsToBeProcessed.Count); // Cleanup Object.DestroyImmediate(fakeOtherPlayerGO); diff --git a/Explorer/Assets/DCL/Chat/Chat.asmdef b/Explorer/Assets/DCL/Chat/Chat.asmdef index 120d228112..8b16b778d9 100644 --- a/Explorer/Assets/DCL/Chat/Chat.asmdef +++ b/Explorer/Assets/DCL/Chat/Chat.asmdef @@ -17,7 +17,7 @@ "GUID:3c7b57a14671040bd8c549056adc04f5", "GUID:e56a0d6a94c144c784012e63b6043100", "GUID:5ab29fa8ae5769b49ab29e390caca7a4", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:4e9911d3faa34ce3ad61855f4f549665", "GUID:4794e238ed0f65142a4aea5848b513e5", "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", @@ -29,7 +29,8 @@ "GUID:7175400a68914a45acecc9fb068de3b8", "GUID:875a5d5129614170bd769ed012c2eb3d", "GUID:f4a0f40a2545482b8929d4c3c642f50a", - "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b" + "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b", + "GUID:54660b0fae444b4cbfdafa9d68108f04" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Chat/ChatCommandsHandler.cs b/Explorer/Assets/DCL/Chat/ChatCommandsHandler.cs index 6076493a10..05bd15ecff 100644 --- a/Explorer/Assets/DCL/Chat/ChatCommandsHandler.cs +++ b/Explorer/Assets/DCL/Chat/ChatCommandsHandler.cs @@ -7,7 +7,7 @@ namespace DCL.Chat { internal class ChatCommandsHandler { - public const string CHAT_COMMAND_CHAR = "/"; + private const string CHAT_COMMAND_CHAR = "/"; private readonly Dictionary commandsCache = new (); private readonly IReadOnlyDictionary> commandsFactory; @@ -19,8 +19,6 @@ public ChatCommandsHandler(IReadOnlyDictionary> comman public bool TryGetChatCommand(in string message, ref (IChatCommand command, Match match) commandTuple) { - if (StartsLikeCommand(message) == false) return false; - foreach (Regex? commandRegex in commandsFactory.Keys) { commandTuple.match = commandRegex.Match(message); diff --git a/Explorer/Assets/DCL/Chat/ChatController.cs b/Explorer/Assets/DCL/Chat/ChatController.cs index 229606c6c0..f15ea079c4 100644 --- a/Explorer/Assets/DCL/Chat/ChatController.cs +++ b/Explorer/Assets/DCL/Chat/ChatController.cs @@ -2,14 +2,13 @@ using Cysharp.Threading.Tasks; using DCL.Audio; using DCL.CharacterCamera; -using DCL.CharacterMotion.Components; using DCL.Chat.Commands; using DCL.Chat.History; using DCL.Chat.MessageBus; -using DCL.Diagnostics; using DCL.Emoji; using DCL.Input; using DCL.Input.Component; +using DCL.Input.Systems; using DCL.Multiplayer.Profiles.Tables; using DCL.Nametags; using ECS.Abstract; @@ -31,6 +30,8 @@ public class ChatController : ControllerBase { private const int MAX_MESSAGE_LENGTH = 250; private const string EMOJI_SUGGESTION_PATTERN = @":\w+"; + private const string EMOJI_TAG = "[emoji]"; + private const string HASH_CHARACTER = "#"; private static readonly Regex EMOJI_PATTERN_REGEX = new (EMOJI_SUGGESTION_PATTERN, RegexOptions.Compiled); private readonly IReadOnlyEntityParticipantTable entityParticipantTable; @@ -172,7 +173,7 @@ void CheckIfClickedOnEmojiPanel() { viewInstance!.EmojiPanelButton.SetState(false); viewInstance.EmojiPanel.gameObject.SetActive(false); - UnblockUnwantedInputs(); + EnableUnwantedInputs(); } emojiSuggestionPanelController!.SetPanelVisibility(false); } @@ -235,8 +236,8 @@ private void AddEmojiToInput(string emoji) return; int caretPosition = viewInstance.InputField.stringPosition; - viewInstance.InputField.text = viewInstance.InputField.text.Insert(caretPosition, "[emoji]"); - viewInstance.InputField.text = viewInstance.InputField.text.Replace("[emoji]", emoji); + viewInstance.InputField.text = viewInstance.InputField.text.Insert(caretPosition, EMOJI_TAG); + viewInstance.InputField.text = viewInstance.InputField.text.Replace(EMOJI_TAG, emoji); viewInstance.InputField.stringPosition += emoji.Length; viewInstance.InputField.ActivateInputField(); @@ -253,20 +254,20 @@ private void ToggleEmojiPanel() emojiSuggestionPanelController!.SetPanelVisibility(false); viewInstance.EmojiPanel.EmojiContainer.gameObject.SetActive(toggle); viewInstance.InputField.ActivateInputField(); - if (toggle) BlockUnwantedInputs(); - else UnblockUnwantedInputs(); + if (toggle) DisableUnwantedInputs(); + else EnableUnwantedInputs(); } - private void BlockUnwantedInputs() + private void DisableUnwantedInputs() { world.AddOrGet(cameraEntity, new CameraBlockerComponent()); - inputBlock.Disable(InputMapComponent.Kind.Camera , InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Player); + inputBlock.Disable(InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.PLAYER); } - private void UnblockUnwantedInputs() + private void EnableUnwantedInputs() { world.TryRemove(cameraEntity); - inputBlock.Enable(InputMapComponent.Kind.Camera , InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Player); + inputBlock.Enable(InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.PLAYER); } private void OnSubmitAction(InputAction.CallbackContext obj) @@ -289,7 +290,7 @@ private void OnSubmit(string _) { viewInstance!.EmojiPanelButton.SetState(false); emojiPanelController!.SetPanelVisibility(false); - UnblockUnwantedInputs(); + EnableUnwantedInputs(); } if (string.IsNullOrWhiteSpace(viewInstance!.InputField.text)) @@ -332,8 +333,8 @@ private void SetItemData(int index, ChatMessage itemData, ChatEntryView itemScri { //temporary approach to extract the username without the walledId, will be refactored //once we have the proper integration of the profile retrieval - Color playerNameColor = chatEntryConfiguration.GetNameColor(itemData.Sender.Contains("#") - ? $"{itemData.Sender.Substring(0, itemData.Sender.IndexOf("#", StringComparison.Ordinal))}" + Color playerNameColor = chatEntryConfiguration.GetNameColor(itemData.Sender.Contains(HASH_CHARACTER) + ? $"{itemData.Sender.Substring(0, itemData.Sender.IndexOf(HASH_CHARACTER, StringComparison.Ordinal))}" : itemData.Sender); itemScript.playerName.color = playerNameColor; @@ -369,7 +370,7 @@ private void OnInputDeselected(string inputText) viewInstance!.EmojiPanelButton.SetColor(false); viewInstance.CharacterCounter.gameObject.SetActive(false); viewInstance.StartChatEntriesFadeout(); - UnblockUnwantedInputs(); + EnableUnwantedInputs(); } private void OnInputSelected(string inputText) @@ -389,7 +390,7 @@ private void OnInputSelected(string inputText) viewInstance.EmojiPanelButton.SetColor(true); viewInstance.CharacterCounter.gameObject.SetActive(true); viewInstance.StopChatEntriesFadeout(); - BlockUnwantedInputs(); + DisableUnwantedInputs(); } private void OnInputChanged(string inputText) diff --git a/Explorer/Assets/DCL/Chat/MessageBus/CommandsHandleChatMessageBus.cs b/Explorer/Assets/DCL/Chat/MessageBus/CommandsHandleChatMessageBus.cs index 65c73d3283..841da4a73d 100644 --- a/Explorer/Assets/DCL/Chat/MessageBus/CommandsHandleChatMessageBus.cs +++ b/Explorer/Assets/DCL/Chat/MessageBus/CommandsHandleChatMessageBus.cs @@ -34,24 +34,26 @@ public void Dispose() public void Send(string message) { - if (chatCommandsHandler.TryGetChatCommand(message, ref commandTuple)) + //If the message doesn't start as a command (with "/"), we just forward it to the chat + if (!chatCommandsHandler.StartsLikeCommand(message)) { - ExecuteChatCommandAsync(commandTuple.command, commandTuple.param).Forget(); + origin.Send(message); return; } - if (chatCommandsHandler.StartsLikeCommand(message)) + if (chatCommandsHandler.TryGetChatCommand(message, ref commandTuple)) { - SendFromSystem($"🔴 Command not found: '{message}'"); + ExecuteChatCommandAsync(commandTuple.command, commandTuple.param).Forget(); return; } - origin.Send(message); + SendFromSystem($"🔴 Command not found: '{message}'"); } private async UniTask ExecuteChatCommandAsync(IChatCommand command, Match param) { commandCts = commandCts.SafeRestart(); + string? response = await command.ExecuteAsync(param, commandCts.Token); if (!string.IsNullOrEmpty(response)) diff --git a/Explorer/Assets/DCL/CommunicationData/CommunicationData.asmdef b/Explorer/Assets/DCL/CommunicationData/CommunicationData.asmdef index c18f9598a4..23e21ba5eb 100644 --- a/Explorer/Assets/DCL/CommunicationData/CommunicationData.asmdef +++ b/Explorer/Assets/DCL/CommunicationData/CommunicationData.asmdef @@ -2,7 +2,6 @@ "name": "CommunicationData", "references": [ "GUID:fa7b3fdbb04d67549916da7bd2af58ab", - "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", - "GUID:101b8b6ebaf64668909b49c4b7a1420d" + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ] } \ No newline at end of file diff --git a/Explorer/Assets/DCL/CommunicationData/URLHelpers/ENS.cs b/Explorer/Assets/DCL/CommunicationData/URLHelpers/ENS.cs new file mode 100644 index 0000000000..d8db0e1040 --- /dev/null +++ b/Explorer/Assets/DCL/CommunicationData/URLHelpers/ENS.cs @@ -0,0 +1,24 @@ +using DCL.CommunicationData.URLHelpers; +using System; + +namespace CommunicationData.URLHelpers +{ + public readonly struct ENS + { + private readonly string ens; + + public ENS(string ens) + { + this.ens = ens; + } + + public bool IsValid => !string.IsNullOrEmpty(ens) && ens.IsEns(); + + public bool Equals (ENS other) => Equals(other.ens); + + public bool Equals(string other) => + string.Equals(ens, other, StringComparison.OrdinalIgnoreCase); + + public override string ToString() => ens; + } +} diff --git a/Explorer/Assets/DCL/CommunicationData/URLHelpers/ENS.cs.meta b/Explorer/Assets/DCL/CommunicationData/URLHelpers/ENS.cs.meta new file mode 100644 index 0000000000..65f2d7a069 --- /dev/null +++ b/Explorer/Assets/DCL/CommunicationData/URLHelpers/ENS.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 38ad8ba0e2ff40d398faaecbb17b2bf7 +timeCreated: 1721167050 \ No newline at end of file diff --git a/Explorer/Assets/DCL/CommunicationData/URLHelpers/EnsExtensions.cs b/Explorer/Assets/DCL/CommunicationData/URLHelpers/EnsExtensions.cs index 3d855a18b9..0d0eb17bdb 100644 --- a/Explorer/Assets/DCL/CommunicationData/URLHelpers/EnsExtensions.cs +++ b/Explorer/Assets/DCL/CommunicationData/URLHelpers/EnsExtensions.cs @@ -6,11 +6,15 @@ namespace DCL.CommunicationData.URLHelpers public static class EnsExtensions { private static readonly Regex REGEX = new (@"^[a-zA-Z0-9.]+\.eth$"); + private const string WORLD_URL = "https://worlds-content-server.decentraland.org/world/"; public static bool IsEns(this string str) => REGEX.Match(str).Success; public static bool IsEns(this URLDomain domain) => REGEX.Match(domain.Value).Success; + + public static string ConvertEnsToWorldUrl(this ENS ens) => + WORLD_URL + ens.ToString().ToLower(); } } diff --git a/Explorer/Assets/DCL/CommunicationData/URLHelpers/URLPath.cs b/Explorer/Assets/DCL/CommunicationData/URLHelpers/URLPath.cs index 6d42796fc0..9e7823b059 100644 --- a/Explorer/Assets/DCL/CommunicationData/URLHelpers/URLPath.cs +++ b/Explorer/Assets/DCL/CommunicationData/URLHelpers/URLPath.cs @@ -26,5 +26,8 @@ public override int GetHashCode() => public static URLPath FromString(string url) => new (url); + + public bool IsEmpty() => + string.IsNullOrEmpty(Value); } } diff --git a/Explorer/Assets/DCL/ECS/GlobalPartitioning/GlobalDeferredLoadingSystem.cs b/Explorer/Assets/DCL/ECS/GlobalPartitioning/GlobalDeferredLoadingSystem.cs index 39f69bdd0b..48820622b1 100644 --- a/Explorer/Assets/DCL/ECS/GlobalPartitioning/GlobalDeferredLoadingSystem.cs +++ b/Explorer/Assets/DCL/ECS/GlobalPartitioning/GlobalDeferredLoadingSystem.cs @@ -16,10 +16,14 @@ using ECS.StreamableLoading.AssetBundles; using ECS.StreamableLoading.AudioClips; using ECS.StreamableLoading.DeferredLoading; +using ECS.StreamableLoading.GLTF; using ECS.StreamableLoading.NFTShapes; using ECS.StreamableLoading.Textures; using SceneRunner.Scene; using UnityEngine; +using LoadWearableAssetBundleManifestSystem = DCL.AvatarRendering.Wearables.Systems.Load.LoadWearableAssetBundleManifestSystem; +using LoadWearablesByParamSystem = DCL.AvatarRendering.Wearables.Systems.Load.LoadWearablesByParamSystem; +using LoadWearablesDTOByPointersSystem = DCL.AvatarRendering.Wearables.Systems.Load.LoadWearablesDTOByPointersSystem; namespace DCL.GlobalPartitioning { @@ -51,6 +55,7 @@ static GlobalDeferredLoadingSystem() CreateQuery(), CreateQuery(), CreateQuery(), + CreateQuery(), CreateQuery(), CreateQuery(), CreateQuery(), diff --git a/Explorer/Assets/DCL/Editor/DCL.Editor.asmdef b/Explorer/Assets/DCL/Editor/DCL.Editor.asmdef index 34d9224c75..c2770eb0e0 100644 --- a/Explorer/Assets/DCL/Editor/DCL.Editor.asmdef +++ b/Explorer/Assets/DCL/Editor/DCL.Editor.asmdef @@ -4,7 +4,7 @@ "references": [ "GUID:fc4fd35fb877e904d8cedee73b2256f6", "GUID:d07d357721497c3469c49e00cf077f4d", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:478a2357cc57436488a56e564b08d223", "GUID:df380645f10b7bc4b97d4f5eb6303d95", "GUID:15fc0a57446b3144c949da3e2b9737a9", diff --git a/Explorer/Assets/DCL/EmojiPanel/EmojiSearchController.cs b/Explorer/Assets/DCL/EmojiPanel/EmojiSearchController.cs index 8e68650d5d..9487826c37 100644 --- a/Explorer/Assets/DCL/EmojiPanel/EmojiSearchController.cs +++ b/Explorer/Assets/DCL/EmojiPanel/EmojiSearchController.cs @@ -29,11 +29,7 @@ public EmojiSearchController(SearchBarView view, Transform parent, EmojiButton e view.inputField.onValueChanged.AddListener(OnValueChanged); view.inputField.onSelect.AddListener(BlockUnwantedInputs); view.inputField.onDeselect.AddListener(UnblockUnwantedInputs); - view.inputField.onEndEdit.AddListener(UnblockUnwantedInputs); - view.Disabled += UnblockUnwantedInputs; - view.clearSearchButton.onClick.AddListener(ClearSearch); - view.clearSearchButton.gameObject.SetActive(false); searchItemsPool = new ObjectPool( @@ -47,19 +43,15 @@ public EmojiSearchController(SearchBarView view, Transform parent, EmojiButton e public void Dispose() { ReleaseAllSearchResults(); - view.inputField.onValueChanged.RemoveListener(OnValueChanged); view.inputField.onSelect.RemoveListener(BlockUnwantedInputs); view.inputField.onDeselect.RemoveListener(UnblockUnwantedInputs); - view.inputField.onEndEdit.RemoveListener(UnblockUnwantedInputs); - view.Disabled -= UnblockUnwantedInputs; - view.clearSearchButton.onClick.RemoveListener(ClearSearch); } private void BlockUnwantedInputs(string _) { - inputBlock.Disable(InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Player); + inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.PLAYER); } private void UnblockUnwantedInputs(string _) => @@ -67,7 +59,7 @@ private void UnblockUnwantedInputs(string _) => private void UnblockUnwantedInputs() { - inputBlock.Enable(InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Player); + inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.PLAYER); } private EmojiButton CreatePoolElements(Transform parent, EmojiButton emojiButton) diff --git a/Explorer/Assets/DCL/EmotesWheel/DCL.EmotesWheel.asmdef b/Explorer/Assets/DCL/EmotesWheel/DCL.EmotesWheel.asmdef index c51500e23b..1a10735061 100644 --- a/Explorer/Assets/DCL/EmotesWheel/DCL.EmotesWheel.asmdef +++ b/Explorer/Assets/DCL/EmotesWheel/DCL.EmotesWheel.asmdef @@ -12,7 +12,7 @@ "GUID:6830e2f56251b492e9934f1fafbc8c7d", "GUID:9ca29a7d75ab84bab806a20bbd350fd8", "GUID:e169fa6683c924c7e99a85981a91d953", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", "GUID:e7751264a6735a942a64770d71eb49e0", "GUID:75469ad4d38634e559750d17036d5f7c", @@ -20,7 +20,9 @@ "GUID:c80c82a8f4e04453b85fbab973d6774a", "GUID:007bff6000804d90ac597452fb69a4ee", "GUID:d832748739a186646b8656bdbd447ad0", - "GUID:f95dba842fdbb470fb6d1dced822ba04" + "GUID:f95dba842fdbb470fb6d1dced822ba04", + "GUID:543b8f091a5947a3880b7f2bca2358bd", + "GUID:e5a23cdae0ef4d86aafc237a73280975" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/EmotesWheel/EmotesWheelController.cs b/Explorer/Assets/DCL/EmotesWheel/EmotesWheelController.cs index 1b6bb8825e..95ebba8d05 100644 --- a/Explorer/Assets/DCL/EmotesWheel/EmotesWheelController.cs +++ b/Explorer/Assets/DCL/EmotesWheel/EmotesWheelController.cs @@ -2,6 +2,7 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables; using DCL.Backpack; using DCL.Diagnostics; @@ -22,8 +23,9 @@ namespace DCL.EmotesWheel { public class EmotesWheelController : ControllerBase { + private const string? EMPTY_IMAGE_TYPE = "empty"; private readonly ISelfProfile selfProfile; - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; private readonly NftTypeIconSO rarityBackgrounds; private readonly World world; private readonly Entity playerEntity; @@ -42,7 +44,7 @@ public class EmotesWheelController : ControllerBase public EmotesWheelController(ViewFactoryMethod viewFactory, ISelfProfile selfProfile, - IEmoteCache emoteCache, + IEmoteStorage emoteStorage, NftTypeIconSO rarityBackgrounds, World world, Entity playerEntity, @@ -54,7 +56,7 @@ public EmotesWheelController(ViewFactoryMethod viewFactory, : base(viewFactory) { this.selfProfile = selfProfile; - this.emoteCache = emoteCache; + this.emoteStorage = emoteStorage; this.rarityBackgrounds = rarityBackgrounds; this.world = world; this.playerEntity = playerEntity; @@ -155,7 +157,7 @@ private void SetUpSlots(Profile profile) private async UniTaskVoid SetUpSlotAsync(int slot, URN emoteUrn, CancellationToken ct) { - if (!emoteCache.TryGetEmote(emoteUrn, out IEmote emote)) + if (!emoteStorage.TryGetElement(emoteUrn, out IEmote emote)) { ReportHub.LogError(new ReportData(), $"Could not setup emote wheel slot {slot} for {emoteUrn}, missing emote in cache"); return; @@ -173,7 +175,7 @@ private void SetUpEmptySlot(int slot) { EmoteWheelSlotView view = viewInstance!.Slots[slot]; - view.BackgroundRarity.sprite = rarityBackgrounds.GetTypeImage("empty"); + view.BackgroundRarity.sprite = rarityBackgrounds.GetTypeImage(EMPTY_IMAGE_TYPE); view.EmptyContainer.SetActive(true); view.Thumbnail.gameObject.SetActive(false); } @@ -192,7 +194,7 @@ private async UniTask WaitForThumbnailAsync(IEmote emote, EmoteWheelSlotView vie private void UpdateCurrentEmote(int slot) { - if (!emoteCache.TryGetEmote(currentEmotes[slot], out IEmote emote)) + if (!emoteStorage.TryGetElement(currentEmotes[slot], out IEmote emote)) ClearCurrentEmote(slot); else viewInstance!.CurrentEmoteName.text = emote.GetName(); @@ -200,7 +202,7 @@ private void UpdateCurrentEmote(int slot) private void ClearCurrentEmote(int slot) { - viewInstance!.CurrentEmoteName.text = ""; + viewInstance!.CurrentEmoteName.text = string.Empty; } private void PlayEmote(int slot) @@ -231,14 +233,14 @@ private void OpenBackpack() private void UnblockUnwantedInputs() { - inputBlock.Enable(InputMapComponent.Kind.EmoteWheel); - inputBlock.Disable(InputMapComponent.Kind.Emotes); + inputBlock.Enable(InputMapComponent.Kind.EMOTE_WHEEL); + inputBlock.Disable(InputMapComponent.Kind.EMOTES, InputMapComponent.Kind.SHORTCUTS); } private void BlockUnwantedInputs() { - inputBlock.Disable(InputMapComponent.Kind.EmoteWheel); - inputBlock.Enable(InputMapComponent.Kind.Emotes); + inputBlock.Disable(InputMapComponent.Kind.EMOTE_WHEEL); + inputBlock.Enable(InputMapComponent.Kind.EMOTES, InputMapComponent.Kind.SHORTCUTS); } private void ListenToSlotsInput(InputActionMap inputActionMap) diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton.meta b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton.meta new file mode 100644 index 0000000000..94a0d7274f --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +<<<<<<<< HEAD:Explorer/Assets/DCL/ApplicationVersionGuard/VersionUpdateScreen.prefab.meta +guid: 61f29ef837156384298e7fd14a9aad67 +PrefabImporter: +======== +guid: a7f977d5958657847ade7852b739fd6c +folderAsset: yes +DefaultImporter: +>>>>>>>> refs/remotes/origin/main:Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton.meta + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Active.anim b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Active.anim new file mode 100644 index 0000000000..03374d7d1b --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Active.anim @@ -0,0 +1,359 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Active + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: Background + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedBackground + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedText + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedText + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 4080383872 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3146825030 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3779823699 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 847614765 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 78225181 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 2734955949 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: Background + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedBackground + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedText + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedText + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Explorer/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset.meta b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Active.anim.meta similarity index 64% rename from Explorer/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset.meta rename to Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Active.anim.meta index 7211b4fd70..9d4fef731c 100644 --- a/Explorer/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset.meta +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Active.anim.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 3158644cdd67fb242a85e9b6ad677036 +guid: e0e603c3dea2ad1468ec99fcb3756872 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 0 + mainObjectFileID: 7400000 userData: assetBundleName: assetBundleVariant: diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Empty.anim b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Empty.anim new file mode 100644 index 0000000000..913794feb2 --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Empty.anim @@ -0,0 +1,359 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Empty + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: Background + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedBackground + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedText + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedText + classID: 1 + script: {fileID: 0} + flags: 0 + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 4080383872 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3146825030 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 2734955949 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 78225181 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 847614765 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3779823699 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: Background + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedBackground + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedText + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedText + classID: 1 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Empty.anim.meta b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Empty.anim.meta new file mode 100644 index 0000000000..29a55cae7e --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Empty.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3e1f7fae22972db4f82c626a4023dc16 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/HelpButtonOverrideController.overrideController b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/HelpButtonOverrideController.overrideController new file mode 100644 index 0000000000..0986c8c2ed --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/HelpButtonOverrideController.overrideController @@ -0,0 +1,19 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!221 &22100000 +AnimatorOverrideController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HelpButtonOverrideController + m_Controller: {fileID: 9100000, guid: 29515e57a75974c4480e658f7421d023, type: 2} + m_Clips: + - m_OriginalClip: {fileID: 7400000, guid: 43e9f4fd4bce23e46b692fbe72981b78, type: 2} + m_OverrideClip: {fileID: 7400000, guid: 3e1f7fae22972db4f82c626a4023dc16, type: 2} + - m_OriginalClip: {fileID: 7400000, guid: ea61896d50f57c949b869912b2e72b67, type: 2} + m_OverrideClip: {fileID: 7400000, guid: 9287e252088ba094d91459b4ab3b5783, type: 2} + - m_OriginalClip: {fileID: 7400000, guid: 3935cf9ff713f5e4badf081a136f96bb, type: 2} + m_OverrideClip: {fileID: 7400000, guid: 5093601753e15ff48859cf455faf0a0a, type: 2} + - m_OriginalClip: {fileID: 7400000, guid: b0a045939fb100b438fdb51c4b59789e, type: 2} + m_OverrideClip: {fileID: 7400000, guid: e0e603c3dea2ad1468ec99fcb3756872, type: 2} diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/HelpButtonOverrideController.overrideController.meta b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/HelpButtonOverrideController.overrideController.meta new file mode 100644 index 0000000000..494da425e5 --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/HelpButtonOverrideController.overrideController.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a006366825b69884f9bb5da54b63adb1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 22100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Hover.anim b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Hover.anim new file mode 100644 index 0000000000..336f9d3c9f --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Hover.anim @@ -0,0 +1,366 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Hover + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: HoverSprites + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnhoverSprites + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedBackground + classID: 1 + script: {fileID: 0} + flags: 0 + m_PPtrCurves: + - serializedVersion: 2 + curve: + - time: 0 + value: {fileID: 21300000, guid: 6e68f3c0e96070343bd5cf728a7b71b6, type: 3} + - time: 0.016666668 + value: {fileID: 21300000, guid: 54db90b513f86ff46a6aa6f6676cd48b, type: 3} + attribute: m_Sprite + path: HoverSprites + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 2 + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 847614765 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3541911651 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 922705709 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 2734955949 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3146825030 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3541911651 + attribute: 2015549526 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 1 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: + - {fileID: 21300000, guid: 6e68f3c0e96070343bd5cf728a7b71b6, type: 3} + - {fileID: 21300000, guid: 54db90b513f86ff46a6aa6f6676cd48b, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.033333335 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: HoverSprites + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnhoverSprites + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedBackground + classID: 1 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Hover.anim.meta b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Hover.anim.meta new file mode 100644 index 0000000000..346b267715 --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Hover.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9287e252088ba094d91459b4ab3b5783 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Unhover.anim b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Unhover.anim new file mode 100644 index 0000000000..799ff952ee --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Unhover.anim @@ -0,0 +1,384 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Unhover + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: HoverSprites + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnhoverSprites + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedBackground + classID: 1 + script: {fileID: 0} + flags: 0 + m_PPtrCurves: + - serializedVersion: 2 + curve: + - time: 0 + value: {fileID: 21300000, guid: 54db90b513f86ff46a6aa6f6676cd48b, type: 3} + - time: 0.016666668 + value: {fileID: 21300000, guid: 6e68f3c0e96070343bd5cf728a7b71b6, type: 3} + attribute: m_Sprite + path: UnhoverSprites + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 2 + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 3541911651 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 922705709 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 847614765 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 2734955949 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3146825030 + attribute: 2086281974 + script: {fileID: 0} + typeID: 1 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 922705709 + attribute: 2015549526 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 1 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: + - {fileID: 21300000, guid: 54db90b513f86ff46a6aa6f6676cd48b, type: 3} + - {fileID: 21300000, guid: 6e68f3c0e96070343bd5cf728a7b71b6, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.033333335 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: HoverSprites + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnhoverSprites + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: UnselectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedImage + classID: 1 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_IsActive + path: SelectedBackground + classID: 1 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Unhover.anim.meta b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Unhover.anim.meta new file mode 100644 index 0000000000..53c4b01f06 --- /dev/null +++ b/Explorer/Assets/DCL/ExplorePanel/Assets/Animations/HelpButton/Unhover.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5093601753e15ff48859cf455faf0a0a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/ExplorePanel/ExplorePanel.asmdef b/Explorer/Assets/DCL/ExplorePanel/ExplorePanel.asmdef index fae21f5176..3cc03cdfa0 100644 --- a/Explorer/Assets/DCL/ExplorePanel/ExplorePanel.asmdef +++ b/Explorer/Assets/DCL/ExplorePanel/ExplorePanel.asmdef @@ -33,7 +33,8 @@ "GUID:766b242fb43af451aaa331f39872177d", "GUID:df934776371151c45b473e9aa39efd1b", "GUID:988ab8d3e86f0c94f9d6286e5877ff8b", - "GUID:1b8e1e1bd01505f478f0369c04a4fb2f" + "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", + "GUID:54660b0fae444b4cbfdafa9d68108f04" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/ExplorePanel/ExplorePanelController.cs b/Explorer/Assets/DCL/ExplorePanel/ExplorePanelController.cs index 1e4e038d69..ae294588ba 100644 --- a/Explorer/Assets/DCL/ExplorePanel/ExplorePanelController.cs +++ b/Explorer/Assets/DCL/ExplorePanel/ExplorePanelController.cs @@ -1,4 +1,3 @@ -using Arch.Core; using Cysharp.Threading.Tasks; using DCL.Backpack; using DCL.Input; @@ -25,7 +24,6 @@ public class ExplorePanelController : ControllerBase keyValuePair in exploreSections) keyValuePair.Value.Deactivate(); - tabsBySections = viewInstance.TabSelectorMappedViews.ToDictionary(map => map.Section, map => map.TabSelectorViews); + tabsBySections = viewInstance!.TabSelectorMappedViews.ToDictionary(map => map.Section, map => map.TabSelectorViews); foreach ((ExploreSections section, TabSelectorView? tabSelector) in tabsBySections) { @@ -238,12 +235,12 @@ private void UnRegisterHotkeys() private void BlockUnwantedInputs() { - inputBlock.Disable(InputMapComponent.Kind.Camera , InputMapComponent.Kind.Player); + inputBlock.Disable(InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.PLAYER); } private void UnblockUnwantedInputs() { - inputBlock.Enable(InputMapComponent.Kind.Camera , InputMapComponent.Kind.Player); + inputBlock.Enable(InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.PLAYER); } protected override UniTask WaitForCloseIntentAsync(CancellationToken ct) diff --git a/Explorer/Assets/DCL/FeatureFlags/DCL.FeatureFlags.asmdef b/Explorer/Assets/DCL/FeatureFlags/DCL.FeatureFlags.asmdef index 7d072193bc..4c70805f84 100644 --- a/Explorer/Assets/DCL/FeatureFlags/DCL.FeatureFlags.asmdef +++ b/Explorer/Assets/DCL/FeatureFlags/DCL.FeatureFlags.asmdef @@ -6,10 +6,10 @@ "GUID:8322ea9340a544c59ddc56d4793eac74", "GUID:5ab29fa8ae5769b49ab29e390caca7a4", "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b", "GUID:91cf8206af184dac8e30eb46747e9939", - "GUID:8baf705856414dad9a73b3f382f1bc8b" + "GUID:8baf705856414dad9a73b3f382f1bc8b", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs b/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs new file mode 100644 index 0000000000..d3de56aba0 --- /dev/null +++ b/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs @@ -0,0 +1,14 @@ +namespace DCL.FeatureFlags +{ + public static class FeatureFlagsStrings + { + public static readonly string PORTABLE_EXPERIENCE = "alfa-portable-experiences"; + public static readonly string GLOBAL_PORTABLE_EXPERIENCE = "alfa-global-portable-experiences"; + public static readonly string PORTABLE_EXPERIENCE_CHAT_COMMANDS = "alfa-portable-experiences-chat-commands"; + public static readonly string MAP_PINS = "alfa-map-pins"; + public static readonly string CUSTOM_MAP_PINS_ICONS = "alfa-map-pins-custom-icons"; + public static readonly string USER_ALLOW_LIST = "user-allow-list"; + public static readonly string CSV_VARIANT = "csv-variant"; + public static readonly string WALLETS_VARIANT = "wallet"; + } +} diff --git a/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs.meta b/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs.meta new file mode 100644 index 0000000000..ca47638191 --- /dev/null +++ b/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1640b8dce5634f99bcdfe1f177ee523d +timeCreated: 1726244958 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Character/MovementBlocker/Components/CameraBlockerComponent.cs b/Explorer/Assets/DCL/Input/Component/CameraBlockerComponent.cs similarity index 54% rename from Explorer/Assets/DCL/Character/MovementBlocker/Components/CameraBlockerComponent.cs rename to Explorer/Assets/DCL/Input/Component/CameraBlockerComponent.cs index ca71c9b4eb..2678f2ddaf 100644 --- a/Explorer/Assets/DCL/Character/MovementBlocker/Components/CameraBlockerComponent.cs +++ b/Explorer/Assets/DCL/Input/Component/CameraBlockerComponent.cs @@ -1,4 +1,4 @@ -namespace DCL.CharacterMotion.Components +namespace DCL.Input.Systems { public struct CameraBlockerComponent { } } diff --git a/Explorer/Assets/DCL/Input/Component/CameraBlockerComponent.cs.meta b/Explorer/Assets/DCL/Input/Component/CameraBlockerComponent.cs.meta new file mode 100644 index 0000000000..f8343fd7d3 --- /dev/null +++ b/Explorer/Assets/DCL/Input/Component/CameraBlockerComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a41aa0e369524db593a52f9d0a3a5a2b +timeCreated: 1724675361 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Input/Component/InputMapComponent.cs b/Explorer/Assets/DCL/Input/Component/InputMapComponent.cs index 24d759028a..4ae05fd249 100644 --- a/Explorer/Assets/DCL/Input/Component/InputMapComponent.cs +++ b/Explorer/Assets/DCL/Input/Component/InputMapComponent.cs @@ -12,13 +12,13 @@ public struct InputMapComponent [Flags] public enum Kind { - None = 0, - Player = 1, - Camera = 1 << 1, - FreeCamera = 1 << 2, - EmoteWheel = 1 << 3, - Emotes = 1 << 4, - Shortcuts = 1 << 5, + NONE = 0, + PLAYER = 1, + CAMERA = 1 << 1, + FREE_CAMERA = 1 << 2, + EMOTE_WHEEL = 1 << 3, + EMOTES = 1 << 4, + SHORTCUTS = 1 << 5, } private Kind active; @@ -56,6 +56,7 @@ public InputMapComponent(Kind flags) public void BlockInput(Kind kind) { inputBlockCounters[kind] += 1; + ReportHub.Log(ReportCategory.INPUT, $"Block {kind} - {inputBlockCounters[kind]}"); if (inputBlockCounters[kind] == 1) { Active &= ~kind; } } @@ -63,7 +64,7 @@ public void BlockInput(Kind kind) public void UnblockInput(Kind kind) { inputBlockCounters[kind] -= 1; - + ReportHub.Log(ReportCategory.INPUT, $"Unblock {kind} - {inputBlockCounters[kind]}"); switch (inputBlockCounters[kind]) { case 0: diff --git a/Explorer/Assets/DCL/Input/Crosshair/CrosshairCanvas.cs b/Explorer/Assets/DCL/Input/Crosshair/CrosshairCanvas.cs index 871a1a1e65..3966f55cf2 100644 --- a/Explorer/Assets/DCL/Input/Crosshair/CrosshairCanvas.cs +++ b/Explorer/Assets/DCL/Input/Crosshair/CrosshairCanvas.cs @@ -41,13 +41,13 @@ public void ResetPosition() SetPosition(new Vector2(50, 50)); } - public void SetCursorStyle(CursorStyle style) + public void SetCursorStyle(CursorStyle style, bool disableCrosshair = false) { - if (currentState == style) + if (currentState == style && crossHairElement.visible == !disableCrosshair) return; cursorElement.visible = style == CursorStyle.CameraPan; - crossHairElement.visible = style != CursorStyle.CameraPan; + crossHairElement.visible = !disableCrosshair && style != CursorStyle.CameraPan; Sprite sprite = style switch { diff --git a/Explorer/Assets/DCL/Input/Crosshair/ICrosshairView.cs b/Explorer/Assets/DCL/Input/Crosshair/ICrosshairView.cs index 7ff61f9b61..087b208643 100644 --- a/Explorer/Assets/DCL/Input/Crosshair/ICrosshairView.cs +++ b/Explorer/Assets/DCL/Input/Crosshair/ICrosshairView.cs @@ -4,7 +4,7 @@ namespace DCL.Input.Crosshair { public interface ICrosshairView { - void SetCursorStyle(CursorStyle style); + void SetCursorStyle(CursorStyle style, bool disableCrosshair = false); void SetDisplayed(bool displayed); diff --git a/Explorer/Assets/DCL/Input/DCL.Input.asmdef b/Explorer/Assets/DCL/Input/DCL.Input.asmdef index 38a685b23f..d99cc2fc6c 100644 --- a/Explorer/Assets/DCL/Input/DCL.Input.asmdef +++ b/Explorer/Assets/DCL/Input/DCL.Input.asmdef @@ -4,13 +4,13 @@ "references": [ "GUID:75469ad4d38634e559750d17036d5f7c", "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", "GUID:78e0b5197588c4841a6544409324031c", "GUID:275e22790c04e9b47a5085d7b0c4432a", "GUID:9e24947de15b9834991c9d8411ea37cf", + "GUID:166b65e6dfc848bb9fb075f53c293a38", "GUID:4e9911d3faa34ce3ad61855f4f549665", - "GUID:166b65e6dfc848bb9fb075f53c293a38" + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Input/ECSInputBlock.cs b/Explorer/Assets/DCL/Input/ECSInputBlock.cs index 54aaef25ff..a750287a2c 100644 --- a/Explorer/Assets/DCL/Input/ECSInputBlock.cs +++ b/Explorer/Assets/DCL/Input/ECSInputBlock.cs @@ -1,6 +1,5 @@ using Arch.Core; using DCL.Input.Component; -using DCL.Utilities; using ECS.Abstract; namespace DCL.Input @@ -24,6 +23,30 @@ public void Disable(params InputMapComponent.Kind[] kinds) inputMapComponent.BlockInput(kind); } + public void Disable(InputMapComponent.Kind kind) + { + inputMap ??= globalWorld.CacheInputMap(); + ref InputMapComponent inputMapComponent = ref inputMap.Value.GetInputMapComponent(globalWorld); + inputMapComponent.BlockInput(kind); + } + + public void Disable(InputMapComponent.Kind kind, InputMapComponent.Kind kind2) + { + inputMap ??= globalWorld.CacheInputMap(); + ref InputMapComponent inputMapComponent = ref inputMap.Value.GetInputMapComponent(globalWorld); + inputMapComponent.BlockInput(kind); + inputMapComponent.BlockInput(kind2); + } + + public void Disable(InputMapComponent.Kind kind, InputMapComponent.Kind kind2, InputMapComponent.Kind kind3) + { + inputMap ??= globalWorld.CacheInputMap(); + ref InputMapComponent inputMapComponent = ref inputMap.Value.GetInputMapComponent(globalWorld); + inputMapComponent.BlockInput(kind); + inputMapComponent.BlockInput(kind2); + inputMapComponent.BlockInput(kind3); + } + public void Enable(params InputMapComponent.Kind[] kinds) { inputMap ??= globalWorld.CacheInputMap(); @@ -32,5 +55,29 @@ public void Enable(params InputMapComponent.Kind[] kinds) foreach (var kind in kinds) inputMapComponent.UnblockInput(kind); } + + public void Enable(InputMapComponent.Kind kind) + { + inputMap ??= globalWorld.CacheInputMap(); + ref InputMapComponent inputMapComponent = ref inputMap.Value.GetInputMapComponent(globalWorld); + inputMapComponent.UnblockInput(kind); + } + + public void Enable(InputMapComponent.Kind kind, InputMapComponent.Kind kind2) + { + inputMap ??= globalWorld.CacheInputMap(); + ref InputMapComponent inputMapComponent = ref inputMap.Value.GetInputMapComponent(globalWorld); + inputMapComponent.UnblockInput(kind); + inputMapComponent.UnblockInput(kind2); + } + + public void Enable(InputMapComponent.Kind kind, InputMapComponent.Kind kind2, InputMapComponent.Kind kind3) + { + inputMap ??= globalWorld.CacheInputMap(); + ref InputMapComponent inputMapComponent = ref inputMap.Value.GetInputMapComponent(globalWorld); + inputMapComponent.UnblockInput(kind); + inputMapComponent.UnblockInput(kind2); + inputMapComponent.UnblockInput(kind3); + } } } diff --git a/Explorer/Assets/DCL/Input/ECSInputBlock.cs.meta b/Explorer/Assets/DCL/Input/ECSInputBlock.cs.meta index 84a11f1eb9..7544de62bc 100644 --- a/Explorer/Assets/DCL/Input/ECSInputBlock.cs.meta +++ b/Explorer/Assets/DCL/Input/ECSInputBlock.cs.meta @@ -1,3 +1,11 @@ fileFormatVersion: 2 -guid: a5c3e71f930c43818ce476b4893286b8 -timeCreated: 1721124270 \ No newline at end of file +guid: 2ec0b4f7a96b16f4ca39aa02bdef8072 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Input/IInputBlock.cs b/Explorer/Assets/DCL/Input/IInputBlock.cs index c40813f167..0ab622095d 100644 --- a/Explorer/Assets/DCL/Input/IInputBlock.cs +++ b/Explorer/Assets/DCL/Input/IInputBlock.cs @@ -5,6 +5,14 @@ namespace DCL.Input public interface IInputBlock { public void Disable(params InputMapComponent.Kind[] kinds); + public void Disable(InputMapComponent.Kind kind); + public void Disable(InputMapComponent.Kind kind, InputMapComponent.Kind kind2); + public void Disable(InputMapComponent.Kind kind, InputMapComponent.Kind kind2, InputMapComponent.Kind kind3); + public void Enable(params InputMapComponent.Kind[] kinds); + public void Enable(InputMapComponent.Kind kind); + public void Enable(InputMapComponent.Kind kind, InputMapComponent.Kind kind2); + public void Enable(InputMapComponent.Kind kind, InputMapComponent.Kind kind2, InputMapComponent.Kind kind3); + } } diff --git a/Explorer/Assets/DCL/Input/Systems/ApplyInputMapsSystem.cs b/Explorer/Assets/DCL/Input/Systems/ApplyInputMapsSystem.cs index 32ff22e481..0772381b0d 100644 --- a/Explorer/Assets/DCL/Input/Systems/ApplyInputMapsSystem.cs +++ b/Explorer/Assets/DCL/Input/Systems/ApplyInputMapsSystem.cs @@ -43,22 +43,22 @@ protected override void Update(float t) switch (value) { - case InputMapComponent.Kind.Camera: + case InputMapComponent.Kind.CAMERA: SetActionMapEnabled(isActive, dclInput.Camera); break; - case InputMapComponent.Kind.FreeCamera: + case InputMapComponent.Kind.FREE_CAMERA: SetActionMapEnabled(isActive, dclInput.FreeCamera); break; - case InputMapComponent.Kind.Player: + case InputMapComponent.Kind.PLAYER: SetActionMapEnabled(isActive, dclInput.Player); break; - case InputMapComponent.Kind.EmoteWheel: + case InputMapComponent.Kind.EMOTE_WHEEL: SetActionMapEnabled(isActive, dclInput.EmoteWheel); break; - case InputMapComponent.Kind.Emotes: + case InputMapComponent.Kind.EMOTES: SetActionMapEnabled(isActive, dclInput.Emotes); break; - case InputMapComponent.Kind.Shortcuts: + case InputMapComponent.Kind.SHORTCUTS: SetActionMapEnabled(isActive, dclInput.Shortcuts); break; } diff --git a/Explorer/Assets/DCL/Input/Systems/UpdateCursorInputSystem.cs b/Explorer/Assets/DCL/Input/Systems/UpdateCursorInputSystem.cs index 3a9c154a21..e97003f6e4 100644 --- a/Explorer/Assets/DCL/Input/Systems/UpdateCursorInputSystem.cs +++ b/Explorer/Assets/DCL/Input/Systems/UpdateCursorInputSystem.cs @@ -31,6 +31,7 @@ public partial class UpdateCursorInputSystem : UpdateInputSystem allowedMediaHostnames; public List requiredPermissions; public List? spawnPoints; + public bool isPortableExperience; [Serializable] public struct SpawnPoint @@ -38,7 +39,7 @@ public Vector3 ToVector3() => } /// - /// Coordinates is either a single value or a list of values + /// Coordinates is either a single value or a list of values /// [JsonConverter(typeof(SpawnPointCoordinateConverter))] public struct Coordinate diff --git a/Explorer/Assets/DCL/LOD/DCL.LOD.asmdef b/Explorer/Assets/DCL/LOD/DCL.LOD.asmdef index 9b682bb6cc..9cd9d62076 100644 --- a/Explorer/Assets/DCL/LOD/DCL.LOD.asmdef +++ b/Explorer/Assets/DCL/LOD/DCL.LOD.asmdef @@ -15,8 +15,7 @@ "GUID:4725c02394ab4ce19f889e4e8001f989", "GUID:e0eedfa2deb9406daf86fd8368728e39", "GUID:d0ec51c740809fd4680d3ea27279dca7", - "GUID:46c2e553ecab9ff4784aee64075136c9", - "GUID:101b8b6ebaf64668909b49c4b7a1420d" + "GUID:46c2e553ecab9ff4784aee64075136c9" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/LOD/Systems/InstantiateSceneLODInfoSystem.cs b/Explorer/Assets/DCL/LOD/Systems/InstantiateSceneLODInfoSystem.cs index 70e47b35c0..88ad6a0e0d 100644 --- a/Explorer/Assets/DCL/LOD/Systems/InstantiateSceneLODInfoSystem.cs +++ b/Explorer/Assets/DCL/LOD/Systems/InstantiateSceneLODInfoSystem.cs @@ -81,7 +81,7 @@ private void ResolveCurrentLODPromise(ref SceneLODInfo sceneLODInfo, ref SceneDe } else { - ReportHub.LogWarning(GetReportCategory(), $"LOD request for {sceneLODInfo.CurrentLODPromise.LoadingIntention.Hash} failed"); + ReportHub.LogWarning(GetReportData(), $"LOD request for {sceneLODInfo.CurrentLODPromise.LoadingIntention.Hash} failed"); sceneLODInfo.AddFailedLOD(); } diff --git a/Explorer/Assets/DCL/LOD/Systems/ResolveVisualSceneStateSystem.cs b/Explorer/Assets/DCL/LOD/Systems/ResolveVisualSceneStateSystem.cs index 32d56000af..38799341c1 100644 --- a/Explorer/Assets/DCL/LOD/Systems/ResolveVisualSceneStateSystem.cs +++ b/Explorer/Assets/DCL/LOD/Systems/ResolveVisualSceneStateSystem.cs @@ -41,8 +41,8 @@ private void AddSceneVisualState(in Entity entity, ref PartitionComponent partit if (!partition.IsDirty) return; if (partition.OutOfRange) return; - - VisualSceneState visualSceneState = new VisualSceneState(); + + var visualSceneState = new VisualSceneState(); visualSceneStateResolver.ResolveVisualSceneState(ref visualSceneState, partition, sceneDefinitionComponent, lodSettingsAsset, realmData); visualSceneState.IsDirty = false; World.Add(entity, visualSceneState); diff --git a/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs b/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs index 83e54be816..4b3f322fc9 100644 --- a/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs +++ b/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs @@ -5,6 +5,8 @@ using DCL.Diagnostics; using DCL.LOD.Components; using DCL.Multiplayer.Connections.DecentralandUrls; +using DCL.Optimization.PerformanceBudgeting; +using DCL.PluginSystem.Global; using ECS.Abstract; using ECS.LifeCycle.Components; using ECS.Prioritization.Components; @@ -46,7 +48,7 @@ protected override void Update(float t) } [Query] - [None(typeof(DeleteEntityIntention))] + [None(typeof(DeleteEntityIntention), typeof(PortableExperienceComponent))] private void UpdateLODLevel(ref SceneLODInfo sceneLODInfo, ref PartitionComponent partitionComponent, SceneDefinitionComponent sceneDefinitionComponent) { if (!partitionComponent.IsBehind) // Only want to load scene in our direction of travel @@ -64,7 +66,7 @@ private void StartLODPromise(ref SceneLODInfo sceneLODInfo, ref PartitionCompone { sceneLODInfo.CurrentLODPromise.ForgetLoading(World); - string platformLODKey = $"{sceneDefinitionComponent.Definition.id.ToLower()}_{level.ToString()}{PlatformUtils.GetPlatform()}"; + string platformLODKey = $"{sceneDefinitionComponent.Definition.id.ToLower()}_{level.ToString()}{PlatformUtils.GetCurrentPlatform()}"; var manifest = LODUtils.LODManifests(decentralandUrlsSource)[level]; var assetBundleIntention = GetAssetBundleIntention.FromHash(typeof(GameObject), @@ -89,7 +91,7 @@ private byte GetLODLevelForPartition(ref PartitionComponent partitionComponent, sceneLODCandidate = (byte)(i + 1); } - //LOD0 load distance may be very far away from its show distance depending on the object size. + //LOD0 load distance may be very far away from its show distance depending on the object size. //So, we force it if it has not been loaded and we passed the show distance threshold if (sceneLODInfo.metadata.LODChangeRelativeDistance >= partitionComponent.Bucket * ParcelMathHelper.PARCEL_SIZE && sceneLODCandidate == 1 && !sceneLODInfo.HasLOD(0)) diff --git a/Explorer/Assets/DCL/LOD/Systems/UpdateVisualSceneStateSystem.cs b/Explorer/Assets/DCL/LOD/Systems/UpdateVisualSceneStateSystem.cs index f2558809a5..524fe5179e 100644 --- a/Explorer/Assets/DCL/LOD/Systems/UpdateVisualSceneStateSystem.cs +++ b/Explorer/Assets/DCL/LOD/Systems/UpdateVisualSceneStateSystem.cs @@ -3,12 +3,14 @@ using DCL.Diagnostics; using DCL.LOD; using DCL.LOD.Components; +using DCL.Optimization.PerformanceBudgeting; using ECS.Abstract; using ECS.LifeCycle.Components; using ECS.Prioritization.Components; using ECS.SceneLifeCycle.Components; using ECS.SceneLifeCycle.SceneDefinition; using ECS.StreamableLoading.Common; +using SceneRunner; using SceneRunner.Scene; using System.Runtime.CompilerServices; @@ -20,21 +22,20 @@ namespace ECS.SceneLifeCycle.Systems [LogCategory(ReportCategory.LOD)] public partial class UpdateVisualSceneStateSystem : BaseUnityLoopSystem { + /// + /// Represents one of the methods in UpdateVisualSceneStateSystem, they should be converted to static ones to avoid closures + /// + private delegate void ContinuationMethod(Entity entity, ref VisualSceneState visualSceneState, ref SceneDefinitionComponent sceneDefinitionComponent, ref PartitionComponent partitionComponent, ref T switchComponent); + private readonly IRealmData realmData; private readonly IScenesCache scenesCache; private readonly ILODCache lodCache; private readonly ILODSettingsAsset lodSettingsAsset; private readonly SceneAssetLock sceneAssetLock; - private static readonly QueryDescription VISUAL_STATE_SCENE_QUERY = new QueryDescription() .WithAll() .WithAny>() - .WithNone(); - - /// - /// Represents one of the methods in UpdateVisualSceneStateSystem, they should be converted to static ones to avoid closures - /// - private delegate void ContinuationMethod(Entity entity, ref VisualSceneState visualSceneState, ref SceneDefinitionComponent sceneDefinitionComponent, ref PartitionComponent partitionComponent, ref T switchComponent); + .WithNone(); private readonly ContinuationMethod sceneFacadeToLODContinuation; private readonly ContinuationMethod> scenePromiseToLODContinuation; @@ -98,9 +99,10 @@ private void IterateOverOneOf(Archetype archetype, ContinuationMethod cont foreach (int entityIndex in chunk) { + ref SceneDefinitionComponent sceneDefinitionComponent = ref Unsafe.Add(ref scenedefinitioncomponentFirstElement, entityIndex); ref readonly Entity entity = ref Unsafe.Add(ref entityFirstElement, entityIndex); ref VisualSceneState visualSceneStateComponent = ref Unsafe.Add(ref visualscenestateFirstElement, entityIndex); - ref SceneDefinitionComponent sceneDefinitionComponent = ref Unsafe.Add(ref scenedefinitioncomponentFirstElement, entityIndex); + ref T customComponent = ref Unsafe.Add(ref customComponentFirstElement, entityIndex); ref PartitionComponent partitionComponent = ref Unsafe.Add(ref partitioncomponentFirstElement, entityIndex); @@ -118,18 +120,17 @@ private void IterateOverOneOf(Archetype archetype, ContinuationMethod cont private void SwapScenePromiseToLOD(Entity entity, ref VisualSceneState visualSceneState, ref SceneDefinitionComponent sceneDefinitionComponent, ref PartitionComponent partitionComponent, ref AssetPromise switchcomponent) { - if (visualSceneState.CurrentVisualSceneState == VisualSceneStateEnum.SHOWING_LOD) - { - var sceneLODInfo = SceneLODInfo.Create(); + if (visualSceneState.CurrentVisualSceneState != VisualSceneStateEnum.SHOWING_LOD) return; - //Dispose Promise - switchcomponent.ForgetLoading(World); + var sceneLODInfo = SceneLODInfo.Create(); - visualSceneState.IsDirty = false; + //Dispose Promise + switchcomponent.ForgetLoading(World); - World.Add(entity, sceneLODInfo); - World.Remove>(entity); - } + visualSceneState.IsDirty = false; + + World.Add(entity, sceneLODInfo); + World.Remove>(entity); } private void SwapLODToScenePromise(Entity entity, ref VisualSceneState visualSceneState, ref SceneDefinitionComponent sceneDefinitionComponent, ref PartitionComponent partitionComponent, ref SceneLODInfo switchComponent) @@ -143,26 +144,26 @@ private void SwapLODToScenePromise(Entity entity, ref VisualSceneState visualSce World.Add(entity, AssetPromise.Create(World, new GetSceneFacadeIntention(realmData.Ipfs, sceneDefinitionComponent), partitionComponent)); + World.Remove(entity); } } private void SwapSceneFacadeToLOD(Entity entity, ref VisualSceneState visualSceneState, ref SceneDefinitionComponent sceneDefinitionComponent, ref PartitionComponent partitionComponent, ref ISceneFacade switchComponent) - { - if (visualSceneState.CurrentVisualSceneState == VisualSceneStateEnum.SHOWING_LOD) { - //Create LODInfo - var sceneLODInfo = SceneLODInfo.Create(); + if (visualSceneState.CurrentVisualSceneState == VisualSceneStateEnum.SHOWING_LOD) + { + //Create LODInfo + var sceneLODInfo = SceneLODInfo.Create(); - //Dispose scene - switchComponent.DisposeSceneFacadeAndRemoveFromCache(scenesCache, sceneDefinitionComponent.Parcels, sceneAssetLock); + //Dispose scene + switchComponent.DisposeSceneFacadeAndRemoveFromCache(scenesCache, sceneDefinitionComponent.Parcels, sceneAssetLock); - visualSceneState.IsDirty = false; + visualSceneState.IsDirty = false; - World.Add(entity, sceneLODInfo); - World.Remove>(entity); + World.Add(entity, sceneLODInfo); + World.Remove>(entity); + } } - } - } } diff --git a/Explorer/Assets/DCL/LOD/Tests/EditMode/InitializeSceneLODInfoShould.cs b/Explorer/Assets/DCL/LOD/Tests/EditMode/InitializeSceneLODInfoShould.cs index d1dbab6904..186ef167a8 100644 --- a/Explorer/Assets/DCL/LOD/Tests/EditMode/InitializeSceneLODInfoShould.cs +++ b/Explorer/Assets/DCL/LOD/Tests/EditMode/InitializeSceneLODInfoShould.cs @@ -35,7 +35,7 @@ public void SetUp() cachedInfo = new LODCacheInfo(lodGroupPool.Get(), 2); cachedInfo.SuccessfullLODs = 1; lodCache = Substitute.For(); - + lodCache.TryGet(fakeSceneIDCached, out Arg.Any()).Returns(call => { call[1] = cachedInfo; @@ -55,7 +55,8 @@ public void SetUp() } } }; - sceneDefinitionComponent = new SceneDefinitionComponent(sceneEntityDefinition, new IpfsPath()); + + sceneDefinitionComponent = SceneDefinitionComponentFactory.CreateFromDefinition(sceneEntityDefinition, new IpfsPath()); partitionComponent = new PartitionComponent(); system = new InitializeSceneLODInfoSystem(world, lodCache, LOD_LEVELS, lodGroupPool, new GameObject().transform, Substitute.For(), @@ -99,4 +100,4 @@ public void GotNewSceneMetadataFromCache() Assert.AreEqual(sceneLODInfoRetrieved.metadata.FailedLODs, (byte)0); } } -} \ No newline at end of file +} diff --git a/Explorer/Assets/DCL/LOD/Tests/EditMode/ResolveVisualSceneStateSystemShould.cs b/Explorer/Assets/DCL/LOD/Tests/EditMode/ResolveVisualSceneStateSystemShould.cs index d39c24135b..3bfcf5d304 100644 --- a/Explorer/Assets/DCL/LOD/Tests/EditMode/ResolveVisualSceneStateSystemShould.cs +++ b/Explorer/Assets/DCL/LOD/Tests/EditMode/ResolveVisualSceneStateSystemShould.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using Arch.Core; +using System.Collections.Generic; using DCL.Ipfs; using ECS; using ECS.Prioritization.Components; @@ -19,23 +20,26 @@ public class ResolveVisualSceneStateSystemShould : UnitySystemTestBase SAMPLE_PARCELS = new Vector2Int[] { - new (0, 0), new (0, 1), new (1, 0), new (1, 1) + new (0, 0), new (0, 1), new (1, 0), new (1, 1), }; [SetUp] public void Setup() { - var lodSettings = Substitute.For(); + ILODSettingsAsset lodSettings = Substitute.For(); + int[] bucketThresholds = { - 4, 8 + 4, 8, }; + lodSettings.LodPartitionBucketThresholds.Returns(bucketThresholds); lodSettings.SDK7LodThreshold.Returns(2); - var realmData = Substitute.For(); + IRealmData realmData = Substitute.For(); + system = new ResolveVisualSceneStateSystem(world, lodSettings, new VisualSceneStateResolver(new HashSet { - ROAD_BASE_PARCEL + ROAD_BASE_PARCEL, }), realmData); } @@ -48,19 +52,21 @@ public void AddDefaultSceneVisualState() { scene = new SceneMetadataScene { - DecodedParcels = SAMPLE_PARCELS, DecodedBase = REGULAR_PARCEL - } - } + DecodedParcels = SAMPLE_PARCELS, DecodedBase = REGULAR_PARCEL, + }, + }, }; - var sceneDefinitionComponent = new SceneDefinitionComponent(sceneEntityDefinition, new IpfsPath()); - var entity = world.Create( new PartitionComponent + + SceneDefinitionComponent sceneDefinitionComponent = SceneDefinitionComponentFactory.CreateFromDefinition(sceneEntityDefinition, new IpfsPath()); + + Entity entity = world.Create(new PartitionComponent { - IsDirty = true + IsDirty = true, }, sceneDefinitionComponent); system.Update(0); - var visualSceneState = world.Get(entity); + VisualSceneState visualSceneState = world.Get(entity); Assert.IsFalse(visualSceneState.IsDirty); Assert.IsTrue(visualSceneState.CurrentVisualSceneState == VisualSceneStateEnum.SHOWING_LOD); @@ -75,19 +81,21 @@ public void AddRoad() { scene = new SceneMetadataScene { - DecodedParcels = SAMPLE_PARCELS, DecodedBase = ROAD_BASE_PARCEL - } - } + DecodedParcels = SAMPLE_PARCELS, DecodedBase = ROAD_BASE_PARCEL, + }, + }, }; - var sceneDefinitionComponent = new SceneDefinitionComponent(sceneEntityDefinition, new IpfsPath()); - var entity = world.Create( new PartitionComponent + + SceneDefinitionComponent sceneDefinitionComponent = SceneDefinitionComponentFactory.CreateFromDefinition(sceneEntityDefinition, new IpfsPath()); + + Entity entity = world.Create(new PartitionComponent { - IsDirty = true + IsDirty = true, }, sceneDefinitionComponent); system.Update(0); - var visualSceneState = world.Get(entity); + VisualSceneState visualSceneState = world.Get(entity); Assert.IsFalse(visualSceneState.IsDirty); Assert.IsTrue(visualSceneState.CurrentVisualSceneState == VisualSceneStateEnum.ROAD); @@ -109,18 +117,18 @@ public void AddDefaultSDK7SceneVisualState(byte bucket, VisualSceneStateEnum exp { scene = new SceneMetadataScene { - DecodedParcels = SAMPLE_PARCELS + DecodedParcels = SAMPLE_PARCELS, }, - runtimeVersion = "7" - } + runtimeVersion = "7", + }, }; - var sceneDefinitionComponent = new SceneDefinitionComponent(sceneEntityDefinition, new IpfsPath()); - var entity = world.Create( partitionComponent, sceneDefinitionComponent); + SceneDefinitionComponent sceneDefinitionComponent = SceneDefinitionComponentFactory.CreateFromDefinition(sceneEntityDefinition, new IpfsPath()); + Entity entity = world.Create(partitionComponent, sceneDefinitionComponent); system.Update(0); - var visualSceneState = world.Get(entity); + VisualSceneState visualSceneState = world.Get(entity); Assert.IsFalse(visualSceneState.IsDirty); Assert.IsTrue(visualSceneState.CurrentVisualSceneState == expectedVisualSceneState); diff --git a/Explorer/Assets/DCL/LOD/Tests/EditMode/UnloadSceneLODInfoSystemShould.cs b/Explorer/Assets/DCL/LOD/Tests/EditMode/UnloadSceneLODInfoSystemShould.cs index dbe0befd38..dd3befdc79 100644 --- a/Explorer/Assets/DCL/LOD/Tests/EditMode/UnloadSceneLODInfoSystemShould.cs +++ b/Explorer/Assets/DCL/LOD/Tests/EditMode/UnloadSceneLODInfoSystemShould.cs @@ -31,7 +31,7 @@ public class UnloadSceneLODInfoSystemShould : UnitySystemTestBase { + private const string fakeHash = "FAKE_HASH"; private SceneLODInfo sceneLODInfo; private PartitionComponent partitionComponent; private SceneDefinitionComponent sceneDefinitionComponent; - private const string fakeHash = "FAKE_HASH"; - [SetUp] public void Setup() { - var lodSettings = Substitute.For(); + ILODSettingsAsset? lodSettings = Substitute.For(); + int[] bucketThresholds = { - 2 + 2, }; + lodSettings.LodPartitionBucketThresholds.Returns(bucketThresholds); - var scenesCache = Substitute.For(); - var sceneReadinessReportQueue = Substitute.For(); + IScenesCache? scenesCache = Substitute.For(); + ISceneReadinessReportQueue? sceneReadinessReportQueue = Substitute.For(); partitionComponent = new PartitionComponent(); @@ -47,21 +49,21 @@ public void Setup() { DecodedBase = new Vector2Int(0, 0), DecodedParcels = new Vector2Int[] { - new (0, 0), new (0, 1), new (1, 0), new (2, 0), new (2, 1), new (3, 0), new (3, 1) - } - } - } + new (0, 0), new (0, 1), new (1, 0), new (2, 0), new (2, 1), new (3, 0), new (3, 1), + }, + }, + }, }; - sceneDefinitionComponent = new SceneDefinitionComponent(sceneEntityDefinition, new IpfsPath()); + sceneDefinitionComponent = SceneDefinitionComponentFactory.CreateFromDefinition(sceneEntityDefinition, new IpfsPath()); sceneLODInfo = SceneLODInfo.Create(); sceneLODInfo.metadata = new LODCacheInfo(new GameObject().AddComponent(), 2); system = new UpdateSceneLODInfoSystem(world, lodSettings, scenesCache, sceneReadinessReportQueue, new DecentralandUrlsSource(DecentralandEnvironment.Org)); } - [Test] + //Note: Test modified due to LOD level always defaulting to 3 while we rebuild all of them [TestCase(0, 0)] [TestCase(1, 0)] @@ -74,7 +76,7 @@ public void ResolveLODLevel(byte bucket, int expectedLODLevel) //Arrange partitionComponent.IsDirty = true; partitionComponent.Bucket = bucket; - var entity = world.Create(sceneLODInfo, partitionComponent, sceneDefinitionComponent); + Entity entity = world.Create(sceneLODInfo, partitionComponent, sceneDefinitionComponent); //Act system.Update(0); diff --git a/Explorer/Assets/DCL/LOD/Tests/EditMode/UpdateVisualSceneStateSystemShould.cs b/Explorer/Assets/DCL/LOD/Tests/EditMode/UpdateVisualSceneStateSystemShould.cs index ad6cd3c121..9a86af8d06 100644 --- a/Explorer/Assets/DCL/LOD/Tests/EditMode/UpdateVisualSceneStateSystemShould.cs +++ b/Explorer/Assets/DCL/LOD/Tests/EditMode/UpdateVisualSceneStateSystemShould.cs @@ -1,3 +1,4 @@ +using Arch.Core; using System.Collections.Generic; using DCL.Ipfs; using DCL.LOD; @@ -24,11 +25,13 @@ public class UpdateVisualSceneStateSystemShould : UnitySystemTestBase(); + ILODSettingsAsset lodSettings = Substitute.For(); + int[] bucketThresholds = { - 4, 8 + 4, 8, }; + lodSettings.SDK7LodThreshold.Returns(2); lodSettings.LodPartitionBucketThresholds.Returns(bucketThresholds); @@ -47,14 +50,14 @@ public void Setup() { DecodedParcels = new Vector2Int[] { - new (0, 0), new (0, 1), new (1, 0), new (2, 0), new (2, 1), new (3, 0), new (3, 1) - } + new (0, 0), new (0, 1), new (1, 0), new (2, 0), new (2, 1), new (3, 0), new (3, 1), + }, }, - runtimeVersion = "7" - } + runtimeVersion = "7", + }, }; - sceneDefinitionComponent = new SceneDefinitionComponent(sceneEntityDefinition, new IpfsPath()); + sceneDefinitionComponent = SceneDefinitionComponentFactory.CreateFromDefinition(sceneEntityDefinition, new IpfsPath()); visualSceneState = new VisualSceneState(); system = new UpdateVisualSceneStateSystem(world, realmData, scenesCahce, lodAssetsPool, lodSettings, @@ -66,7 +69,7 @@ public void UpdateFromSceneLODInfoToScenePromise() { visualSceneState.CurrentVisualSceneState = VisualSceneStateEnum.SHOWING_LOD; partitionComponent.Bucket = 0; - var entityReference = world.Create(visualSceneState, partitionComponent, sceneDefinitionComponent, new SceneLODInfo()); + Entity entityReference = world.Create(visualSceneState, partitionComponent, sceneDefinitionComponent, new SceneLODInfo()); system.Update(0); @@ -79,7 +82,7 @@ public void UpdateFromSceneFacadeToSceneLOD() { visualSceneState.CurrentVisualSceneState = VisualSceneStateEnum.SHOWING_SCENE; partitionComponent.Bucket = 5; - var entityReference = world.Create(visualSceneState, partitionComponent, sceneDefinitionComponent, Substitute.For()); + Entity entityReference = world.Create(visualSceneState, partitionComponent, sceneDefinitionComponent, Substitute.For()); system.Update(0); @@ -92,7 +95,7 @@ public void UpdateFromScenePromiseToSceneLOD() { visualSceneState.CurrentVisualSceneState = VisualSceneStateEnum.SHOWING_SCENE; partitionComponent.Bucket = 5; - var entityReference = world.Create(visualSceneState, partitionComponent, sceneDefinitionComponent, new AssetPromise()); + Entity entityReference = world.Create(visualSceneState, partitionComponent, sceneDefinitionComponent, new AssetPromise()); system.Update(0); @@ -114,20 +117,18 @@ public void KeepSceneLODWhenSDK6() { DecodedParcels = new Vector2Int[] { - new (0, 0), new (0, 1), new (1, 0), new (2, 0), new (2, 1), new (3, 0), new (3, 1) - } + new (0, 0), new (0, 1), new (1, 0), new (2, 0), new (2, 1), new (3, 0), new (3, 1), + }, }, - runtimeVersion = "6" - } + runtimeVersion = "6", + }, }; - var entityReference = world.Create(visualSceneState, partitionComponent, sdk6SceneDefinitionComponent, new SceneLODInfo()); + + Entity entityReference = world.Create(visualSceneState, partitionComponent, sdk6SceneDefinitionComponent, new SceneLODInfo()); system.Update(0); Assert.IsTrue(world.Has(entityReference)); Assert.IsFalse(world.Has(entityReference)); } - - - } diff --git a/Explorer/Assets/DCL/LOD/Tests/PlayMode/InstantiateSceneLODInfoSystemShould.cs b/Explorer/Assets/DCL/LOD/Tests/PlayMode/InstantiateSceneLODInfoSystemShould.cs index b5ff010409..5b11ddc908 100644 --- a/Explorer/Assets/DCL/LOD/Tests/PlayMode/InstantiateSceneLODInfoSystemShould.cs +++ b/Explorer/Assets/DCL/LOD/Tests/PlayMode/InstantiateSceneLODInfoSystemShould.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -using Arch.Core; using DCL.AvatarRendering.AvatarShape.Rendering.TextureArray; +using DCL.Diagnostics; using DCL.Ipfs; using DCL.LOD.Components; using DCL.LOD.Systems; @@ -17,9 +17,9 @@ using ECS.TestSuite; using NSubstitute; using NUnit.Framework; -using SceneRunner.Scene; using System.Linq; using UnityEngine; +using UnityEngine.TestTools; using Promise = ECS.StreamableLoading.Common.AssetPromise; @@ -27,15 +27,15 @@ namespace DCL.LOD.Tests { public class InstantiateSceneLODInfoSystemShould : UnitySystemTestBase { - private const string fakeHash = "FAKE_HASH"; + private const string FAKE_HASH = "FAKE_HASH"; - private static readonly Vector2Int[] DecodedParcels = + private static readonly Vector2Int[] DECODED_PARCELS = { - new (0, 0) + new (0, 0), }; private SceneLODInfo sceneLODInfo; - private GameObjectPool lodGroupPool; + private GameObjectPool? lodGroupPool; private SceneDefinitionComponent sceneDefinitionComponent; private IScenesCache scenesCache; @@ -43,17 +43,18 @@ public class InstantiateSceneLODInfoSystemShould : UnitySystemTestBase(); + int[] bucketThresholds = { - 2 + 2, }; - lodSettings.LodPartitionBucketThresholds.Returns(bucketThresholds); + lodSettings.LodPartitionBucketThresholds.Returns(bucketThresholds); var frameCapBudget = Substitute.For(); frameCapBudget.TrySpendBudget().Returns(true); - var memoryBudget = Substitute.For(); + IPerformanceBudget? memoryBudget = Substitute.For(); memoryBudget.TrySpendBudget().Returns(true); scenesCache = Substitute.For(); @@ -61,23 +62,24 @@ public void Setup() var sceneEntityDefinition = new SceneEntityDefinition { - id = fakeHash, metadata = new SceneMetadata + id = FAKE_HASH, metadata = new SceneMetadata { scene = new SceneMetadataScene { - DecodedBase = new Vector2Int(0, 0), DecodedParcels = DecodedParcels + DecodedBase = new Vector2Int(0, 0), DecodedParcels = DECODED_PARCELS } } }; - sceneDefinitionComponent = new SceneDefinitionComponent(sceneEntityDefinition, new IpfsPath()); + sceneDefinitionComponent = SceneDefinitionComponentFactory.CreateFromDefinition(sceneEntityDefinition, new IpfsPath()); sceneLODInfo = SceneLODInfo.Create(); - sceneLODInfo.metadata = new LODCacheInfo(new GameObject().AddComponent(), 2 ); + sceneLODInfo.metadata = new LODCacheInfo(new GameObject().AddComponent(), 2); var textureArrayContainerFactory = new TextureArrayContainerFactory(new Dictionary()); - system = new InstantiateSceneLODInfoSystem(world, frameCapBudget, memoryBudget, scenesCache, sceneReadinessReportQueue, - textureArrayContainerFactory.CreateSceneLOD(TextureArrayConstants.SCENE_TEX_ARRAY_SHADER, new [] + + system = new InstantiateSceneLODInfoSystem(world, frameCapBudget, memoryBudget, scenesCache, sceneReadinessReportQueue, + textureArrayContainerFactory.CreateSceneLOD(TextureArrayConstants.SCENE_TEX_ARRAY_SHADER, new[] { new TextureArrayResolutionDescriptor(256, 500, 1) }, TextureFormat.BC7, 20, 1), Substitute.For()); @@ -86,6 +88,8 @@ public void Setup() [Test] public void ResolveSuccessfullPromiseAndInstantiate() { + LogAssert.ignoreFailingMessages = true; + //Arrange var promiseGenerated = GenerateSuccessfullPromise(); sceneLODInfo.CurrentLODPromise = promiseGenerated.Item2; @@ -102,12 +106,14 @@ public void ResolveSuccessfullPromiseAndInstantiate() Assert.AreEqual(sceneLODInfoRetrieved.metadata.LODLoadedCount(), 1); Assert.AreEqual(SceneLODInfoUtils.HasLODResult(sceneLODInfoRetrieved.metadata.SuccessfullLODs, 0), true); Assert.AreEqual(SceneLODInfoUtils.HasLODResult(sceneLODInfoRetrieved.metadata.FailedLODs, 0), false); - scenesCache.Received().AddNonRealScene(Arg.Is(arr => arr.SequenceEqual(DecodedParcels))); + scenesCache.Received().AddNonRealScene(Arg.Is(arr => arr.SequenceEqual(DECODED_PARCELS))); } [Test] public void ResolveFailedPromise() { + LogAssert.ignoreFailingMessages = true; + //Arrange sceneLODInfo.CurrentLODPromise = GenerateFailedPromise(); sceneLODInfo.CurrentLODLevelPromise = 0; @@ -121,38 +127,35 @@ public void ResolveFailedPromise() Assert.AreEqual(sceneLODInfoRetrieved.metadata.LODLoadedCount(), 1); Assert.AreEqual(SceneLODInfoUtils.HasLODResult(sceneLODInfoRetrieved.metadata.FailedLODs, 0), true); Assert.AreEqual(SceneLODInfoUtils.HasLODResult(sceneLODInfoRetrieved.metadata.SuccessfullLODs, 0), false); - scenesCache.Received().AddNonRealScene(Arg.Is(arr => arr.SequenceEqual(DecodedParcels))); + scenesCache.Received().AddNonRealScene(Arg.Is(arr => arr.SequenceEqual(DECODED_PARCELS))); } - private Promise GenerateFailedPromise() { var promise = Promise.Create(world, GetAssetBundleIntention.FromHash(typeof(GameObject), "Cube"), new PartitionComponent()); - world.Add(promise.Entity, - new StreamableLoadingResult(new Exception())); + new StreamableLoadingResult(ReportData.UNSPECIFIED, new Exception())); + return promise; } private (AssetBundleData, Promise) GenerateSuccessfullPromise() { var promise = Promise.Create(world, - GetAssetBundleIntention.FromHash(typeof(GameObject),"Cube"), + GetAssetBundleIntention.FromHash(typeof(GameObject), "Cube"), new PartitionComponent()); var fakeAssetBundleData = new AssetBundleData(null, null, GameObject.CreatePrimitive(PrimitiveType.Cube), new AssetBundleData[] - { - }); + { }); world.Add(promise.Entity, new StreamableLoadingResult(fakeAssetBundleData)); + return (fakeAssetBundleData, promise); } - } - } diff --git a/Explorer/Assets/DCL/Landscape/Config/Editor/DCL.Landscape.Editor.asmdef b/Explorer/Assets/DCL/Landscape/Config/Editor/DCL.Landscape.Editor.asmdef index c0752dcfe4..ae1b7bbdbb 100644 --- a/Explorer/Assets/DCL/Landscape/Config/Editor/DCL.Landscape.Editor.asmdef +++ b/Explorer/Assets/DCL/Landscape/Config/Editor/DCL.Landscape.Editor.asmdef @@ -7,7 +7,7 @@ "GUID:275e22790c04e9b47a5085d7b0c4432a", "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:e0cd26848372d4e5c891c569017e11f1", - "GUID:101b8b6ebaf64668909b49c4b7a1420d" + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [ "Editor" diff --git a/Explorer/Assets/DCL/Landscape/DCL.Landscape.asmdef b/Explorer/Assets/DCL/Landscape/DCL.Landscape.asmdef index b56d8f4400..310625c66e 100644 --- a/Explorer/Assets/DCL/Landscape/DCL.Landscape.asmdef +++ b/Explorer/Assets/DCL/Landscape/DCL.Landscape.asmdef @@ -6,7 +6,6 @@ "GUID:2665a8d13d1b3f18800f46e256720795", "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", "GUID:275e22790c04e9b47a5085d7b0c4432a", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:4725c02394ab4ce19f889e4e8001f989", "GUID:4794e238ed0f65142a4aea5848b513e5", diff --git a/Explorer/Assets/DCL/MapPins/Components/MapPinComponent.cs b/Explorer/Assets/DCL/MapPins/Components/MapPinComponent.cs index 8c512e6d73..c1b7b15029 100644 --- a/Explorer/Assets/DCL/MapPins/Components/MapPinComponent.cs +++ b/Explorer/Assets/DCL/MapPins/Components/MapPinComponent.cs @@ -1,5 +1,4 @@ -using Arch.Core; -using DCL.ECSComponents; +using JetBrains.Annotations; using UnityEngine; using Promise = ECS.StreamableLoading.Common.AssetPromise; @@ -8,7 +7,7 @@ namespace DCL.MapPins.Components public struct MapPinComponent { public Promise? TexturePromise; - public Texture2D Thumbnail; + [CanBeNull] public Texture2D Thumbnail; public bool ThumbnailIsDirty { get; set; } public bool IsDirty { get; set; } diff --git a/Explorer/Assets/DCL/MapPins/MapPins.asmdef b/Explorer/Assets/DCL/MapPins/MapPins.asmdef index 3230b7b314..0b8290a9fe 100644 --- a/Explorer/Assets/DCL/MapPins/MapPins.asmdef +++ b/Explorer/Assets/DCL/MapPins/MapPins.asmdef @@ -10,7 +10,8 @@ "GUID:286980af24684da6acc1caa413039811", "GUID:8322ea9340a544c59ddc56d4793eac74", "GUID:9e314663ce958b746873cb22d57ede55", - "GUID:166b65e6dfc848bb9fb075f53c293a38" + "GUID:166b65e6dfc848bb9fb075f53c293a38", + "GUID:ace653ac543d483ba8abee112a3ba2a6" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/MapPins/Systems/MapPinLoaderSystem.cs b/Explorer/Assets/DCL/MapPins/Systems/MapPinLoaderSystem.cs index d74c2e2c3f..f816f96745 100644 --- a/Explorer/Assets/DCL/MapPins/Systems/MapPinLoaderSystem.cs +++ b/Explorer/Assets/DCL/MapPins/Systems/MapPinLoaderSystem.cs @@ -2,6 +2,7 @@ using Arch.System; using Arch.SystemGroups; using DCL.ECSComponents; +using DCL.FeatureFlags; using DCL.MapPins.Components; using DCL.SDKComponents.Utils; using ECS.Abstract; @@ -16,35 +17,37 @@ using UnityEngine; using Entity = Arch.Core.Entity; using Promise = ECS.StreamableLoading.Common.AssetPromise; -using Vector2 = Decentraland.Common.Vector2; namespace DCL.SDKComponents.MapPins.Systems { [UpdateInGroup(typeof(ComponentInstantiationGroup))] public partial class MapPinLoaderSystem : BaseUnityLoopSystem { + private const int ATTEMPTS_COUNT = 6; + private readonly World globalWorld; private readonly IPartitionComponent partitionComponent; - private const int ATTEMPTS_COUNT = 6; private readonly ISceneData sceneData; + private readonly bool useCustomMapPinIcons; + private int xRounded; private int yRounded; - public MapPinLoaderSystem(World world, ISceneData sceneData, World globalWorld, IPartitionComponent partitionComponent) : base(world) + public MapPinLoaderSystem(World world, ISceneData sceneData, World globalWorld, IPartitionComponent partitionComponent, FeatureFlagsCache featureFlagsCache) : base(world) { this.sceneData = sceneData; this.globalWorld = globalWorld; this.partitionComponent = partitionComponent; + useCustomMapPinIcons = featureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.CUSTOM_MAP_PINS_ICONS); } - protected override void Update(float t) { LoadMapPinQuery(World); UpdateMapPinQuery(World); HandleComponentRemovalQuery(World); HandleEntityDestructionQuery(World); - ResolvePromiseQuery(World); + if (useCustomMapPinIcons) { ResolvePromiseQuery(World); } } [Query] @@ -57,8 +60,14 @@ private void LoadMapPin(in Entity entity, ref PBMapPin pbMapPin) Position = new Vector2Int((int) pbMapPin.Position.X, (int) pbMapPin.Position.Y) }; pbMapPin.IsDirty = false; - TextureComponent? mapPinTexture = pbMapPin.Texture.CreateTextureComponent(sceneData); - bool hasTexturePromise = TryCreateGetTexturePromise(in mapPinTexture, ref mapPinComponent.TexturePromise); + + bool hasTexturePromise = useCustomMapPinIcons; + + if (useCustomMapPinIcons) + { + TextureComponent? mapPinTexture = pbMapPin.Texture.CreateTextureComponent(sceneData); + hasTexturePromise = TryCreateGetTexturePromise(in mapPinTexture, ref mapPinComponent.TexturePromise); + } World.Add(entity, new MapPinHolderComponent(globalWorld.Create(pbMapPin, mapPinComponent), hasTexturePromise)); } @@ -103,9 +112,11 @@ private void UpdateMapPin(ref PBMapPin pbMapPin, ref MapPinHolderComponent mapPi mapPinComponent.IsDirty = true; - TextureComponent? mapPinTexture = pbMapPin.Texture.CreateTextureComponent(sceneData); - - mapPinHolderComponent.HasTexturePromise = TryCreateGetTexturePromise(in mapPinTexture, ref mapPinComponent.TexturePromise); + if (useCustomMapPinIcons) + { + TextureComponent? mapPinTexture = pbMapPin.Texture.CreateTextureComponent(sceneData); + mapPinHolderComponent.HasTexturePromise = TryCreateGetTexturePromise(in mapPinTexture, ref mapPinComponent.TexturePromise); + } pbMapPin.IsDirty = false; diff --git a/Explorer/Assets/DCL/MapRenderer/Addressables/PinMarkerObject.prefab b/Explorer/Assets/DCL/MapRenderer/Addressables/MapPinMarkerObject.prefab similarity index 99% rename from Explorer/Assets/DCL/MapRenderer/Addressables/PinMarkerObject.prefab rename to Explorer/Assets/DCL/MapRenderer/Addressables/MapPinMarkerObject.prefab index e237898fe3..7e72d0b527 100644 --- a/Explorer/Assets/DCL/MapRenderer/Addressables/PinMarkerObject.prefab +++ b/Explorer/Assets/DCL/MapRenderer/Addressables/MapPinMarkerObject.prefab @@ -374,7 +374,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 1 - m_Sprite: {fileID: 21300000, guid: 03c5aa8ec94084a5da46504d4f20698e, type: 3} + m_Sprite: {fileID: 21300000, guid: a98b57eed8453f04c8b749ee44056726, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 @@ -396,7 +396,7 @@ GameObject: - component: {fileID: 401758791842004506} - component: {fileID: 5514867554339137478} m_Layer: 27 - m_Name: PinMarkerObject + m_Name: MapPinMarkerObject m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Explorer/Assets/DCL/MapRenderer/Addressables/PinMarkerObject.prefab.meta b/Explorer/Assets/DCL/MapRenderer/Addressables/MapPinMarkerObject.prefab.meta similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/Addressables/PinMarkerObject.prefab.meta rename to Explorer/Assets/DCL/MapRenderer/Addressables/MapPinMarkerObject.prefab.meta diff --git a/Explorer/Assets/DCL/MapRenderer/Addressables/PinMarkerObject_Destination Variant.prefab b/Explorer/Assets/DCL/MapRenderer/Addressables/MapPinMarkerObject_Destination Variant.prefab similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/Addressables/PinMarkerObject_Destination Variant.prefab rename to Explorer/Assets/DCL/MapRenderer/Addressables/MapPinMarkerObject_Destination Variant.prefab diff --git a/Explorer/Assets/DCL/MapRenderer/Addressables/PinMarkerObject_Destination Variant.prefab.meta b/Explorer/Assets/DCL/MapRenderer/Addressables/MapPinMarkerObject_Destination Variant.prefab.meta similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/Addressables/PinMarkerObject_Destination Variant.prefab.meta rename to Explorer/Assets/DCL/MapRenderer/Addressables/MapPinMarkerObject_Destination Variant.prefab.meta diff --git a/Explorer/Assets/DCL/MapRenderer/ConsumerUtils/MapRenderImage.cs b/Explorer/Assets/DCL/MapRenderer/ConsumerUtils/MapRenderImage.cs index 7b8bb12967..136ab213a9 100644 --- a/Explorer/Assets/DCL/MapRenderer/ConsumerUtils/MapRenderImage.cs +++ b/Explorer/Assets/DCL/MapRenderer/ConsumerUtils/MapRenderImage.cs @@ -175,6 +175,11 @@ public void Deactivate() hudCamera = null; interactivityController = null; texture = null; + previousClickedMarker?.DeselectImmediately(IPinMarker.ScaleType.NAVMAP); + previousMarker?.DeselectImmediately(IPinMarker.ScaleType.NAVMAP); + + previousMarker = null; + previousClickedMarker = null; isActive = false; } @@ -191,12 +196,13 @@ private void ProcessHover(PointerEventData eventData) { if (highlightEnabled && previousParcel != parcel) { - if (previousMarker != null) + if (previousMarker != null && previousClickedMarker != previousMarker) { previousMarker.AnimateDeselectionAsync(cts.Token).Forget(); - previousMarker = null; } + previousMarker = null; + previousParcel = parcel; if (pinMarker == null) { interactivityController!.HighlightParcel(parcel); } diff --git a/Explorer/Assets/DCL/MapRenderer/MapLayers/Atlas/ParcelAtlas/ParcelChunkController.cs b/Explorer/Assets/DCL/MapRenderer/MapLayers/Atlas/ParcelAtlas/ParcelChunkController.cs index 2da40211a0..e7c68c65c0 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapLayers/Atlas/ParcelAtlas/ParcelChunkController.cs +++ b/Explorer/Assets/DCL/MapRenderer/MapLayers/Atlas/ParcelAtlas/ParcelChunkController.cs @@ -56,7 +56,7 @@ public async UniTask LoadImageAsync(int chunkSize, int parcelSize, Vector2Int ma await webRequestController.GetTextureAsync(new CommonArguments(URLAddress.FromString(url)), new GetTextureArguments(false), GetTextureWebRequest.CreateTexture(TextureWrapMode.Clamp) - .SuppressExceptionsWithFallback(Texture2D.whiteTexture, reportContext: ReportCategory.UI), ct); + .SuppressExceptionsWithFallback(Texture2D.whiteTexture, reportContext: ReportCategory.UI), ct, ReportCategory.UI); spriteRenderer.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), VectorUtilities.OneHalf, PIXELS_PER_UNIT, 0, SpriteMeshType.FullRect, Vector4.one, false); diff --git a/Explorer/Assets/DCL/MapRenderer/MapLayers/Atlas/SatelliteAtlas/SatelliteChunkController.cs b/Explorer/Assets/DCL/MapRenderer/MapLayers/Atlas/SatelliteAtlas/SatelliteChunkController.cs index 617c3f63e3..29f44d6aec 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapLayers/Atlas/SatelliteAtlas/SatelliteChunkController.cs +++ b/Explorer/Assets/DCL/MapRenderer/MapLayers/Atlas/SatelliteAtlas/SatelliteChunkController.cs @@ -67,7 +67,7 @@ public async UniTask LoadImageAsync(Vector2Int chunkId, float chunkWorldSize, Ca Texture2D texture = (await webRequestController.GetTextureAsync(new CommonArguments(URLAddress.FromString(url)), new GetTextureArguments(false), GetTextureWebRequest.CreateTexture(TextureWrapMode.Clamp, FilterMode.Trilinear) .SuppressExceptionsWithFallback(Texture2D.whiteTexture, reportContext: ReportCategory.UI), - linkedCts.Token))!; + linkedCts.Token, ReportCategory.UI))!; textureContainer.AddChunk(chunkId, texture); diff --git a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/IPinMarker.cs b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/IPinMarker.cs index e8392092bd..f65f85d89c 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/IPinMarker.cs +++ b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/IPinMarker.cs @@ -10,13 +10,13 @@ public interface IPinMarker : IMapRendererMarker, IMapPositionProvider, IDisposa { bool IsVisible { get; } bool IsDestination { get; } - + bool IsSelected { get; } public string Title { get; } public string Description { get; } public Vector2Int ParcelPosition { get; } - public Sprite CurrentSprite { get; } + public Sprite? CurrentSprite { get; } void SetPosition(Vector2 position, Vector2Int parcelPosition); @@ -26,11 +26,13 @@ public interface IPinMarker : IMapRendererMarker, IMapPositionProvider, IDisposa UniTaskVoid AnimateDeselectionAsync(CancellationToken ct); + public void DeselectImmediately(IPinMarker.ScaleType scaleType); + void SetAsDestination(bool isDestination); void SetIconOutline(bool isActive); - void SetTexture(Texture2D texture); + void SetTexture(Texture2D? texture); void OnBecameVisible(); @@ -38,10 +40,16 @@ public interface IPinMarker : IMapRendererMarker, IMapPositionProvider, IDisposa void SetZoom(float baseScale, float baseZoom, float zoom); - void ResetScale(); + void ResetScale(ScaleType scaleType); void Show(Action? onFinish); void Hide(Action? onFinish); + + public enum ScaleType + { + MINIMAP, + NAVMAP, + } } } diff --git a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/MinimapPinMarkerObject.cs b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/MinimapPinMarkerObject.cs index 812c5673eb..4e72354c8f 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/MinimapPinMarkerObject.cs +++ b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/MinimapPinMarkerObject.cs @@ -18,12 +18,13 @@ public void SetupAsScenePin() scenePinBackground.SetActive(true); } - public void SetupAsMapPin(Sprite sprite) + public void SetupAsMapPin(Sprite? sprite) { isMapPin = true; mapPinBackground.SetActive(true); scenePinBackground.SetActive(false); - mapPinIcon.sprite = sprite; + if (sprite != null) + mapPinIcon.sprite = sprite; } public void HidePin() diff --git a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarker.cs b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarker.cs index ab4348786e..66fa2a3ab9 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarker.cs +++ b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarker.cs @@ -12,7 +12,7 @@ namespace DCL.MapRenderer.MapLayers.Pins { internal class PinMarker : IPinMarker { - private const float MAP_MIN_PIN_SCALE = 22; + private const float NAVMAP_PIN_DEFAULT_SCALE = 22; private const float MINIMAP_MIN_SIZE_FOR_PIN = 35; private readonly IMapCullingController cullingController; @@ -23,17 +23,19 @@ internal class PinMarker : IPinMarker private CancellationTokenSource selectionCancellationTokenSource; public Vector3 CurrentPosition => poolableBehavior.currentPosition; - public Sprite CurrentSprite => poolableBehavior.instance?.mapPinIcon.sprite; + public Sprite? CurrentSprite => poolableBehavior.instance?.mapPinIcon.sprite; public bool IsVisible => poolableBehavior.isVisible; public bool IsDestination { get; private set; } + public bool IsSelected { get; private set; } public string Title { get; private set; } - public Texture2D Icon { get; private set; } + public string Description { get; private set; } public Vector2Int ParcelPosition { get; private set; } public Vector2 Pivot => new (0.5f, 0.5f); private float currentBaseScale { get; set; } + private Texture2D? icon { get; set; } public PinMarker(IObjectPool objectsPool, IMapCullingController cullingController) { @@ -61,6 +63,7 @@ public async UniTaskVoid AnimateSelectionAsync(CancellationToken ct) { SetIconOutline(true); pulseCancellationTokenSource = pulseCancellationTokenSource.SafeRestartLinked(ct); + IsSelected = true; if (poolableBehavior.instance != null) { @@ -69,16 +72,29 @@ public async UniTaskVoid AnimateSelectionAsync(CancellationToken ct) } } + public void DeselectImmediately(IPinMarker.ScaleType scaleType) + { + SetIconOutline(false); + pulseCancellationTokenSource.SafeCancelAndDispose(); + selectionCancellationTokenSource.SafeCancelAndDispose(); + if (poolableBehavior.instance != null) + poolableBehavior.instance.selectionScalingParent.localScale = Vector3.one; + ResetScale(scaleType); + IsSelected = false; + } + public async UniTaskVoid AnimateDeselectionAsync(CancellationToken ct) { SetIconOutline(false); pulseCancellationTokenSource = pulseCancellationTokenSource.SafeRestartLinked(ct); + IsSelected = false; if (poolableBehavior.instance != null) { selectionCancellationTokenSource = selectionCancellationTokenSource.SafeRestartLinked(ct); await PinMarkerHelper.ScaleToAsync(poolableBehavior.instance.selectionScalingParent, Vector3.one, 0.5f, Ease.OutBack, selectionCancellationTokenSource.Token); - ResetPulseAnimation(); + //We dont reset the ct in this case because it was already restarted and linked to the ct of AnimateDeselectionAsync + ResetPulseAnimation(false); } } @@ -104,16 +120,16 @@ public void SetData(string title, string description) IsDestination = false; } - public void SetTexture(Texture2D texture) + public void SetTexture(Texture2D? texture) { - Icon = texture; + icon = texture; poolableBehavior.instance?.SetTexture(texture); } public void OnBecameVisible() { poolableBehavior.OnBecameVisible(); - if (Icon != null) { poolableBehavior.instance?.SetTexture(Icon); } + poolableBehavior.instance?.SetTexture(icon); poolableBehavior.instance?.SetAsDestination(IsDestination); poolableBehavior.instance?.SetScale(currentNewScale); ResetPulseAnimation(); @@ -128,21 +144,21 @@ public void OnBecameInvisible() public void SetZoom(float baseScale, float baseZoom, float zoom) { - currentBaseScale = Math.Max(baseScale, MAP_MIN_PIN_SCALE); + currentBaseScale = Math.Max(baseScale, NAVMAP_PIN_DEFAULT_SCALE); currentNewScale = Math.Max(zoom / baseZoom * currentBaseScale, currentBaseScale); poolableBehavior.instance?.SetScale(currentNewScale); } - public void ResetScale() + public void ResetScale(IPinMarker.ScaleType type) { - currentNewScale = MINIMAP_MIN_SIZE_FOR_PIN; + currentNewScale = type == IPinMarker.ScaleType.MINIMAP ? MINIMAP_MIN_SIZE_FOR_PIN : NAVMAP_PIN_DEFAULT_SCALE; poolableBehavior.instance?.SetScale(currentNewScale); } - private void ResetPulseAnimation() + private void ResetPulseAnimation(bool resetCt = true) { - pulseCancellationTokenSource = pulseCancellationTokenSource.SafeRestart(); - if (!IsDestination && poolableBehavior.instance != null) PinMarkerHelper.PulseScaleAsync(poolableBehavior.instance.pulseScalingParent, ct: pulseCancellationTokenSource.Token).Forget(); + if (resetCt) pulseCancellationTokenSource = pulseCancellationTokenSource.SafeRestart(); + if (!IsDestination && !IsSelected && poolableBehavior.instance != null) PinMarkerHelper.PulseScaleAsync(poolableBehavior.instance.pulseScalingParent, ct: pulseCancellationTokenSource.Token).Forget(); } public void Show(Action? onFinish = null) diff --git a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerController.cs b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerController.cs index c56fc34a25..12814a0a18 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerController.cs +++ b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerController.cs @@ -63,7 +63,7 @@ private void OnRemovedDestination() { pair.Value.SetAsDestination(false); break; - } + } } } @@ -147,7 +147,7 @@ public void ApplyCameraZoom(float baseZoom, float zoom) public void ResetToBaseScale() { foreach (IPinMarker marker in markers.Values) - marker.ResetScale(); + marker.ResetScale(IPinMarker.ScaleType.MINIMAP); } public UniTask Disable(CancellationToken cancellationToken) diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/PinMarkerHelper.cs b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerHelper.cs similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/MapPath/PinMarkerHelper.cs rename to Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerHelper.cs diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/PinMarkerHelper.cs.meta b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerHelper.cs.meta similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/MapPath/PinMarkerHelper.cs.meta rename to Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerHelper.cs.meta diff --git a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerObject.cs b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerObject.cs index 4f59c88345..1c4af26869 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerObject.cs +++ b/Explorer/Assets/DCL/MapRenderer/MapLayers/Pins/PinMarkerObject.cs @@ -23,9 +23,10 @@ public void SetScale(float newScale) transform.localScale = new Vector3(newScale, newScale, 1f); } - public void SetTexture(Texture2D texture) + public void SetTexture(Texture2D? texture) { - mapPinIcon.sprite = Sprite.Create(texture, new Rect(0, 0, SPRITE_SIZE, SPRITE_SIZE), VectorUtilities.OneHalf, 50, 0, SpriteMeshType.FullRect, Vector4.one, false); + if (texture != null) + mapPinIcon.sprite = Sprite.Create(texture, new Rect(0, 0, SPRITE_SIZE, SPRITE_SIZE), VectorUtilities.OneHalf, 50, 0, SpriteMeshType.FullRect, Vector4.one, false); } public void SetAsDestination(bool isDestination) diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPin.png b/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPin.png deleted file mode 100644 index bc5b9a4e4c..0000000000 --- a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPin.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0846ff6064bb8ec6814132534346171644f28a342b3bcf2a9db30dfe2a4d6775 -size 3289 diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_Parcel.png b/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_Parcel.png deleted file mode 100644 index 323f40b7b6..0000000000 --- a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_Parcel.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b2188dd0e35057de01695db8853018fdf311e32d475c886e283bb6a179942637 -size 1814 diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/MapPathController.cs b/Explorer/Assets/DCL/MapRenderer/MapPath/MapPathController.cs index 3b58e2bf76..c104484d2b 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapPath/MapPathController.cs +++ b/Explorer/Assets/DCL/MapRenderer/MapPath/MapPathController.cs @@ -182,7 +182,7 @@ public void ApplyCameraZoom(float baseZoom, float newZoom) public void ResetToBaseScale() { - internalPinMarker.ResetScale(); + internalPinMarker.ResetScale(IPinMarker.ScaleType.MINIMAP); mapPathRenderer.ResetScale(); } } diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/MapPathEventBus.cs b/Explorer/Assets/DCL/MapRenderer/MapPath/MapPathEventBus.cs index 1ce79c1b4b..ed4e40999f 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapPath/MapPathEventBus.cs +++ b/Explorer/Assets/DCL/MapRenderer/MapPath/MapPathEventBus.cs @@ -8,14 +8,14 @@ namespace DCL.MapRenderer public class MapPathEventBus : IMapPathEventBus { public event Action OnShowPinInMinimapEdge; - public event Action OnSetDestination; + public event Action OnSetDestination; public event Action OnRemovedDestination; public event Action OnHidePinInMinimapEdge; public event Action OnUpdatedPlayerPosition; public event Action OnArrivedToDestination; public event Action OnUpdatePinPositionInMinimapEdge; - public void SetDestination(Vector2Int parcel, IPinMarker pinMarker) + public void SetDestination(Vector2Int parcel, IPinMarker? pinMarker) { OnSetDestination?.Invoke(parcel, pinMarker); } @@ -57,13 +57,13 @@ public interface IMapPathEventBus { public event Action OnShowPinInMinimapEdge; public event Action OnUpdatePinPositionInMinimapEdge; - public event Action OnSetDestination; + public event Action OnSetDestination; public event Action OnRemovedDestination; public event Action OnHidePinInMinimapEdge; public event Action OnArrivedToDestination; public event Action OnUpdatedPlayerPosition; - void SetDestination(Vector2Int parcel, IPinMarker pinMarker); + void SetDestination(Vector2Int parcel, IPinMarker? pinMarker); void RemoveDestination(); diff --git a/Explorer/Assets/DCL/MapRenderer/MapRenderer.asmdef b/Explorer/Assets/DCL/MapRenderer/MapRenderer.asmdef index ff135c55bc..a23666031f 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapRenderer.asmdef +++ b/Explorer/Assets/DCL/MapRenderer/MapRenderer.asmdef @@ -15,12 +15,11 @@ "GUID:c80c82a8f4e04453b85fbab973d6774a", "GUID:4794e238ed0f65142a4aea5848b513e5", "GUID:275e22790c04e9b47a5085d7b0c4432a", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:006c0e0a70294dbba8a4cbcfb77e1f7d", "GUID:d0ec51c740809fd4680d3ea27279dca7", "GUID:45fc0f02fe4e57c4a93a421d8f6f53df", "GUID:2f30d6e5229a74284acedda491abcc6e", - "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:e25ef972de004615a22937e739de2def", "GUID:166b65e6dfc848bb9fb075f53c293a38", "GUID:c36c6fe72b914ca78a4cfb237398b362", diff --git a/Explorer/Assets/DCL/Minimap/Assets/MinimapPinMarkerObject.prefab b/Explorer/Assets/DCL/Minimap/Assets/MinimapMapPinMarkerObject.prefab similarity index 98% rename from Explorer/Assets/DCL/Minimap/Assets/MinimapPinMarkerObject.prefab rename to Explorer/Assets/DCL/Minimap/Assets/MinimapMapPinMarkerObject.prefab index 4022e16a6a..5c121d2c1c 100644 --- a/Explorer/Assets/DCL/Minimap/Assets/MinimapPinMarkerObject.prefab +++ b/Explorer/Assets/DCL/Minimap/Assets/MinimapMapPinMarkerObject.prefab @@ -216,8 +216,8 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 99428d9ed6da74af2966fb29d960e48f, type: 3} - m_Type: 1 + m_Sprite: {fileID: 21300000, guid: a98b57eed8453f04c8b749ee44056726, type: 3} + m_Type: 0 m_PreserveAspect: 1 m_FillCenter: 1 m_FillMethod: 4 @@ -238,7 +238,7 @@ GameObject: - component: {fileID: 5675361215850861351} - component: {fileID: 2448321106600387580} m_Layer: 5 - m_Name: MinimapPinMarkerObject + m_Name: MinimapMapPinMarkerObject m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Explorer/Assets/DCL/Minimap/Assets/MinimapPinMarkerObject.prefab.meta b/Explorer/Assets/DCL/Minimap/Assets/MinimapMapPinMarkerObject.prefab.meta similarity index 100% rename from Explorer/Assets/DCL/Minimap/Assets/MinimapPinMarkerObject.prefab.meta rename to Explorer/Assets/DCL/Minimap/Assets/MinimapMapPinMarkerObject.prefab.meta diff --git a/Explorer/Assets/DCL/Minimap/Minimap.asmdef b/Explorer/Assets/DCL/Minimap/Minimap.asmdef index 366db58fec..0cb2b1e0ca 100644 --- a/Explorer/Assets/DCL/Minimap/Minimap.asmdef +++ b/Explorer/Assets/DCL/Minimap/Minimap.asmdef @@ -16,7 +16,7 @@ "GUID:006c0e0a70294dbba8a4cbcfb77e1f7d", "GUID:275e22790c04e9b47a5085d7b0c4432a", "GUID:2f30d6e5229a74284acedda491abcc6e", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:e0eedfa2deb9406daf86fd8368728e39", "GUID:fb9aef3113f3505428c3576d8c32f8c4", "GUID:04c3e7e2f3374472f84666dc489d6cd2", diff --git a/Explorer/Assets/DCL/Minimap/MinimapController.cs b/Explorer/Assets/DCL/Minimap/MinimapController.cs index f2aabf6187..644ad42c1f 100644 --- a/Explorer/Assets/DCL/Minimap/MinimapController.cs +++ b/Explorer/Assets/DCL/Minimap/MinimapController.cs @@ -31,7 +31,7 @@ namespace DCL.Minimap { public partial class MinimapController : ControllerBase, IMapActivityOwner { - private const MapLayer RENDER_LAYERS = MapLayer.SatelliteAtlas | MapLayer.ParcelsAtlas | MapLayer.PlayerMarker | MapLayer.ScenesOfInterest | MapLayer.Favorites | MapLayer.HotUsersMarkers | MapLayer.Pins; + private const MapLayer RENDER_LAYERS = MapLayer.SatelliteAtlas | MapLayer.ParcelsAtlas | MapLayer.PlayerMarker | MapLayer.ScenesOfInterest | MapLayer.Favorites | MapLayer.HotUsersMarkers | MapLayer.Pins | MapLayer.Path; private const float ANIMATION_TIME = 0.2f; private readonly IMapRenderer mapRenderer; @@ -42,8 +42,8 @@ public partial class MinimapController : ControllerBase, IMapActivi private readonly IRealmNavigator realmNavigator; private readonly IScenesCache scenesCache; private readonly IMapPathEventBus mapPathEventBus; - private CancellationTokenSource cts; + private CancellationTokenSource cts; private MapRendererTrackPlayerPosition mapRendererTrackPlayerPosition; private IMapCameraController? mapCameraController; private Vector2Int previousParcelPosition; @@ -86,7 +86,7 @@ private void OnRealmChanged(bool isGenesis) protected override void OnViewInstantiated() { - viewInstance.expandMinimapButton.onClick.AddListener(ExpandMinimap); + viewInstance!.expandMinimapButton.onClick.AddListener(ExpandMinimap); viewInstance.collapseMinimapButton.onClick.AddListener(CollapseMinimap); viewInstance.minimapRendererButton.Button.onClick.AddListener(() => mvcManager.ShowAsync(ExplorePanelController.IssueCommand(new ExplorePanelParameter(ExploreSections.Navmap))).Forget()); viewInstance.sideMenuButton.onClick.AddListener(OpenSideMenu); @@ -105,7 +105,7 @@ protected override void OnViewInstantiated() private void ExpandMinimap() { - viewInstance.collapseMinimapButton.gameObject.SetActive(true); + viewInstance!.collapseMinimapButton.gameObject.SetActive(true); viewInstance.expandMinimapButton.gameObject.SetActive(false); viewInstance.minimapRendererButton.gameObject.SetActive(true); viewInstance.minimapAnimator.SetTrigger(UIAnimationHashes.EXPAND); @@ -113,7 +113,7 @@ private void ExpandMinimap() private void CollapseMinimap() { - viewInstance.collapseMinimapButton.gameObject.SetActive(false); + viewInstance!.collapseMinimapButton.gameObject.SetActive(false); viewInstance.expandMinimapButton.gameObject.SetActive(true); viewInstance.minimapRendererButton.gameObject.SetActive(false); viewInstance.minimapAnimator.SetTrigger(UIAnimationHashes.COLLAPSE); @@ -121,7 +121,7 @@ private void CollapseMinimap() private void OpenSideMenu() { - if (viewInstance.SideMenuCanvasGroup.gameObject.activeInHierarchy) { viewInstance.SideMenuCanvasGroup.DOFade(0, ANIMATION_TIME).SetEase(Ease.InOutQuad).OnComplete(() => viewInstance.SideMenuCanvasGroup.gameObject.gameObject.SetActive(false)); } + if (viewInstance!.SideMenuCanvasGroup.gameObject.activeInHierarchy) { viewInstance.SideMenuCanvasGroup.DOFade(0, ANIMATION_TIME).SetEase(Ease.InOutQuad).OnComplete(() => viewInstance.SideMenuCanvasGroup.gameObject.gameObject.SetActive(false)); } else { viewInstance.SideMenuCanvasGroup.gameObject.gameObject.SetActive(true); @@ -131,19 +131,19 @@ private void OpenSideMenu() private void ShowPinInMinimapEdge(IPinMarker pinMarker) { - if (string.IsNullOrEmpty(pinMarker.Description)) { viewInstance.destinationPinMarker.SetupAsScenePin(); } - else { viewInstance.destinationPinMarker.SetupAsMapPin(pinMarker.CurrentSprite); } + if (string.IsNullOrEmpty(pinMarker.Description)) { viewInstance!.destinationPinMarker.SetupAsScenePin(); } + else { viewInstance!.destinationPinMarker.SetupAsMapPin(pinMarker.CurrentSprite); } } private void UpdatePinPositionInMinimapEdge(Vector2 newPosition) { - viewInstance.destinationPinMarker.RestorePin(); + viewInstance!.destinationPinMarker.RestorePin(); viewInstance.destinationPinMarker.SetPosition(newPosition); } private void HidePinInMinimapEdge() { - viewInstance.destinationPinMarker.HidePin(); + viewInstance!.destinationPinMarker.HidePin(); } @@ -160,7 +160,7 @@ private void QueryPlayerPosition(in CharacterTransform transformComponent) RENDER_LAYERS, Vector2Int.RoundToInt(MapRendererTrackPlayerPosition.GetPlayerCentricCoords(position)), 1, - viewInstance.pixelPerfectMapRendererTextureProvider.GetPixelPerfectTextureResolution(), + viewInstance!.pixelPerfectMapRendererTextureProvider.GetPixelPerfectTextureResolution(), new Vector2Int(viewInstance.mapRendererVisibleParcels, viewInstance.mapRendererVisibleParcels) )); @@ -203,7 +203,7 @@ private void GetPlaceInfoAsync(Vector3 playerPosition) bool isNotEmptyParcel = scenesCache.Contains(playerParcelPosition); bool isSdk7Scene = scenesCache.TryGetByParcel(playerParcelPosition, out _); - viewInstance.sdk6Label.gameObject.SetActive(isNotEmptyParcel && !isSdk7Scene); + viewInstance!.sdk6Label.gameObject.SetActive(isNotEmptyParcel && !isSdk7Scene); return; @@ -214,26 +214,26 @@ async UniTaskVoid RetrieveParcelInfoAsync(Vector2Int playerParcelPosition) try { if (realmData.ScenesAreFixed) - viewInstance.placeNameText.text = realmData.RealmName.Replace(".dcl.eth", string.Empty); + viewInstance!.placeNameText.text = realmData.RealmName.Replace(".dcl.eth", string.Empty); else { PlacesData.PlaceInfo? placeInfo = await placesAPIService.GetPlaceAsync(playerParcelPosition, cts.Token); - viewInstance.placeNameText.text = placeInfo?.title ?? "Unknown place"; + viewInstance!.placeNameText.text = placeInfo?.title ?? "Unknown place"; } } catch (NotAPlaceException notAPlaceException) { - viewInstance.placeNameText.text = "Unknown place"; + viewInstance!.placeNameText.text = "Unknown place"; ReportHub.LogWarning(ReportCategory.UNSPECIFIED, $"Not a place requested: {notAPlaceException.Message}"); } - catch (Exception) { viewInstance.placeNameText.text = "Unknown place"; } - finally { viewInstance.placeCoordinatesText.text = playerParcelPosition.ToString().Replace("(", "").Replace(")", ""); } + catch (Exception) { viewInstance!.placeNameText.text = "Unknown place"; } + finally { viewInstance!.placeCoordinatesText.text = playerParcelPosition.ToString().Replace("(", "").Replace(")", ""); } } } private void SetWorldMode(bool isWorldModeActivated) { - foreach (GameObject go in viewInstance.objectsToActivateForGenesis) + foreach (GameObject go in viewInstance!.objectsToActivateForGenesis) go.SetActive(!isWorldModeActivated); foreach (GameObject go in viewInstance.objectsToActivateForWorlds) diff --git a/Explorer/Assets/DCL/Multiplayer/Connections/DCL.Multiplayer.Connections.asmdef b/Explorer/Assets/DCL/Multiplayer/Connections/DCL.Multiplayer.Connections.asmdef index 18767fef3b..9ee24fe434 100644 --- a/Explorer/Assets/DCL/Multiplayer/Connections/DCL.Multiplayer.Connections.asmdef +++ b/Explorer/Assets/DCL/Multiplayer/Connections/DCL.Multiplayer.Connections.asmdef @@ -2,7 +2,6 @@ "name": "DCL.Multiplayer.Connections", "rootNamespace": "", "references": [ - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", "GUID:91cf8206af184dac8e30eb46747e9939", "GUID:f51ebe6a0ceec4240a699833d6309b23", @@ -16,7 +15,10 @@ "GUID:e0eedfa2deb9406daf86fd8368728e39", "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:d414ef88f3b15f746a4b97636b50dfb4", - "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b" + "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b", + "GUID:1d2c76eb8b48e0b40940e8b31a679ce1", + "GUID:286980af24684da6acc1caa413039811", + "GUID:e25ef972de004615a22937e739de2def" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Multiplayer/Connections/Messaging/Hubs/MessagePipesHub.cs b/Explorer/Assets/DCL/Multiplayer/Connections/Messaging/Hubs/MessagePipesHub.cs index b1d6865865..b7a77c483e 100644 --- a/Explorer/Assets/DCL/Multiplayer/Connections/Messaging/Hubs/MessagePipesHub.cs +++ b/Explorer/Assets/DCL/Multiplayer/Connections/Messaging/Hubs/MessagePipesHub.cs @@ -11,8 +11,10 @@ public class MessagePipesHub : IMessagePipesHub private readonly IMessagePipe islandPipe; public MessagePipesHub(IRoomHub roomHub, IMultiPool sendingMultiPool, IMultiPool receivingMultiPool, IMemoryPool memoryPool) : this( - new MessagePipe(roomHub.SceneRoom().DataPipe, sendingMultiPool, receivingMultiPool, memoryPool).WithLog("Scene"), - new MessagePipe(roomHub.IslandRoom().DataPipe, sendingMultiPool, receivingMultiPool, memoryPool).WithLog("Island") + new MessagePipe(roomHub.SceneRoom().DataPipe, sendingMultiPool, receivingMultiPool, memoryPool) + .WithLog("Scene"), + new MessagePipe(roomHub.IslandRoom().DataPipe, sendingMultiPool, receivingMultiPool, memoryPool) + .WithLog("Island") ) { } public MessagePipesHub(IMessagePipe scenePipe, IMessagePipe islandPipe) diff --git a/Explorer/Assets/DCL/Multiplayer/Connections/Messaging/Pipe/IMessagePipe.cs b/Explorer/Assets/DCL/Multiplayer/Connections/Messaging/Pipe/IMessagePipe.cs index ff04af854c..14c02216a8 100644 --- a/Explorer/Assets/DCL/Multiplayer/Connections/Messaging/Pipe/IMessagePipe.cs +++ b/Explorer/Assets/DCL/Multiplayer/Connections/Messaging/Pipe/IMessagePipe.cs @@ -1,5 +1,7 @@ using Decentraland.Kernel.Comms.Rfc4; +using ECS.SceneLifeCycle; using Google.Protobuf; +using LiveKit.Rooms; using System; namespace DCL.Multiplayer.Connections.Messaging.Pipe diff --git a/Explorer/Assets/DCL/Multiplayer/HealthChecks/DCL.Multiplayer.Health.asmdef b/Explorer/Assets/DCL/Multiplayer/HealthChecks/DCL.Multiplayer.Health.asmdef index f2aa4cc9a0..918b79fff3 100644 --- a/Explorer/Assets/DCL/Multiplayer/HealthChecks/DCL.Multiplayer.Health.asmdef +++ b/Explorer/Assets/DCL/Multiplayer/HealthChecks/DCL.Multiplayer.Health.asmdef @@ -7,7 +7,7 @@ "GUID:91cf8206af184dac8e30eb46747e9939", "GUID:8322ea9340a544c59ddc56d4793eac74", "GUID:7175400a68914a45acecc9fb068de3b8", - "GUID:101b8b6ebaf64668909b49c4b7a1420d" + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Multiplayer/HealthChecks/URLHealthCheck.cs b/Explorer/Assets/DCL/Multiplayer/HealthChecks/URLHealthCheck.cs index 360ac96c1a..c48c74b728 100644 --- a/Explorer/Assets/DCL/Multiplayer/HealthChecks/URLHealthCheck.cs +++ b/Explorer/Assets/DCL/Multiplayer/HealthChecks/URLHealthCheck.cs @@ -1,5 +1,6 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using DCL.Multiplayer.Connections.DecentralandUrls; using DCL.WebRequests; using System; @@ -38,7 +39,7 @@ public URLHealthCheck(IWebRequestController webRequestController, IDecentralandU try { - int code = await webRequestController.HeadAsync(new CommonArguments(urlAddress, attemptsCount: ATTEMPTS), ct).StatusCodeAsync(); + int code = await webRequestController.HeadAsync(new CommonArguments(urlAddress, attemptsCount: ATTEMPTS), ct, ReportCategory.LIVEKIT).StatusCodeAsync(); bool success = ERROR_CODES.Contains(code) == false; return (success, success ? null : $"Cannot connect to {urlAddress}"); } diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Encoder/FloatQuantizer.cs b/Explorer/Assets/DCL/Multiplayer/Movement/Encoder/FloatQuantizer.cs index cde5181a9c..833423e4ff 100644 --- a/Explorer/Assets/DCL/Multiplayer/Movement/Encoder/FloatQuantizer.cs +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Encoder/FloatQuantizer.cs @@ -7,16 +7,16 @@ namespace DCL.Multiplayer.Movement /// public static class FloatQuantizer { - public static int Compress(float value, float minValue, float maxValue, int bits) + public static int Compress(float value, float minValue, float maxValue, int sizeInBits) { - int maxStep = (1 << bits) - 1; + int maxStep = (1 << sizeInBits) - 1; float normalizedValue = (value - minValue) / (maxValue - minValue); return Mathf.RoundToInt(Mathf.Clamp01(normalizedValue) * maxStep); } - public static float Decompress(int compressed, float minValue, float maxValue, int bits) + public static float Decompress(int compressed, float minValue, float maxValue, int sizeInBits) { - float maxStep = (1 << bits) - 1f; + float maxStep = (1 << sizeInBits) - 1f; float normalizedValue = compressed / maxStep; return (normalizedValue * (maxValue - minValue)) + minValue; } diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Encoder/NetworkMessageEncoder.cs b/Explorer/Assets/DCL/Multiplayer/Movement/Encoder/NetworkMessageEncoder.cs index 6b813ab3e2..077e1b875c 100644 --- a/Explorer/Assets/DCL/Multiplayer/Movement/Encoder/NetworkMessageEncoder.cs +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Encoder/NetworkMessageEncoder.cs @@ -21,8 +21,8 @@ public NetworkMessageEncoder(MessageEncodingSettings encodingSettings) public CompressedNetworkMovementMessage Compress(NetworkMovementMessage message) => new () { - temporalData = CompressTemporalData(message.timestamp, message.movementKind, message.isSliding, message.animState, message.isStunned, message.rotationY, message.tier), - movementData = CompressMovementData(message.position, message.velocity, encodingSettings.GetConfigForTier(message.tier)), + temporalData = CompressTemporalData(message.timestamp, message.movementKind, message.isSliding, message.animState, message.isStunned, message.rotationY, message.velocityTier), + movementData = CompressMovementData(message.position, message.velocity, encodingSettings.GetConfigForTier(message.velocityTier)), }; private int CompressTemporalData(float timestamp, MovementKind movementKind, bool isSliding, AnimationStates animState, bool isStunned, @@ -48,38 +48,6 @@ private int CompressTemporalData(float timestamp, MovementKind movementKind, boo return temporalData; } - private long CompressMovementData(Vector3 position, Vector3 velocity, MovementEncodingConfig settings) - { - Vector2Int parcel = position.ToParcel(); - - int parcelIndex = parcelEncoder.Encode(parcel); - - var relativePosition = new Vector2( - position.x - (parcel.x * ParcelMathHelper.PARCEL_SIZE), - position.z - (parcel.y * ParcelMathHelper.PARCEL_SIZE) // Y is Z in this case - ); - - int xzBits = settings.XZ_BITS; - int yBits = settings.Y_BITS; - int compressedX = FloatQuantizer.Compress(relativePosition.x, 0, ParcelMathHelper.PARCEL_SIZE, xzBits); - int compressedZ = FloatQuantizer.Compress(relativePosition.y, 0, ParcelMathHelper.PARCEL_SIZE, xzBits); - int compressedY = FloatQuantizer.Compress(position.y, 0, settings.Y_MAX, yBits); - - int maxVelocity = settings.MAX_VELOCITY; - int velocityBits = settings.VELOCITY_BITS; - int compressedVelocityX = FloatQuantizer.Compress(velocity.x, -maxVelocity, maxVelocity, velocityBits); - int compressedVelocityY = FloatQuantizer.Compress(velocity.y, -maxVelocity, maxVelocity, velocityBits); - int compressedVelocityZ = FloatQuantizer.Compress(velocity.z, -maxVelocity, maxVelocity, velocityBits); - - return (uint)parcelIndex - | ((long)compressedX << MessageEncodingSettings.PARCEL_BITS) - | ((long)compressedZ << (MessageEncodingSettings.PARCEL_BITS + xzBits)) - | ((long)compressedY << (MessageEncodingSettings.PARCEL_BITS + xzBits + xzBits)) - | ((long)compressedVelocityX << (MessageEncodingSettings.PARCEL_BITS + xzBits + xzBits + yBits)) - | ((long)compressedVelocityY << (MessageEncodingSettings.PARCEL_BITS + xzBits + xzBits + yBits + velocityBits)) - | ((long)compressedVelocityZ << (MessageEncodingSettings.PARCEL_BITS + xzBits + xzBits + yBits + velocityBits + velocityBits)); - } - public NetworkMovementMessage Decompress(CompressedNetworkMovementMessage compressedMessage) { int compressedTemporalData = compressedMessage.temporalData; @@ -91,18 +59,23 @@ public NetworkMovementMessage Decompress(CompressedNetworkMovementMessage compre int compressedRotation = (compressedTemporalData >> encodingSettings.ROTATION_START_BIT) & rotationMask; float timestamp = timestampEncoder.Decompress(compressedTemporalData); + var movementKind = (MovementKind)((compressedTemporalData >> encodingSettings.MOVEMENT_KIND_START_BIT) & MessageEncodingSettings.TWO_BITS_MASK); + + var correctedVelocity = movementData.velocity; + return new NetworkMovementMessage { - tier = tier, + velocityTier = (byte)tier, + // Decompressed movement data position = movementData.position, - velocity = movementData.velocity, - velocitySqrMagnitude = movementData.velocity.sqrMagnitude, + velocity = correctedVelocity, + velocitySqrMagnitude = correctedVelocity.sqrMagnitude, rotationY = FloatQuantizer.Decompress(compressedRotation, 0f, 360f, encodingSettings.ROTATION_Y_BITS), // Decompress temporal data timestamp = timestamp, - movementKind = (MovementKind)((compressedTemporalData >> encodingSettings.MOVEMENT_KIND_START_BIT) & MessageEncodingSettings.TWO_BITS_MASK), + movementKind = movementKind, animState = new AnimationStates { @@ -121,20 +94,57 @@ public NetworkMovementMessage Decompress(CompressedNetworkMovementMessage compre }; } + private long CompressMovementData(Vector3 position, Vector3 velocity, MovementEncodingConfig settings) + { + Vector2Int parcel = position.ToParcel(); + + int parcelIndex = parcelEncoder.Encode(parcel); + + var relativePosition = new Vector2( + position.x - (parcel.x * ParcelMathHelper.PARCEL_SIZE), + position.z - (parcel.y * ParcelMathHelper.PARCEL_SIZE) // Y is Z in this case + ); + + byte xzBits = settings.XZ__BITS; + byte yBits = settings.Y__BITS; + + int compressedX = FloatQuantizer.Compress(relativePosition.x, 0, ParcelMathHelper.PARCEL_SIZE, xzBits); + int compressedZ = FloatQuantizer.Compress(relativePosition.y, 0, ParcelMathHelper.PARCEL_SIZE, xzBits); + int compressedY = FloatQuantizer.Compress(position.y, 0, settings.Y__MAX, yBits); + + int maxVelocity = settings.MAX__VELOCITY; + byte velocityBits = settings.VELOCITY_AXIS_FIELD_SIZE_IN_BITS; + + const float SAFE_ZONE = 0.05f; + if (velocity.sqrMagnitude < SAFE_ZONE) velocity = Vector3.zero; + + int compressedVelocityX = CompressedVelocity(velocity.x, maxVelocity, velocityBits); + int compressedVelocityY = CompressedVelocity(velocity.y, maxVelocity, velocityBits); + int compressedVelocityZ = CompressedVelocity(velocity.z, maxVelocity, velocityBits); + + return (uint)parcelIndex + | ((long)compressedX << MessageEncodingSettings.PARCEL_BITS) + | ((long)compressedZ << (MessageEncodingSettings.PARCEL_BITS + xzBits)) + | ((long)compressedY << (MessageEncodingSettings.PARCEL_BITS + xzBits + xzBits)) + | ((long)compressedVelocityX << (MessageEncodingSettings.PARCEL_BITS + xzBits + xzBits + yBits)) + | ((long)compressedVelocityY << (MessageEncodingSettings.PARCEL_BITS + xzBits + xzBits + yBits + velocityBits)) + | ((long)compressedVelocityZ << (MessageEncodingSettings.PARCEL_BITS + xzBits + xzBits + yBits + velocityBits + velocityBits)); + } + private (Vector3 position, Vector3 velocity) DecompressMovementData(long movementData, MovementEncodingConfig settings) { const int PARCEL_BITS = MessageEncodingSettings.PARCEL_BITS; const int PARCEL_MASK = (1 << PARCEL_BITS) - 1; - int xzBits = settings.XZ_BITS; + int xzBits = settings.XZ__BITS; int xzMask = (1 << xzBits) - 1; - int yBits = settings.Y_BITS; - int yMax = settings.Y_MAX; + int yBits = settings.Y__BITS; + int yMax = settings.Y__MAX; int yMask = (1 << yBits) - 1; - int maxVelocity = settings.MAX_VELOCITY; - int velocityBits = settings.VELOCITY_BITS; + int maxVelocity = settings.MAX__VELOCITY; + int velocityBits = settings.VELOCITY_AXIS_FIELD_SIZE_IN_BITS; int velocityMask = (1 << velocityBits) - 1; Vector2Int parcel = parcelEncoder.Decode((int)(movementData & PARCEL_MASK)); @@ -157,11 +167,36 @@ public NetworkMovementMessage Decompress(CompressedNetworkMovementMessage compre var extractedVelocityY = (int)((movementData >> (PARCEL_BITS + xzBits + xzBits + yBits + velocityBits)) & velocityMask); var extractedVelocityZ = (int)((movementData >> (PARCEL_BITS + xzBits + xzBits + yBits + velocityBits + velocityBits)) & velocityMask); - float decompressedVelocityX = FloatQuantizer.Decompress(extractedVelocityX, -maxVelocity, maxVelocity, velocityBits); - float decompressedVelocityY = FloatQuantizer.Decompress(extractedVelocityY, -maxVelocity, maxVelocity, velocityBits); - float decompressedVelocityZ = FloatQuantizer.Decompress(extractedVelocityZ, -maxVelocity, maxVelocity, velocityBits); + float decompressedVelocityX = DecompressedVelocity(extractedVelocityX, maxVelocity, velocityBits); + float decompressedVelocityY = DecompressedVelocity(extractedVelocityY, maxVelocity, velocityBits); + float decompressedVelocityZ = DecompressedVelocity(extractedVelocityZ, maxVelocity, velocityBits); return (worldPosition, velocity: new Vector3(decompressedVelocityX, decompressedVelocityY, decompressedVelocityZ)); } + + private static int CompressedVelocity(float velocity, int range, int sizeInBits) + { + int withoutSignBits = sizeInBits - 1; + float absVelocity = Mathf.Abs(velocity); + int compressed = FloatQuantizer.Compress(absVelocity, 0, range, withoutSignBits); + compressed <<= 1; + compressed |= NegativeSignFlag(velocity); + return compressed; + } + + private static float DecompressedVelocity(int compressed, int range, int sizeInBits) + { + bool negativeSign = (compressed & 1) == 1; + int withoutSign = compressed >> 1; + int withoutSignBits = sizeInBits - 1; + float decompressed = FloatQuantizer.Decompress(withoutSign, 0, range, withoutSignBits); + if (negativeSign) decompressed *= -1; + return decompressed; + } + + private static byte NegativeSignFlag(float value) => + value < 0 + ? (byte)1 + : (byte)0; } } diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Interpolation.cs b/Explorer/Assets/DCL/Multiplayer/Movement/Interpolation.cs index 992ae75fd4..0f92afe8cb 100644 --- a/Explorer/Assets/DCL/Multiplayer/Movement/Interpolation.cs +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Interpolation.cs @@ -30,16 +30,17 @@ public static float Execute(float deltaTime, ref CharacterTransform transComp, r transComp.Transform.position = intComp.End.position; } - LookAt(deltaTime, ref transComp, lookDirection, rotationSpeed, intComp.End.rotationY); + // Flattened to have ground plane direction only (XZ) + lookDirection.y = 0; + + if (lookDirection != Vector3.zero) + LookAt(deltaTime, ref transComp, lookDirection, rotationSpeed, intComp.End.rotationY); return remainedDeltaTime; } private static void LookAt(float dt, ref CharacterTransform transComp, Vector3 direction, float rotationSpeed, float yRotation) { - // Flattened to have ground plane direction only (XZ) - direction.y = 0; - var lookRotation = Quaternion.LookRotation(direction, Vector3.up); lookRotation.eulerAngles = new Vector3(lookRotation.eulerAngles.x, yRotation, lookRotation.eulerAngles.z); transComp.Transform.rotation = Quaternion.RotateTowards(transComp.Transform.rotation, lookRotation, rotationSpeed * dt); diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/NetworkMovementMessage.cs b/Explorer/Assets/DCL/Multiplayer/Movement/NetworkMovementMessage.cs index 53aa0876ad..3cab81903e 100644 --- a/Explorer/Assets/DCL/Multiplayer/Movement/NetworkMovementMessage.cs +++ b/Explorer/Assets/DCL/Multiplayer/Movement/NetworkMovementMessage.cs @@ -20,18 +20,55 @@ public struct NetworkMovementMessage : IEquatable public AnimationStates animState; - public int tier; + public byte velocityTier; + + public NetworkMovementMessage(float timestamp, Vector3 position, Vector3 velocity, float velocitySqrMagnitude, float rotationY, + MovementKind movementKind, bool isSliding, bool isStunned, AnimationStates animState, byte velocityTier) + { + this.timestamp = timestamp; + this.position = position; + this.velocity = velocity; + this.velocitySqrMagnitude = velocitySqrMagnitude; + this.rotationY = rotationY; + this.movementKind = movementKind; + this.isSliding = isSliding; + this.isStunned = isStunned; + this.animState = animState; + this.velocityTier = velocityTier; + } public override string ToString() => - JsonUtility.ToJson(this); + JsonUtility.ToJson(this)!; + + public override int GetHashCode() + { + var hashCode = new HashCode(); + hashCode.Add(timestamp); + hashCode.Add(position); + hashCode.Add(velocity); + hashCode.Add(velocitySqrMagnitude); + hashCode.Add(rotationY); + hashCode.Add((int)movementKind); + hashCode.Add(isSliding); + hashCode.Add(isStunned); + hashCode.Add(animState); + hashCode.Add(velocityTier); + return hashCode.ToHashCode(); + } public bool Equals(NetworkMovementMessage other) => - timestamp.Equals(other.timestamp) && position.Equals(other.position) && velocity.Equals(other.velocity) && animState.Equals(other.animState) && isStunned == other.isStunned; + timestamp.Equals(other.timestamp) + && position.Equals(other.position) + && velocity.Equals(other.velocity) + && velocitySqrMagnitude.Equals(other.velocitySqrMagnitude) + && rotationY.Equals(other.rotationY) + && movementKind == other.movementKind + && isSliding == other.isSliding + && isStunned == other.isStunned + && animState.Equals(other.animState) + && velocityTier == other.velocityTier; public override bool Equals(object obj) => obj is NetworkMovementMessage other && Equals(other); - - public override int GetHashCode() => - HashCode.Combine(timestamp, position, velocity, animState, isStunned); } } diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Settings/MessageEncodingSettings.cs b/Explorer/Assets/DCL/Multiplayer/Movement/Settings/MessageEncodingSettings.cs index a298586549..988589269d 100644 --- a/Explorer/Assets/DCL/Multiplayer/Movement/Settings/MessageEncodingSettings.cs +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Settings/MessageEncodingSettings.cs @@ -54,14 +54,25 @@ public MovementEncodingConfig GetConfigForTier(int tier) [Serializable] public class MovementEncodingConfig { - public int XZ_BITS = 9; + [SerializeField] + private byte XZ_BITS = 9; [Space] - public int Y_MAX = 500; - public int Y_BITS = 13; + [SerializeField] private int Y_MAX = 500; + [SerializeField] private byte Y_BITS = 13; [Space] - public int MAX_VELOCITY = 40; - public int VELOCITY_BITS = 1; + [SerializeField] private int MAX_VELOCITY = 40; + [SerializeField] private byte VELOCITY_BITS = 1; + + public byte XZ__BITS => XZ_BITS; + + public int Y__MAX => Y_MAX; + + public byte Y__BITS => Y_BITS; + + public int MAX__VELOCITY => MAX_VELOCITY; + + public byte VELOCITY_AXIS_FIELD_SIZE_IN_BITS => VELOCITY_BITS; } } diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Systems/MultiplayerMovementMessageBus.cs b/Explorer/Assets/DCL/Multiplayer/Movement/Systems/MultiplayerMovementMessageBus.cs index 26b67ff90e..8f703098d3 100644 --- a/Explorer/Assets/DCL/Multiplayer/Movement/Systems/MultiplayerMovementMessageBus.cs +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Systems/MultiplayerMovementMessageBus.cs @@ -1,6 +1,5 @@ using Arch.Core; using Cysharp.Threading.Tasks; -using DCL.CharacterMotion.Components; using DCL.Diagnostics; using DCL.Multiplayer.Connections.Messaging; using DCL.Multiplayer.Connections.Messaging.Hubs; @@ -10,7 +9,6 @@ using Decentraland.Kernel.Comms.Rfc4; using System; using System.Threading; -using UnityEngine; namespace DCL.Multiplayer.Movement.Systems { @@ -20,9 +18,10 @@ public class MultiplayerMovementMessageBus : IDisposable private readonly IReadOnlyEntityParticipantTable entityParticipantTable; private readonly CancellationTokenSource cancellationTokenSource = new (); - private NetworkMessageEncoder messageEncoder; + private NetworkMessageEncoder messageEncoder = null!; private readonly World globalWorld; + private bool isDisposed; public MultiplayerMovementMessageBus(IMessagePipesHub messagePipesHub, IReadOnlyEntityParticipantTable entityParticipantTable, World globalWorld) @@ -31,9 +30,6 @@ public MultiplayerMovementMessageBus(IMessagePipesHub messagePipesHub, IReadOnly this.entityParticipantTable = entityParticipantTable; this.globalWorld = globalWorld; - this.messagePipesHub.IslandPipe().Subscribe(Packet.MessageOneofCase.Movement, OnOldSchemaMessageReceived); - this.messagePipesHub.ScenePipe().Subscribe(Packet.MessageOneofCase.Movement, OnOldSchemaMessageReceived); - this.messagePipesHub.IslandPipe().Subscribe(Packet.MessageOneofCase.MovementCompressed, OnMessageReceived); this.messagePipesHub.ScenePipe().Subscribe(Packet.MessageOneofCase.MovementCompressed, OnMessageReceived); } @@ -50,24 +46,6 @@ public void Dispose() cancellationTokenSource.Dispose(); } - private void OnOldSchemaMessageReceived(ReceivedMessage receivedMessage) - { - if (isDisposed) - { - ReportHub.LogError(ReportCategory.MULTIPLAYER, "Receiving a message while disposed is bad"); - return; - } - - using (receivedMessage) - { - if (cancellationTokenSource.Token.IsCancellationRequested) - return; - - NetworkMovementMessage message = MovementMessage(receivedMessage.Payload); - Inbox(message, receivedMessage.FromWalletId); - } - } - private void OnMessageReceived(ReceivedMessage receivedMessage) { if (isDisposed) @@ -97,31 +75,6 @@ public void Send(NetworkMovementMessage message) WriteAndSend(message, messagePipesHub.ScenePipe()); } - private static NetworkMovementMessage MovementMessage(Decentraland.Kernel.Comms.Rfc4.Movement proto) - { - var vel = new Vector3(proto.VelocityX, proto.VelocityY, proto.VelocityZ); - - return new NetworkMovementMessage - { - timestamp = proto.Timestamp, - position = new Vector3(proto.PositionX, proto.PositionY, proto.PositionZ), - velocity = vel, - velocitySqrMagnitude = vel.sqrMagnitude, - - animState = new AnimationStates - { - MovementBlendValue = proto.MovementBlendValue, - SlideBlendValue = proto.SlideBlendValue, - IsGrounded = proto.IsGrounded, - IsJumping = proto.IsJumping, - IsLongJump = proto.IsLongJump, - IsFalling = proto.IsFalling, - IsLongFall = proto.IsLongFall, - }, - isStunned = proto.IsStunned, - }; - } - private void WriteAndSend(NetworkMovementMessage message, IMessagePipe messagePipe) { MessageWrap messageWrap = messagePipe.NewMessage(); diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Systems/PlayerMovementNetSendSystem.cs b/Explorer/Assets/DCL/Multiplayer/Movement/Systems/PlayerMovementNetSendSystem.cs index b535c9960f..305fd66c50 100644 --- a/Explorer/Assets/DCL/Multiplayer/Movement/Systems/PlayerMovementNetSendSystem.cs +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Systems/PlayerMovementNetSendSystem.cs @@ -112,10 +112,7 @@ private void SendMessage(ref PlayerMovementNetworkComponent playerMovement, in C float dist = (playerMovement.Character.transform.position - playerMovement.LastSentMessage.position).magnitude; float speed = dist / (UnityEngine.Time.unscaledTime - playerMovement.LastSentMessage.timestamp); - var tier = 0; - - while (tier < settings.VelocityTiers.Length && speed >= settings.VelocityTiers[tier]) - tier++; + byte velocityTier = VelocityTierFromSpeed(speed); playerMovement.LastSentMessage = new NetworkMovementMessage { @@ -125,7 +122,7 @@ private void SendMessage(ref PlayerMovementNetworkComponent playerMovement, in C velocitySqrMagnitude = playerMovement.Character.velocity.sqrMagnitude, rotationY = playerMovement.Character.transform.eulerAngles.y, - tier = tier, + velocityTier = velocityTier, isStunned = playerStunComponent.IsStunned, isSliding = animation.IsSliding, @@ -152,11 +149,19 @@ private void SendMessage(ref PlayerMovementNetworkComponent playerMovement, in C if (debugSettings.SelfSending && movement.Kind != MovementKind.RUN // simulate package lost when Running ) - { messageBus.SelfSendWithDelayAsync(playerMovement.LastSentMessage, debugSettings.Latency + (debugSettings.Latency * Random.Range(0, debugSettings.LatencyJitter))) .Forget(); - } + } + + private byte VelocityTierFromSpeed(float speed) + { + byte velocityTier = 0; + + while (velocityTier < settings.VelocityTiers.Length && speed >= settings.VelocityTiers[velocityTier]) + velocityTier++; + + return velocityTier; } } } diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Systems/csc.rsp b/Explorer/Assets/DCL/Multiplayer/Movement/Systems/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Systems/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Systems/csc.rsp.meta b/Explorer/Assets/DCL/Multiplayer/Movement/Systems/csc.rsp.meta new file mode 100644 index 0000000000..4063a76678 --- /dev/null +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Systems/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 55a45bf7cb6246bab5195129626f2d48 +timeCreated: 1726062483 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Tests/MovementMessageCompressionTests.cs b/Explorer/Assets/DCL/Multiplayer/Movement/Tests/MovementMessageCompressionTests.cs index 3e37491738..854bb666b8 100644 --- a/Explorer/Assets/DCL/Multiplayer/Movement/Tests/MovementMessageCompressionTests.cs +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Tests/MovementMessageCompressionTests.cs @@ -14,6 +14,7 @@ public class MovementMessageCompressionTests private NetworkMessageEncoder encoder; private static MessageEncodingSettings settings; + private static MessageEncodingSettings Settings { get @@ -41,6 +42,7 @@ private static MessageEncodingSettings LoadSettings() [TestCase(0f, 0f)] [TestCase(5f, 0.751f)] [TestCase(-5f, -1000f)] + // We don't pass blend values with the message, so they should be reset to 0 on decompress public void ShouldResetBlendsToZeroOnDecompress(float moveBlend, float slideBlend) { @@ -126,7 +128,7 @@ private static IEnumerable GetParcelMinMaxTestCases() public void ShouldCorrectlyEncodeAndDecodeXZPositions(float x, float z) { // Arrange - float stepSize = PARCEL_SIZE / Mathf.Pow(2, settings.tier3.XZ_BITS); + float stepSize = PARCEL_SIZE / Mathf.Pow(2, settings.tier3.XZ__BITS); float quantizationError = (stepSize / 2f) + 0.0002f; // there is a small deviation at 8.0f point (less then 0.0002f) var originalMessage = new NetworkMovementMessage { position = new Vector3(x, 0f, z) }; @@ -143,13 +145,13 @@ public void ShouldCorrectlyEncodeAndDecodeXZPositions(float x, float z) private static IEnumerable GetYMaxTestCases() { - yield return Settings.tier3.Y_MAX / 8f; - yield return Settings.tier3.Y_MAX / 4f; - yield return Settings.tier3.Y_MAX / 3f; - yield return Settings.tier3.Y_MAX / 2f; - yield return Settings.tier3.Y_MAX; - yield return Settings.tier3.Y_MAX + 0.05f; - yield return 10 * Settings.tier3.Y_MAX; + yield return Settings.tier3.Y__MAX / 8f; + yield return Settings.tier3.Y__MAX / 4f; + yield return Settings.tier3.Y__MAX / 3f; + yield return Settings.tier3.Y__MAX / 2f; + yield return Settings.tier3.Y__MAX; + yield return Settings.tier3.Y__MAX + 0.05f; + yield return 10 * Settings.tier3.Y__MAX; } [TestCase(-5.751f)] @@ -162,13 +164,13 @@ private static IEnumerable GetYMaxTestCases() public void ShouldCorrectlyEncodeAndDecodeYPositions(float y) { // Arrange - float stepSize = settings.tier3.Y_MAX / Mathf.Pow(2, settings.tier3.Y_BITS); + float stepSize = settings.tier3.Y__MAX / Mathf.Pow(2, settings.tier3.Y__BITS); float quantizationError = stepSize / 2f; var originalMessage = new NetworkMovementMessage { position = new Vector3(0f, y, 0f), - tier = 3, + velocityTier = 3, }; // Act @@ -176,18 +178,17 @@ public void ShouldCorrectlyEncodeAndDecodeYPositions(float y) // Assert Assert.That(decompressedMessage.position.y, Is.GreaterThanOrEqualTo(0)); - Assert.AreEqual(Mathf.Clamp(originalMessage.position.y, 0, settings.tier3.Y_MAX), decompressedMessage.position.y, quantizationError); + Assert.AreEqual(Mathf.Clamp(originalMessage.position.y, 0, settings.tier3.Y__MAX), decompressedMessage.position.y, quantizationError); Debug.Log($"Y quantization error = {quantizationError} | original: {originalMessage.position.y} | decompressed: {decompressedMessage.position.y}"); } private static IEnumerable GetMaxVelocityTestCases() { - yield return new TestCaseData(20.241f, 30f, Settings.tier3.MAX_VELOCITY - 0.003f); - yield return new TestCaseData(-20.241f, -30f, -Settings.tier3.MAX_VELOCITY + 0.023f); - yield return new TestCaseData(Settings.tier3.MAX_VELOCITY / 2f, Settings.tier3.MAX_VELOCITY / 2f, Settings.tier3.MAX_VELOCITY / 2f); - yield return new TestCaseData(Settings.tier3.MAX_VELOCITY, -Settings.tier3.MAX_VELOCITY, Settings.tier3.MAX_VELOCITY); - yield return new TestCaseData(-Settings.tier3.MAX_VELOCITY, Settings.tier3.MAX_VELOCITY, -Settings.tier3.MAX_VELOCITY); + yield return new TestCaseData(20.241f, 30f, Settings.tier3.MAX__VELOCITY - 0.003f); + yield return new TestCaseData(-20.241f, -30f, -Settings.tier3.MAX__VELOCITY + 0.023f); + yield return new TestCaseData(Settings.tier3.MAX__VELOCITY, -Settings.tier3.MAX__VELOCITY, Settings.tier3.MAX__VELOCITY); + yield return new TestCaseData(-Settings.tier3.MAX__VELOCITY, Settings.tier3.MAX__VELOCITY, -Settings.tier3.MAX__VELOCITY); } [TestCase(0, 0, 0)] @@ -199,16 +200,16 @@ private static IEnumerable GetMaxVelocityTestCases() public void ShouldCorrectlyCompressAndDecompressVelocity(float x, float y, float z) { // Arrange - float stepSize = 2 * settings.tier3.MAX_VELOCITY / Mathf.Pow(2, settings.tier3.VELOCITY_BITS); + float stepSize = 2 * settings.tier3.MAX__VELOCITY / Mathf.Pow(2, settings.tier3.VELOCITY_AXIS_FIELD_SIZE_IN_BITS); float quantizationError = stepSize / 2f; var originalMessage = new NetworkMovementMessage { velocity = new Vector3(x, y, z), - tier = 3, + velocityTier = 3, }; - if(originalMessage.velocity.magnitude < 0.001f) + if (originalMessage.velocity.magnitude < 0.001f) quantizationError += 0.015f; // there is velocity deviation at zero (< 0.015f) // Act @@ -237,6 +238,7 @@ public void ShouldCorrectlyEncodeAndDecodeTimestamp(float t) // Arrange var originalMessage = new NetworkMovementMessage { timestamp = t }; var timestampEncoder = new TimestampEncoder(Settings); + // Act NetworkMovementMessage decompressedMessage = encoder.Decompress(encoder.Compress(originalMessage)); @@ -244,5 +246,29 @@ public void ShouldCorrectlyEncodeAndDecodeTimestamp(float t) Assert.AreEqual(t % timestampEncoder.BufferSize, decompressedMessage.timestamp, Settings.TIMESTAMP_QUANTUM); Debug.Log($"Timestamp quantization = {Settings.TIMESTAMP_QUANTUM}, buffer size = {timestampEncoder.BufferSize / 60} min | original: {t} | decompressed: {decompressedMessage.timestamp}"); } + + public static IEnumerable FloatCompressDecompressTestCases() + { + for (var bits = 1; bits < 31; bits++) + yield return new TestCaseData(0.5f, 0, 1, bits); + + const float RANGE = 4; + + for (var i = 0; i < 30; i++) + { + float interpolated = Mathf.Lerp(-RANGE, RANGE, i / 30f); + yield return new TestCaseData(interpolated, -RANGE, RANGE, 4); + } + } + + [Test] + [TestCaseSource(nameof(FloatCompressDecompressTestCases))] + public void FloatCompressDecompress(float value, float min, float max, int bits) + { + int compressed = FloatQuantizer.Compress(value, min, max, bits); + Debug.Log($"Value is: 0x{compressed:X4}"); + float decompressed = FloatQuantizer.Decompress(compressed, min, max, bits); + Debug.Log($"Decompressed value is: {decompressed}, original: {value}"); + } } } diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Tests/csc.rsp b/Explorer/Assets/DCL/Multiplayer/Movement/Tests/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Tests/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/Tests/csc.rsp.meta b/Explorer/Assets/DCL/Multiplayer/Movement/Tests/csc.rsp.meta new file mode 100644 index 0000000000..f621299f7b --- /dev/null +++ b/Explorer/Assets/DCL/Multiplayer/Movement/Tests/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2680b1905e914864928b60eb0f50ea61 +timeCreated: 1726065528 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/csc.rsp b/Explorer/Assets/DCL/Multiplayer/Movement/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/Multiplayer/Movement/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/Multiplayer/Movement/csc.rsp.meta b/Explorer/Assets/DCL/Multiplayer/Movement/csc.rsp.meta new file mode 100644 index 0000000000..e4cd2605a3 --- /dev/null +++ b/Explorer/Assets/DCL/Multiplayer/Movement/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 740b5732e6564b89bebcebf9755eebc1 +timeCreated: 1726062479 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Multiplayer/Profiles/DCL.Multiplayer.Profiles.asmdef b/Explorer/Assets/DCL/Multiplayer/Profiles/DCL.Multiplayer.Profiles.asmdef index 28f4235cf6..dd17173cd0 100644 --- a/Explorer/Assets/DCL/Multiplayer/Profiles/DCL.Multiplayer.Profiles.asmdef +++ b/Explorer/Assets/DCL/Multiplayer/Profiles/DCL.Multiplayer.Profiles.asmdef @@ -4,7 +4,6 @@ "references": [ "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:7175400a68914a45acecc9fb068de3b8", "GUID:166b65e6dfc848bb9fb075f53c293a38", "GUID:78cc93eb55f63084db95d7a9b7cc3c57", diff --git a/Explorer/Assets/DCL/Multiplayer/Profiles/Entities/RemoteEntities.cs b/Explorer/Assets/DCL/Multiplayer/Profiles/Entities/RemoteEntities.cs index 2157509a4b..830c565349 100644 --- a/Explorer/Assets/DCL/Multiplayer/Profiles/Entities/RemoteEntities.cs +++ b/Explorer/Assets/DCL/Multiplayer/Profiles/Entities/RemoteEntities.cs @@ -30,7 +30,7 @@ public class RemoteEntities : IRemoteEntities private readonly IComponentPoolsRegistry componentPoolsRegistry; private readonly List tempRemoveAll = new (); private readonly IEntityCollidersGlobalCache collidersGlobalCache; - private readonly Dictionary collidersByWalletId = new (); + private readonly Dictionary collidersByWalletId = new (); private IComponentPool remoteAvatarColliderPool = null!; private IComponentPool transformPool = null!; @@ -89,9 +89,10 @@ public void TryRemove(string walletId, World world) var entity = entityParticipantTable.Entity(walletId); - if (collidersByWalletId.TryGetValue(walletId, out Collider collider)) + if (collidersByWalletId.TryGetValue(walletId, out RemoteAvatarCollider remoteAvatarCollider)) { - collidersGlobalCache.RemoveGlobalEntityAssociation(collider); + remoteAvatarColliderPool.Release(remoteAvatarCollider); + collidersGlobalCache.RemoveGlobalEntityAssociation(remoteAvatarCollider.Collider); collidersByWalletId.Remove(walletId); } @@ -133,7 +134,7 @@ private Entity CreateCharacter(RemoteProfile profile, World world) remoteAvatarCollider.transform.SetParent(transform); remoteAvatarCollider.transform.rotation = Quaternion.identity; remoteAvatarCollider.transform.localScale = Vector3.one; - collidersByWalletId.TryAdd(profile.WalletId, remoteAvatarCollider.Collider); + collidersByWalletId.TryAdd(profile.WalletId, remoteAvatarCollider); var transformComp = new CharacterTransform(transform); diff --git a/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/AvatarEmoteCommandPropagationSystem.cs b/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/AvatarEmoteCommandPropagationSystem.cs index a0feea5665..1cbae92716 100644 --- a/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/AvatarEmoteCommandPropagationSystem.cs +++ b/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/AvatarEmoteCommandPropagationSystem.cs @@ -8,6 +8,7 @@ using ECS.Abstract; using ECS.LifeCycle.Components; using SceneRunner.Scene; +using CharacterEmoteSystem = DCL.AvatarRendering.Emotes.Play.CharacterEmoteSystem; namespace DCL.Multiplayer.SDK.Systems.GlobalWorld { @@ -16,11 +17,11 @@ namespace DCL.Multiplayer.SDK.Systems.GlobalWorld [LogCategory(ReportCategory.PLAYER_SDK_DATA)] public partial class AvatarEmoteCommandPropagationSystem : BaseUnityLoopSystem { - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; - public AvatarEmoteCommandPropagationSystem(World world, IEmoteCache emoteCache) : base(world) + public AvatarEmoteCommandPropagationSystem(World world, IEmoteStorage emoteStorage) : base(world) { - this.emoteCache = emoteCache; + this.emoteStorage = emoteStorage; } protected override void Update(float t) @@ -40,7 +41,7 @@ private void UpdateEmoteCommandDataComponent(PlayerCRDTEntity playerCRDTEntity, if (!componentFound) emoteCommandComponent = new AvatarEmoteCommandComponent(); - if (emoteCache.TryGetEmote(emoteIntent.EmoteId.Shorten(), out IEmote emote)) + if (emoteStorage.TryGetElement(emoteIntent.EmoteId.Shorten(), out IEmote emote)) { emoteCommandComponent.IsDirty = true; emoteCommandComponent.PlayingEmote = emoteIntent.EmoteId; diff --git a/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerCRDTEntitiesHandlerSystem.cs b/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerCRDTEntitiesHandlerSystem.cs index e291c4381f..d17e52a1ca 100644 --- a/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerCRDTEntitiesHandlerSystem.cs +++ b/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerCRDTEntitiesHandlerSystem.cs @@ -1,10 +1,12 @@ using Arch.Core; using Arch.System; using Arch.SystemGroups; +using Arch.SystemGroups.DefaultSystemGroups; using CRDT; using CrdtEcsBridge.Components; using DCL.Character.Components; using DCL.Diagnostics; +using DCL.Multiplayer.Profiles.Systems; using DCL.Multiplayer.SDK.Components; using DCL.Profiles; using ECS.Abstract; @@ -17,8 +19,8 @@ namespace DCL.Multiplayer.SDK.Systems.GlobalWorld { // Currently implemented to track reserved entities only on the CURRENT SCENE - [UpdateInGroup(typeof(SyncedPreRenderingSystemGroup))] - [UpdateBefore(typeof(CleanUpGroup))] + [UpdateInGroup(typeof(PresentationSystemGroup))] + [UpdateAfter(typeof(MultiplayerProfilesSystem))] [LogCategory(ReportCategory.PLAYER_SDK_DATA)] public partial class PlayerCRDTEntitiesHandlerSystem : BaseUnityLoopSystem { diff --git a/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerProfileDataPropagationSystem.cs b/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerProfileDataPropagationSystem.cs index 93b5a86d6e..1f5c3cce07 100644 --- a/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerProfileDataPropagationSystem.cs +++ b/Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerProfileDataPropagationSystem.cs @@ -1,6 +1,7 @@ using Arch.Core; using Arch.System; using Arch.SystemGroups; +using Arch.SystemGroups.DefaultSystemGroups; using DCL.Character.Components; using DCL.Diagnostics; using DCL.Multiplayer.SDK.Components; @@ -12,9 +13,8 @@ namespace DCL.Multiplayer.SDK.Systems.GlobalWorld { - [UpdateInGroup(typeof(SyncedPreRenderingSystemGroup))] + [UpdateInGroup(typeof(PresentationSystemGroup))] [UpdateAfter(typeof(PlayerCRDTEntitiesHandlerSystem))] - [UpdateBefore(typeof(CleanUpGroup))] [LogCategory(ReportCategory.PLAYER_SDK_DATA)] public partial class PlayerProfileDataPropagationSystem : BaseUnityLoopSystem { diff --git a/Explorer/Assets/DCL/Multiplayer/SDK/Tests/AvatarEmoteCommandPropagationSystemShould.cs b/Explorer/Assets/DCL/Multiplayer/SDK/Tests/AvatarEmoteCommandPropagationSystemShould.cs index 74da8ef4a9..f48dfdc15e 100644 --- a/Explorer/Assets/DCL/Multiplayer/SDK/Tests/AvatarEmoteCommandPropagationSystemShould.cs +++ b/Explorer/Assets/DCL/Multiplayer/SDK/Tests/AvatarEmoteCommandPropagationSystemShould.cs @@ -20,7 +20,7 @@ public class AvatarEmoteCommandPropagationSystemShould : UnitySystemTestBase(); emote2.IsLooping().Returns(false); - emoteCache.emotes.Clear(); - emoteCache.emotes.Add(emoteUrn1, emote1); - emoteCache.emotes.Add(emoteUrn2, emote2); + emoteStorage.emotes.Clear(); + emoteStorage.emotes.Add(emoteUrn1, emote1); + emoteStorage.emotes.Add(emoteUrn2, emote2); - system = new AvatarEmoteCommandPropagationSystem(world, emoteCache); + system = new AvatarEmoteCommandPropagationSystem(world, emoteStorage); playerCRDTEntity = new PlayerCRDTEntity( SpecialEntitiesID.OTHER_PLAYER_ENTITIES_FROM, @@ -75,7 +75,7 @@ public void PropagateEmoteCommandsCorrectly() Assert.IsTrue(sceneWorld.TryGet(playerCRDTEntity.SceneWorldEntity, out AvatarEmoteCommandComponent sceneEmoteCommand)); Assert.AreEqual(emoteIntent.EmoteId, sceneEmoteCommand.PlayingEmote); - Assert.AreEqual(emoteCache.emotes[emoteIntent.EmoteId].IsLooping(), sceneEmoteCommand.LoopingEmote); + Assert.AreEqual(emoteStorage.emotes[emoteIntent.EmoteId].IsLooping(), sceneEmoteCommand.LoopingEmote); // Update emote intent with different emote emoteIntent.EmoteId = emoteUrn2; @@ -85,7 +85,7 @@ public void PropagateEmoteCommandsCorrectly() Assert.IsTrue(sceneWorld.TryGet(playerCRDTEntity.SceneWorldEntity, out sceneEmoteCommand)); Assert.AreEqual(emoteIntent.EmoteId, sceneEmoteCommand.PlayingEmote); - Assert.AreEqual(emoteCache.emotes[emoteIntent.EmoteId].IsLooping(), sceneEmoteCommand.LoopingEmote); + Assert.AreEqual(emoteStorage.emotes[emoteIntent.EmoteId].IsLooping(), sceneEmoteCommand.LoopingEmote); } [Test] @@ -105,7 +105,7 @@ public void StopPropagationWithoutPlayerCRDTEntity() Assert.IsTrue(sceneWorld.TryGet(playerCRDTEntity.SceneWorldEntity, out AvatarEmoteCommandComponent sceneEmoteCommand)); Assert.AreEqual(emoteIntent.EmoteId, sceneEmoteCommand.PlayingEmote); - Assert.AreEqual(emoteCache.emotes[emoteIntent.EmoteId].IsLooping(), sceneEmoteCommand.LoopingEmote); + Assert.AreEqual(emoteStorage.emotes[emoteIntent.EmoteId].IsLooping(), sceneEmoteCommand.LoopingEmote); // Update emote intent with different emote + remove PlayerCRDTEntity emoteIntent.EmoteId = emoteUrn2; @@ -116,25 +116,25 @@ public void StopPropagationWithoutPlayerCRDTEntity() Assert.IsTrue(sceneWorld.TryGet(playerCRDTEntity.SceneWorldEntity, out sceneEmoteCommand)); Assert.AreNotEqual(emoteIntent.EmoteId, sceneEmoteCommand.PlayingEmote); - Assert.AreNotEqual(emoteCache.emotes[emoteIntent.EmoteId].IsLooping(), sceneEmoteCommand.LoopingEmote); + Assert.AreNotEqual(emoteStorage.emotes[emoteIntent.EmoteId].IsLooping(), sceneEmoteCommand.LoopingEmote); } - private class FakeEmoteCache : IEmoteCache + private class FakeEmoteStorage : IEmoteStorage { internal readonly Dictionary emotes = new (); - public bool TryGetEmote(URN urn, out IEmote emote) + public bool TryGetElement(URN urn, out IEmote element) { - if (!emotes.TryGetValue(urn, out emote)) return false; + if (!emotes.TryGetValue(urn, out element)) return false; return true; } - public void Set(URN urn, IEmote emote) + public void Set(URN urn, IEmote element) { throw new NotImplementedException(); } - public IEmote GetOrAddEmoteByDTO(EmoteDTO emoteDto, bool qualifiedForUnloading = true) => + public IEmote GetOrAddByDTO(EmoteDTO emoteDto, bool qualifiedForUnloading = true) => throw new NotImplementedException(); public void Unload(IPerformanceBudget frameTimeBudget) diff --git a/Explorer/Assets/DCL/Multiplayer/SDK/Tests/PlayerCRDTEntitiesHandlerSystemShould.cs b/Explorer/Assets/DCL/Multiplayer/SDK/Tests/PlayerCRDTEntitiesHandlerSystemShould.cs index 1f9bf499e8..ebe6d02604 100644 --- a/Explorer/Assets/DCL/Multiplayer/SDK/Tests/PlayerCRDTEntitiesHandlerSystemShould.cs +++ b/Explorer/Assets/DCL/Multiplayer/SDK/Tests/PlayerCRDTEntitiesHandlerSystemShould.cs @@ -21,7 +21,7 @@ namespace DCL.Multiplayer.SDK.Tests public class PlayerCRDTEntitiesHandlerSystemShould : UnitySystemTestBase { private const string FAKE_USER_ID = "Ia4Ia5Cth0ulhu2Ftaghn2"; - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; private Entity entity; private Transform fakeCharacterUnityTransform; diff --git a/Explorer/Assets/DCL/Multiplayer/SDK/Tests/WriteAvatarEquippedDataSystemShould.cs b/Explorer/Assets/DCL/Multiplayer/SDK/Tests/WriteAvatarEquippedDataSystemShould.cs index 1c4469fd59..4e14c0c7f2 100644 --- a/Explorer/Assets/DCL/Multiplayer/SDK/Tests/WriteAvatarEquippedDataSystemShould.cs +++ b/Explorer/Assets/DCL/Multiplayer/SDK/Tests/WriteAvatarEquippedDataSystemShould.cs @@ -1,7 +1,7 @@ using Arch.Core; using CrdtEcsBridge.Components; using CrdtEcsBridge.ECSToCRDTWriter; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.ECSComponents; using DCL.Multiplayer.SDK.Components; @@ -10,7 +10,6 @@ using ECS.TestSuite; using NSubstitute; using NUnit.Framework; -using SceneRunner.Scene; using System; using WriteAvatarEquippedDataSystem = DCL.Multiplayer.SDK.Systems.SceneWorld.WriteAvatarEquippedDataSystem; diff --git a/Explorer/Assets/DCL/Navmap/Assets/DestinationInfoElement.prefab b/Explorer/Assets/DCL/Navmap/Assets/DestinationInfoElement.prefab index c90282c2be..cd0d8b5cbe 100644 --- a/Explorer/Assets/DCL/Navmap/Assets/DestinationInfoElement.prefab +++ b/Explorer/Assets/DCL/Navmap/Assets/DestinationInfoElement.prefab @@ -107,10 +107,10 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: k__BackingField: {fileID: 4125819755117044877} - k__BackingField: {fileID: 7293302873017058572} - k__BackingField: {fileID: 1892149973350214017} - k__BackingField: {fileID: 6166036654044292692} - k__BackingField: {fileID: 348836738526587184} + <PinImage>k__BackingField: {fileID: 7293302873017058572} + <PinIcon>k__BackingField: {fileID: 1892149973350214017} + <PlaceIcon>k__BackingField: {fileID: 6166036654044292692} + <Title>k__BackingField: {fileID: 348836738526587184} --- !u!1 &1892149973350214017 GameObject: m_ObjectHideFlags: 0 @@ -417,7 +417,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: QUIT + m_text: EXIT m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} @@ -450,7 +450,7 @@ MonoBehaviour: m_enableAutoSizing: 0 m_fontSizeMin: 18 m_fontSizeMax: 72 - m_fontStyle: 0 + m_fontStyle: 16 m_HorizontalAlignment: 2 m_VerticalAlignment: 512 m_textAlignment: 65535 @@ -503,7 +503,7 @@ GameObject: - component: {fileID: 2544494209154404098} - component: {fileID: 5107106160751527823} m_Layer: 5 - m_Name: QuitButton + m_Name: ExitButton m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1000,7 +1000,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 0} + m_Sprite: {fileID: 21300000, guid: a98b57eed8453f04c8b749ee44056726, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/Explorer/Assets/DCL/Navmap/Assets/FloatingPanel.prefab b/Explorer/Assets/DCL/Navmap/Assets/FloatingPanel.prefab index cb25d12d25..65d77a0e60 100644 --- a/Explorer/Assets/DCL/Navmap/Assets/FloatingPanel.prefab +++ b/Explorer/Assets/DCL/Navmap/Assets/FloatingPanel.prefab @@ -126,7 +126,7 @@ GameObject: - component: {fileID: 4588740530084883101} - component: {fileID: 8050539859185499236} m_Layer: 5 - m_Name: SetAsDestinationButton + m_Name: StartNavigationButton m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -174,7 +174,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 0.1764706, b: 0.33333334, a: 1} + m_Color: {r: 1, g: 0.8980392, b: 0.91764706, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -286,7 +286,7 @@ GameObject: - component: {fileID: 6192634300972000165} - component: {fileID: 3082053440774315820} m_Layer: 5 - m_Name: RemoveDestinationButton + m_Name: ExitNavigationButton m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -465,7 +465,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 18, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &781564390554632752 @@ -496,7 +496,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: QUIT DESTINATION + m_text: exit navigation m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} m_sharedMaterial: {fileID: 8580627069436659679, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} @@ -529,7 +529,7 @@ MonoBehaviour: m_enableAutoSizing: 0 m_fontSizeMin: 18 m_fontSizeMax: 72 - m_fontStyle: 0 + m_fontStyle: 16 m_HorizontalAlignment: 2 m_VerticalAlignment: 512 m_textAlignment: 65535 @@ -869,7 +869,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 18, y: 0} + m_AnchoredPosition: {x: 14, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8732513762887711853 @@ -900,7 +900,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: SET DESTINATION + m_text: start navigation m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} m_sharedMaterial: {fileID: 8580627069436659679, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} @@ -909,8 +909,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4294769916 - m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + rgba: 4283772415 + m_fontColor: {r: 1, g: 0.1764706, b: 0.33333334, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -933,7 +933,7 @@ MonoBehaviour: m_enableAutoSizing: 0 m_fontSizeMin: 18 m_fontSizeMax: 72 - m_fontStyle: 0 + m_fontStyle: 16 m_HorizontalAlignment: 2 m_VerticalAlignment: 512 m_textAlignment: 65535 @@ -3299,10 +3299,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 703224478356600950} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 85.770004, y: -15} - m_SizeDelta: {x: 20, y: 20} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2776545587846399643 CanvasRenderer: @@ -4117,7 +4117,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 0.8980392, b: 0.91764706, a: 1} + m_Color: {r: 1, g: 0.1764706, b: 0.33333334, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -4385,7 +4385,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 18, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8954378760163436140 @@ -4416,7 +4416,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: QUIT DESTINATION + m_text: exit navigation m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} m_sharedMaterial: {fileID: 8580627069436659679, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} @@ -4449,7 +4449,7 @@ MonoBehaviour: m_enableAutoSizing: 0 m_fontSizeMin: 18 m_fontSizeMax: 72 - m_fontStyle: 0 + m_fontStyle: 16 m_HorizontalAlignment: 2 m_VerticalAlignment: 512 m_textAlignment: 65535 @@ -4502,7 +4502,7 @@ GameObject: - component: {fileID: 8270842507636032383} - component: {fileID: 5709161139298969929} m_Layer: 5 - m_Name: RemoveDestination + m_Name: ExitNavigation m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -4928,15 +4928,15 @@ MonoBehaviour: m_Calls: [] m_text: JUMP IN m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} - m_sharedMaterial: {fileID: 8580627069436659679, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} + m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4278190335 - m_fontColor: {r: 1, g: 0, b: 0, a: 1} + rgba: 4294769916 + m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -5531,10 +5531,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 703224478356600950} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -15} - m_SizeDelta: {x: 24, y: 24} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 24} m_Pivot: {x: 0, y: 0.5} --- !u!222 &7440721715820606642 CanvasRenderer: @@ -5626,10 +5626,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 703224478356600950} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 26, y: -15} - m_SizeDelta: {x: 35.77, y: 29} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 29} m_Pivot: {x: 0, y: 0.5} --- !u!222 &47943878561337394 CanvasRenderer: @@ -8016,7 +8016,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 18, y: 0} + m_AnchoredPosition: {x: 14, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6210768120284528043 @@ -8047,7 +8047,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: SET DESTINATION + m_text: start navigation m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} m_sharedMaterial: {fileID: 8580627069436659679, guid: df7484e24db0e46b081f24ec884a70cf, type: 2} @@ -8056,8 +8056,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4294769916 - m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + rgba: 4283772415 + m_fontColor: {r: 1, g: 0.1764706, b: 0.33333334, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -8080,7 +8080,7 @@ MonoBehaviour: m_enableAutoSizing: 0 m_fontSizeMin: 18 m_fontSizeMax: 72 - m_fontStyle: 0 + m_fontStyle: 16 m_HorizontalAlignment: 2 m_VerticalAlignment: 512 m_textAlignment: 65535 @@ -8115,7 +8115,7 @@ MonoBehaviour: m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 + m_hasFontAssetChanged: 1 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &7049975000226332516 @@ -8694,10 +8694,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 703224478356600950} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 68.770004, y: -15} - m_SizeDelta: {x: 10, y: 100} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8026308591178416971 CanvasRenderer: @@ -9153,7 +9153,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: MINI GAME + m_text: MINI-GAME m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} @@ -9344,10 +9344,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 703224478356600950} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 113.825005, y: -15} - m_SizeDelta: {x: 32.11, y: 29} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 29} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5989007666601268136 CanvasRenderer: @@ -9903,8 +9903,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -76, y: 0} - m_SizeDelta: {x: 24, y: 24} + m_AnchoredPosition: {x: -84, y: 0} + m_SizeDelta: {x: 17, y: 19} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &270033921334873042 CanvasRenderer: @@ -9927,14 +9927,14 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 0.1764706, b: 0.33333334, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 479c1fa50834d4504a321e03a5ccee10, type: 3} + m_Sprite: {fileID: 21300000, guid: 60eb8c8adba71cb4399ccc56421edc8d, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -9959,7 +9959,7 @@ GameObject: - component: {fileID: 8060354660888872662} - component: {fileID: 9216231986713976231} m_Layer: 5 - m_Name: SetAsDestination + m_Name: StartNavigation m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -10007,7 +10007,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 0.1764706, b: 0.33333334, a: 1} + m_Color: {r: 1, g: 0.8980392, b: 0.91764706, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -10350,7 +10350,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: c5f0f436601ac144a91a6d6d2e2a2677, type: 3} + m_Sprite: {fileID: 21300000, guid: 7ab972dad1b3340f891355f3f5cb30b0, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -10623,8 +10623,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -76, y: 0} - m_SizeDelta: {x: 24, y: 24} + m_AnchoredPosition: {x: -84, y: 0} + m_SizeDelta: {x: 17, y: 19} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1418760750585443247 CanvasRenderer: @@ -10647,7 +10647,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 0.1764706, b: 0.33333334, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 diff --git a/Explorer/Assets/DCL/Navmap/NavmapSearchBarController.cs b/Explorer/Assets/DCL/Navmap/NavmapSearchBarController.cs index dc62853678..75b5db34a7 100644 --- a/Explorer/Assets/DCL/Navmap/NavmapSearchBarController.cs +++ b/Explorer/Assets/DCL/Navmap/NavmapSearchBarController.cs @@ -23,7 +23,6 @@ public class NavmapSearchBarController : IDisposable private readonly SearchBarView view; private readonly IPlacesAPIService placesAPIService; - private readonly FloatingPanelView floatingPanelView; private readonly HistoryRecordPanelView historyRecordPanelView; private readonly SearchResultPanelController searchResultPanelController; private readonly IInputBlock inputBlock; @@ -46,7 +45,6 @@ public NavmapSearchBarController( this.view = view; this.historyRecordPanelView = historyRecordPanelView; this.placesAPIService = placesAPIService; - this.floatingPanelView = floatingPanelView; this.inputBlock = inputBlock; searchResultPanelController = new SearchResultPanelController(searchResultPanelView, webRequestController); @@ -116,11 +114,11 @@ private void OnSelectedSearchbarChange(bool isSelected) if (isSelected) { GetAndShowPreviousSearches(); - inputBlock.Disable(InputMapComponent.Kind.Shortcuts); + inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS); } else { - inputBlock.Enable(InputMapComponent.Kind.Shortcuts); + inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS); } } diff --git a/Explorer/Assets/DCL/NftInfoAPIService/NftInfoAPIService.asmdef b/Explorer/Assets/DCL/NftInfoAPIService/NftInfoAPIService.asmdef index 8bbc099164..563e5a0ed1 100644 --- a/Explorer/Assets/DCL/NftInfoAPIService/NftInfoAPIService.asmdef +++ b/Explorer/Assets/DCL/NftInfoAPIService/NftInfoAPIService.asmdef @@ -4,8 +4,8 @@ "references": [ "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", - "GUID:91cf8206af184dac8e30eb46747e9939" + "GUID:91cf8206af184dac8e30eb46747e9939", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/NftInfoAPIService/OpenSeaAPIClient.cs b/Explorer/Assets/DCL/NftInfoAPIService/OpenSeaAPIClient.cs index a064ec61d1..ca5f761ab3 100644 --- a/Explorer/Assets/DCL/NftInfoAPIService/OpenSeaAPIClient.cs +++ b/Explorer/Assets/DCL/NftInfoAPIService/OpenSeaAPIClient.cs @@ -26,7 +26,7 @@ public async UniTask<NftInfo> FetchNftInfoAsync(string chain, string contractAdd { var url = $"{baseURL}/api/v2/chain/{(string.IsNullOrEmpty(chain) ? DEFAULT_CHAIN : chain)}/contract/{contractAddress}/nfts/{tokenId}"; - OpenSeaNftResponse nftResponse = await webRequestController.GetAsync(url, ct, reportCategory: ReportCategory.NFT_INFO_WEB_REQUEST) + OpenSeaNftResponse nftResponse = await webRequestController.GetAsync(url, ct, ReportCategory.NFT_INFO_WEB_REQUEST) .CreateFromJson<OpenSeaNftResponse>(WRJsonParser.Unity, WRThreadFlags.SwitchToThreadPool); return ResponseToNftInfo(nftResponse.nft); diff --git a/Explorer/Assets/DCL/NftPrompt/NftPrompt.asmdef b/Explorer/Assets/DCL/NftPrompt/NftPrompt.asmdef index 281923c731..f2214cf137 100644 --- a/Explorer/Assets/DCL/NftPrompt/NftPrompt.asmdef +++ b/Explorer/Assets/DCL/NftPrompt/NftPrompt.asmdef @@ -9,7 +9,7 @@ "GUID:91cf8206af184dac8e30eb46747e9939", "GUID:166b65e6dfc848bb9fb075f53c293a38", "GUID:6395fcf60b5b4e33b418ab4e9388b270", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", "GUID:e169fa6683c924c7e99a85981a91d953", "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3" diff --git a/Explorer/Assets/AddressableAssetsData/Windows/addressables_content_state.bin.meta b/Explorer/Assets/DCL/Notifications/Animations.meta similarity index 67% rename from Explorer/Assets/AddressableAssetsData/Windows/addressables_content_state.bin.meta rename to Explorer/Assets/DCL/Notifications/Animations.meta index a12f8f3bde..816a4e875c 100644 --- a/Explorer/Assets/AddressableAssetsData/Windows/addressables_content_state.bin.meta +++ b/Explorer/Assets/DCL/Notifications/Animations.meta @@ -1,5 +1,6 @@ fileFormatVersion: 2 -guid: c519a12aa859d49409d59a86e9a6d4a9 +guid: e5260d04a54192b4d84fbb19981795e9 +folderAsset: yes DefaultImporter: externalObjects: {} userData: diff --git a/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationController.controller b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationController.controller new file mode 100644 index 0000000000..50397d6926 --- /dev/null +++ b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationController.controller @@ -0,0 +1,194 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1101 &-2367299463794636039 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: Hide + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 5097936261188300192} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_ExitTime: 0.75 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BadgeNotificationController + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: Show + m_Type: 9 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: Hide + m_Type: 9 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 4792446198846768681} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1101 &2369239000654847258 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: Show + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 8385463345638420775} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_ExitTime: 0 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1107 &4792446198846768681 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 8385463345638420775} + m_Position: {x: 300, y: 10, z: 0} + - serializedVersion: 1 + m_State: {fileID: 5097936261188300192} + m_Position: {x: 300, y: 150, z: 0} + - serializedVersion: 1 + m_State: {fileID: 7839850631817092266} + m_Position: {x: 30, y: 10, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: + - {fileID: 2369239000654847258} + - {fileID: -2367299463794636039} + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 570, y: 80, z: 0} + m_EntryPosition: {x: 50, y: 160, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 7839850631817092266} +--- !u!1102 &5097936261188300192 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BadgeNotificationHide + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 5476ca15f777e7f4590d33989c6428fe, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &7839850631817092266 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: InitialState + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 0} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &8385463345638420775 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BadgeNotificationShow + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 71c8631e663bcf44eaa08428e750cd4c, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: diff --git a/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationController.controller.meta b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationController.controller.meta new file mode 100644 index 0000000000..7d0905a26b --- /dev/null +++ b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationController.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35fe45688d751b54b8fbcca89c3b194a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationHide.anim b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationHide.anim new file mode 100644 index 0000000000..df886f77d8 --- /dev/null +++ b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationHide.anim @@ -0,0 +1,1640 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BadgeNotificationHide + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.81666666 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: ImageContainer/Rays + m_PositionCurves: [] + m_ScaleCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 1, y: 1, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.35 + value: {x: 1, y: 1, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.56666666 + value: {x: 1.5, y: 1.5, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.81666666 + value: {x: 0, y: 0, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: ImageContainer/Image + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 1, y: 1, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.35 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: ImageContainer/Rays + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 300 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 70 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_SizeDelta.x + path: + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: InfoContainer + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.56666666 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.56666666 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: ImageContainer + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_BlocksRaycasts + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Interactable + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.r + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.9945129 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0.9945129 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.g + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.7311321 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0.7311321 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.b + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.05 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.a + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.55 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.r + path: ImageContainer/Image + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.55 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.g + path: ImageContainer/Image + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.55 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.b + path: ImageContainer/Image + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.55 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.a + path: ImageContainer/Image + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: + classID: 225 + script: {fileID: 0} + flags: 0 + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 2877794235 + attribute: 3 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 3 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 1967290853 + script: {fileID: 0} + typeID: 224 + customType: 28 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3487046471 + attribute: 1574349066 + script: {fileID: 0} + typeID: 225 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3305885265 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 24 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 688381352 + attribute: 3305885265 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 24 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3739863151 + script: {fileID: 0} + typeID: 225 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 4287062452 + script: {fileID: 0} + typeID: 225 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 304273561 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 2877794235 + attribute: 304273561 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 2526845255 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 4215373228 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 2334886179 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 2877794235 + attribute: 2526845255 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 2877794235 + attribute: 4215373228 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 2877794235 + attribute: 2334886179 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 1574349066 + script: {fileID: 0} + typeID: 225 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.81666666 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 300 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 70 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_SizeDelta.x + path: + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: InfoContainer + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.56666666 + value: 1.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.x + path: ImageContainer/Image + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.56666666 + value: 1.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.y + path: ImageContainer/Image + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.56666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.z + path: ImageContainer/Image + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.56666666 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.56666666 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: ImageContainer + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_BlocksRaycasts + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Interactable + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.r + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.9945129 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0.9945129 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.g + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.7311321 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0.7311321 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.b + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.05 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.a + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.x + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.y + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.35 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.z + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.55 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.r + path: ImageContainer/Image + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.55 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.g + path: ImageContainer/Image + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.55 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.b + path: ImageContainer/Image + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.55 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.81666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.a + path: ImageContainer/Image + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: + classID: 225 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationHide.anim.meta b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationHide.anim.meta new file mode 100644 index 0000000000..f0b5557bd3 --- /dev/null +++ b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationHide.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5476ca15f777e7f4590d33989c6428fe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationShow.anim b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationShow.anim new file mode 100644 index 0000000000..23b4092beb --- /dev/null +++ b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationShow.anim @@ -0,0 +1,1330 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BadgeNotificationShow + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 360} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 3.8333333 + value: {x: 0, y: 0, z: 0} + inSlope: {x: -0, y: -0, z: -93.91305} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: ImageContainer/Rays + m_PositionCurves: [] + m_ScaleCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 1.25, y: 1.25, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: -1.25, y: 1.25, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 1.25, y: 1.25, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.51666665 + value: {x: -1.25, y: 1.25, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.68333334 + value: {x: 1.25, y: 1.25, z: 1} + inSlope: {x: 4.615384, y: 0, z: 0} + outSlope: {x: 4.615384, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.73333335 + value: {x: 1.5, y: 1.5, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.85 + value: {x: 1, y: 1, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: ImageContainer/Image + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 70 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.73333335 + value: 70 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0666667 + value: 305 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.1166667 + value: 300 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6333333 + value: 300 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_SizeDelta.x + path: + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.73333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.98333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0666667 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: InfoContainer + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.73333335 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.73333335 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.73333335 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: ImageContainer + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Interactable + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_BlocksRaycasts + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.r + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.9945129 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.9945129 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.g + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.7311321 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.7311321 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.b + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.05 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.a + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 1328805810 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 2877794235 + attribute: 3 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 1967290853 + script: {fileID: 0} + typeID: 224 + customType: 28 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 3487046471 + attribute: 1574349066 + script: {fileID: 0} + typeID: 225 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 1574349066 + script: {fileID: 0} + typeID: 225 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3305885265 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 24 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 688381352 + attribute: 3305885265 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 24 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 4287062452 + script: {fileID: 0} + typeID: 225 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3739863151 + script: {fileID: 0} + typeID: 225 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 304273561 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 2526845255 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 4215373228 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1328805810 + attribute: 2334886179 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + typeID: 114 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 3.8333333 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 70 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.73333335 + value: 70 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0666667 + value: 305 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.1166667 + value: 300 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6333333 + value: 300 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_SizeDelta.x + path: + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.73333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.98333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0666667 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: InfoContainer + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: -1.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 1.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.51666665 + value: -1.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.68333334 + value: 1.25 + inSlope: 4.615384 + outSlope: 4.615384 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.73333335 + value: 1.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.85 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.x + path: ImageContainer/Image + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 1.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 1.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.51666665 + value: 1.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.68333334 + value: 1.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.73333335 + value: 1.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.85 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.y + path: ImageContainer/Image + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.51666665 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.68333334 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.73333335 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.85 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.z + path: ImageContainer/Image + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.73333335 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.73333335 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.73333335 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: ImageContainer + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Interactable + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_BlocksRaycasts + path: + classID: 225 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.r + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.9945129 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.9945129 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.g + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.7311321 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.7311321 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.b + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.05 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.a + path: ImageContainer/Rays + classID: 114 + script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 5 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.8333333 + value: 0 + inSlope: -0 + outSlope: 0 + tangentMode: 5 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 5 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.8333333 + value: 0 + inSlope: -0 + outSlope: 0 + tangentMode: 5 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 360 + inSlope: 0 + outSlope: 0 + tangentMode: 5 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.8333333 + value: 0 + inSlope: -93.91305 + outSlope: 0 + tangentMode: 5 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: ImageContainer/Rays + classID: 224 + script: {fileID: 0} + flags: 0 + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationShow.anim.meta b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationShow.anim.meta new file mode 100644 index 0000000000..c224f6d993 --- /dev/null +++ b/Explorer/Assets/DCL/Notifications/Animations/BadgeNotificationShow.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71c8631e663bcf44eaa08428e750cd4c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Notifications/Assets/BadgeNotification.prefab b/Explorer/Assets/DCL/Notifications/Assets/BadgeNotification.prefab new file mode 100644 index 0000000000..917be96772 --- /dev/null +++ b/Explorer/Assets/DCL/Notifications/Assets/BadgeNotification.prefab @@ -0,0 +1,893 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1183573742988210697 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5205149831444567895} + - component: {fileID: 7411763781429158859} + - component: {fileID: 8963963145802325640} + m_Layer: 5 + m_Name: Rays + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5205149831444567895 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1183573742988210697} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6453045131677711501} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 118.1524, y: 118.1524} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7411763781429158859 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1183573742988210697} + m_CullTransparentMesh: 1 +--- !u!114 &8963963145802325640 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1183573742988210697} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.9945129, b: 0.7311321, a: 0.2} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 81c0b9e82309943a1b7021e344d7b498, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &1422102033003138835 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6453045131677711501} + - component: {fileID: 8712716655197153915} + - component: {fileID: 8831530963904364438} + m_Layer: 5 + m_Name: ImageContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6453045131677711501 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1422102033003138835} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5205149831444567895} + - {fileID: 2146118859290963525} + m_Father: {fileID: 4050682530458418937} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 35, y: 0} + m_SizeDelta: {x: 70, y: 70} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8712716655197153915 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1422102033003138835} + m_CullTransparentMesh: 1 +--- !u!114 &8831530963904364438 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1422102033003138835} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.4} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 99428d9ed6da74af2966fb29d960e48f, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4667238184254458745 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4545618519349280464} + - component: {fileID: 4615170998989422953} + m_Layer: 5 + m_Name: InfoContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4545618519349280464 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4667238184254458745} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8875010568228159393} + - {fileID: 8689528176378213943} + m_Father: {fileID: 4050682530458418937} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!225 &4615170998989422953 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4667238184254458745} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &7178520967365559533 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8875010568228159393} + - component: {fileID: 8191125385718764246} + - component: {fileID: 424608246588158360} + - component: {fileID: 8719158750957596609} + m_Layer: 5 + m_Name: Header + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8875010568228159393 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7178520967365559533} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4545618519349280464} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 90.83, y: -15} + m_SizeDelta: {x: -110.83, y: 16.95} + m_Pivot: {x: 0, y: 1} +--- !u!222 &8191125385718764246 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7178520967365559533} + m_CullTransparentMesh: 1 +--- !u!114 &424608246588158360 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7178520967365559533} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: New Badge Unlocked! + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294769916 + m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 10 + m_fontSizeMax: 16 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &8719158750957596609 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7178520967365559533} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 268 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &7481680332431707040 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2146118859290963525} + - component: {fileID: 8796820644064159916} + - component: {fileID: 4892434414598529079} + - component: {fileID: 5622998451195135033} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2146118859290963525 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7481680332431707040} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8913717324194330445} + m_Father: {fileID: 6453045131677711501} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8796820644064159916 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7481680332431707040} + m_CullTransparentMesh: 1 +--- !u!114 &4892434414598529079 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7481680332431707040} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1e79e296834574c5d9138852d94c8998, type: 3} + m_Name: + m_EditorClassIdentifier: + <LoadingObject>k__BackingField: {fileID: 5469965193453733915} + <Image>k__BackingField: {fileID: 5622998451195135033} +--- !u!114 &5622998451195135033 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7481680332431707040} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d2bc0e4246537449fbc27b863cc9b0c3, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7800424800755079134 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4050682530458418937} + - component: {fileID: 5077569758572735165} + - component: {fileID: 8681175226547209374} + - component: {fileID: 2412316919828016459} + - component: {fileID: 7885659905505203288} + - component: {fileID: 2617022527507825205} + - component: {fileID: 5121510011424875646} + - component: {fileID: 1648477382139895676} + m_Layer: 5 + m_Name: BadgeNotification + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4050682530458418937 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7800424800755079134} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6453045131677711501} + - {fileID: 4545618519349280464} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -8} + m_SizeDelta: {x: 300, y: 70} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5077569758572735165 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7800424800755079134} + m_CullTransparentMesh: 1 +--- !u!114 &8681175226547209374 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7800424800755079134} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 7f1e222745dc84d718dd2fe60ea44601, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 2 +--- !u!114 &2412316919828016459 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7800424800755079134} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 8681175226547209374} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &7885659905505203288 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7800424800755079134} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0411748e3bc14e1b94de3bf7ba4cadcc, type: 3} + m_Name: + m_EditorClassIdentifier: + <NormalColor>k__BackingField: {r: 1, g: 1, b: 1, a: 1} + <HoveredColor>k__BackingField: {r: 1, g: 1, b: 1, a: 1} + <Background>k__BackingField: {fileID: 8681175226547209374} + <MainButton>k__BackingField: {fileID: 2412316919828016459} + <HeaderText>k__BackingField: {fileID: 424608246588158360} + <TitleText>k__BackingField: {fileID: 6907517479909700943} + <NotificationImage>k__BackingField: {fileID: 4892434414598529079} + <NotificationAudio>k__BackingField: {fileID: 11400000, guid: 2f888b1c3f73f7641ad9f8712a8faacb, type: 2} +--- !u!225 &2617022527507825205 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7800424800755079134} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!114 &5121510011424875646 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7800424800755079134} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1cdc6c1a43024e58bcd05d3e69a19db4, type: 3} + m_Name: + m_EditorClassIdentifier: + <Button>k__BackingField: {fileID: 2412316919828016459} + <ButtonPressedAudio>k__BackingField: {fileID: 11400000, guid: cbbd6a003fc75e24da47c13feacd92c7, type: 2} + <ButtonHoverAudio>k__BackingField: {fileID: 11400000, guid: 59da234351971c0498a566fb811b0c36, type: 2} +--- !u!95 &1648477382139895676 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7800424800755079134} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 35fe45688d751b54b8fbcca89c3b194a, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 +--- !u!1 &9117319046981361715 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8689528176378213943} + - component: {fileID: 9161383647878193997} + - component: {fileID: 6907517479909700943} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8689528176378213943 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9117319046981361715} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4545618519349280464} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 90.83, y: -35} + m_SizeDelta: {x: -110.83, y: 16.95} + m_Pivot: {x: 0, y: 1} +--- !u!222 &9161383647878193997 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9117319046981361715} + m_CullTransparentMesh: 1 +--- !u!114 &6907517479909700943 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9117319046981361715} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Badge Name + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294769916 + m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 15.5 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 10 + m_fontSizeMax: 16 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1001 &7746890950816452242 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2146118859290963525} + m_Modifications: + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.x + value: 24 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.y + value: 24 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -336.96002 + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Name + value: LoadingSpinner + objectReference: {fileID: 0} + - target: {fileID: 4079747381299179907, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_CullTransparentMesh + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} +--- !u!1 &5469965193453733915 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 7746890950816452242} + m_PrefabAsset: {fileID: 0} +--- !u!224 &8913717324194330445 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 7746890950816452242} + m_PrefabAsset: {fileID: 0} diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/SystemMenu.prefab.meta b/Explorer/Assets/DCL/Notifications/Assets/BadgeNotification.prefab.meta similarity index 74% rename from Explorer/Assets/DCL/ExplorePanel/Assets/SystemMenu.prefab.meta rename to Explorer/Assets/DCL/Notifications/Assets/BadgeNotification.prefab.meta index 4bcfa56b00..f12eb4996e 100644 --- a/Explorer/Assets/DCL/ExplorePanel/Assets/SystemMenu.prefab.meta +++ b/Explorer/Assets/DCL/Notifications/Assets/BadgeNotification.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 79a00622173a201488c494bd7fe8e9c9 +guid: 92a863669989e814d8f7d887933c491e PrefabImporter: externalObjects: {} userData: diff --git a/Explorer/Assets/DCL/Notifications/Assets/Notification.prefab b/Explorer/Assets/DCL/Notifications/Assets/Notification.prefab index ef029f0a39..1651305132 100644 --- a/Explorer/Assets/DCL/Notifications/Assets/Notification.prefab +++ b/Explorer/Assets/DCL/Notifications/Assets/Notification.prefab @@ -11,8 +11,10 @@ GameObject: - component: {fileID: 6259150501965458249} - component: {fileID: 2926553331050430221} - component: {fileID: 1626829344947425582} + - component: {fileID: 5733177991484291323} - component: {fileID: 5639485393653299256} - component: {fileID: 5385067565377509253} + - component: {fileID: 3024536914856735182} m_Layer: 5 m_Name: Notification m_TagString: Untagged @@ -83,6 +85,50 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 2 +--- !u!114 &5733177991484291323 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 192176438896886382} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1626829344947425582} + m_OnClick: + m_PersistentCalls: + m_Calls: [] --- !u!114 &5639485393653299256 MonoBehaviour: m_ObjectHideFlags: 0 @@ -99,6 +145,7 @@ MonoBehaviour: <HoveredColor>k__BackingField: {r: 0.2627451, g: 0.2509804, b: 0.2901961, a: 1} <Background>k__BackingField: {fileID: 1626829344947425582} <UnreadImage>k__BackingField: {fileID: 927537932988240709} + <MainButton>k__BackingField: {fileID: 5733177991484291323} <CloseButton>k__BackingField: {fileID: 8672376375783097791} <HeaderText>k__BackingField: {fileID: 7714262123611153448} <TitleText>k__BackingField: {fileID: 3546159162021961983} @@ -118,6 +165,21 @@ CanvasGroup: m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 +--- !u!114 &3024536914856735182 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 192176438896886382} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1cdc6c1a43024e58bcd05d3e69a19db4, type: 3} + m_Name: + m_EditorClassIdentifier: + <Button>k__BackingField: {fileID: 5733177991484291323} + <ButtonPressedAudio>k__BackingField: {fileID: 11400000, guid: cbbd6a003fc75e24da47c13feacd92c7, type: 2} + <ButtonHoverAudio>k__BackingField: {fileID: 11400000, guid: 59da234351971c0498a566fb811b0c36, type: 2} --- !u!1 &412555183507639957 GameObject: m_ObjectHideFlags: 0 diff --git a/Explorer/Assets/DCL/Notifications/Assets/NotificationIcons.asset b/Explorer/Assets/DCL/Notifications/Assets/NotificationIcons.asset index 5326c76242..f533f8f2a9 100644 --- a/Explorer/Assets/DCL/Notifications/Assets/NotificationIcons.asset +++ b/Explorer/Assets/DCL/Notifications/Assets/NotificationIcons.asset @@ -19,4 +19,6 @@ MonoBehaviour: value: {fileID: 21300000, guid: de68e65bf4fba44b7a66667b1e4e3c6e, type: 3} - key: 25 value: {fileID: 21300000, guid: 479c1fa50834d4504a321e03a5ccee10, type: 3} + - key: 24 + value: {fileID: 21300000, guid: de68e65bf4fba44b7a66667b1e4e3c6e, type: 3} defaultIcon: {fileID: 21300000, guid: 51d0609124e474b04a9b42ec3746f089, type: 3} diff --git a/Explorer/Assets/DCL/Notifications/Assets/SystemNotification.prefab b/Explorer/Assets/DCL/Notifications/Assets/SystemNotification.prefab index 9d0f1de85a..75e7f5e852 100644 --- a/Explorer/Assets/DCL/Notifications/Assets/SystemNotification.prefab +++ b/Explorer/Assets/DCL/Notifications/Assets/SystemNotification.prefab @@ -32,9 +32,9 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 8119702378983369971} - - {fileID: 1567337761639426577} - {fileID: 532977441735110614} + - {fileID: 1567337761639426577} + - {fileID: 8119702378983369971} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} @@ -119,7 +119,7 @@ GameObject: - component: {fileID: 2253677054148134758} - component: {fileID: 7714262123611153448} m_Layer: 5 - m_Name: Header + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -141,8 +141,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 56, y: 0} - m_SizeDelta: {x: 248, y: 17} + m_AnchoredPosition: {x: 50, y: 0} + m_SizeDelta: {x: 251.1005, y: 17} m_Pivot: {x: 0, y: 0.5} --- !u!222 &2253677054148134758 CanvasRenderer: @@ -172,7 +172,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: You have arrived to your destination! + m_text: You have arrived at your destination! m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} @@ -199,10 +199,10 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 13.85 + m_fontSize: 14 m_fontSizeBase: 14 m_fontWeight: 400 - m_enableAutoSizing: 1 + m_enableAutoSizing: 0 m_fontSizeMin: 2.7 m_fontSizeMax: 18 m_fontStyle: 0 @@ -255,7 +255,7 @@ GameObject: - component: {fileID: 633330555449452040} - component: {fileID: 8437701962661918736} m_Layer: 5 - m_Name: NotificationTypeIcon + m_Name: Icon m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -419,7 +419,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8475624276520871504} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 diff --git a/Explorer/Assets/DCL/Notifications/NewNotification/Assets/NewNotificationPanel.prefab b/Explorer/Assets/DCL/Notifications/NewNotification/Assets/NewNotificationPanel.prefab index 573be25257..b80206f266 100644 --- a/Explorer/Assets/DCL/Notifications/NewNotification/Assets/NewNotificationPanel.prefab +++ b/Explorer/Assets/DCL/Notifications/NewNotification/Assets/NewNotificationPanel.prefab @@ -33,6 +33,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 9205112176156293854} + - {fileID: 1965560232080555820} - {fileID: 4888044441856789591} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -122,6 +123,9 @@ MonoBehaviour: <SystemNotificationView>k__BackingField: {fileID: 2756203457719045944} <NotificationViewCanvasGroup>k__BackingField: {fileID: 7194573606636815890} <SystemNotificationViewCanvasGroup>k__BackingField: {fileID: 6895768416379236507} + <BadgeNotificationView>k__BackingField: {fileID: 5629083052765123981} + <BadgeNotificationAnimator>k__BackingField: {fileID: 3859982495217344169} + <BadgeNotificationViewCanvasGroup>k__BackingField: {fileID: 513534390762832864} --- !u!1001 &1515789743012030238 PrefabInstance: m_ObjectHideFlags: 0 @@ -252,6 +256,141 @@ CanvasGroup: m_CorrespondingSourceObject: {fileID: 5385067565377509253, guid: cd53b7850e9a24fad8f0657ced07e48e, type: 3} m_PrefabInstance: {fileID: 1515789743012030238} m_PrefabAsset: {fileID: 0} +--- !u!1001 &2554096041101165013 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 428697825193278855} + m_Modifications: + - target: {fileID: 2617022527507825205, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_Alpha + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2617022527507825205, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_Interactable + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2617022527507825205, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_BlocksRaycasts + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_SizeDelta.x + value: 300 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_SizeDelta.y + value: 70 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_AnchoredPosition.y + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7800424800755079134, guid: 92a863669989e814d8f7d887933c491e, type: 3} + propertyPath: m_Name + value: BadgeNotification + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 92a863669989e814d8f7d887933c491e, type: 3} +--- !u!225 &513534390762832864 stripped +CanvasGroup: + m_CorrespondingSourceObject: {fileID: 2617022527507825205, guid: 92a863669989e814d8f7d887933c491e, type: 3} + m_PrefabInstance: {fileID: 2554096041101165013} + m_PrefabAsset: {fileID: 0} +--- !u!224 &1965560232080555820 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4050682530458418937, guid: 92a863669989e814d8f7d887933c491e, type: 3} + m_PrefabInstance: {fileID: 2554096041101165013} + m_PrefabAsset: {fileID: 0} +--- !u!95 &3859982495217344169 stripped +Animator: + m_CorrespondingSourceObject: {fileID: 1648477382139895676, guid: 92a863669989e814d8f7d887933c491e, type: 3} + m_PrefabInstance: {fileID: 2554096041101165013} + m_PrefabAsset: {fileID: 0} +--- !u!114 &5629083052765123981 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7885659905505203288, guid: 92a863669989e814d8f7d887933c491e, type: 3} + m_PrefabInstance: {fileID: 2554096041101165013} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0411748e3bc14e1b94de3bf7ba4cadcc, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &2982465942076838295 PrefabInstance: m_ObjectHideFlags: 0 @@ -316,6 +455,22 @@ PrefabInstance: propertyPath: m_BlocksRaycasts value: 0 objectReference: {fileID: 0} + - target: {fileID: 5639485393653299256, guid: 1c5c866a014f04911bbd4469d35b92a6, type: 3} + propertyPath: <NormalColor>k__BackingField.a + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5639485393653299256, guid: 1c5c866a014f04911bbd4469d35b92a6, type: 3} + propertyPath: <NormalColor>k__BackingField.b + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5639485393653299256, guid: 1c5c866a014f04911bbd4469d35b92a6, type: 3} + propertyPath: <NormalColor>k__BackingField.g + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5639485393653299256, guid: 1c5c866a014f04911bbd4469d35b92a6, type: 3} + propertyPath: <NormalColor>k__BackingField.r + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6259150501965458249, guid: 1c5c866a014f04911bbd4469d35b92a6, type: 3} propertyPath: m_Pivot.x value: 0.5 diff --git a/Explorer/Assets/DCL/Notifications/NewNotification/NewNotificationController.cs b/Explorer/Assets/DCL/Notifications/NewNotification/NewNotificationController.cs index fb73ea07d5..337d7ec7a7 100644 --- a/Explorer/Assets/DCL/Notifications/NewNotification/NewNotificationController.cs +++ b/Explorer/Assets/DCL/Notifications/NewNotification/NewNotificationController.cs @@ -16,7 +16,10 @@ namespace DCL.Notifications.NewNotification { public class NewNotificationController : ControllerBase<NewNotificationView> { + private static readonly int SHOW_BADGE_TRIGGER = Animator.StringToHash("Show"); + private static readonly int HIDE_BADGE_TRIGGER = Animator.StringToHash("Hide"); private const float ANIMATION_DURATION = 0.5f; + private const float TIME_BEFORE_HIDE_NOTIFICATION = 5f; private readonly INotificationsBusController notificationsBusController; private readonly NotificationIconTypes notificationIconTypes; @@ -25,8 +28,9 @@ public class NewNotificationController : ControllerBase<NewNotificationView> private readonly Queue<INotification> notificationQueue = new (); private bool isDisplaying; private ImageController thumbnailImageController; + private ImageController badgeThumbnailImageController; private CancellationTokenSource cts; - public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Persistent; + public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Overlay; public NewNotificationController( ViewFactoryMethod viewFactory, @@ -40,19 +44,19 @@ IWebRequestController webRequestController this.notificationIconTypes = notificationIconTypes; this.rarityBackgroundMapping = rarityBackgroundMapping; this.webRequestController = webRequestController; - notificationsBusController.SubscribeToNotificationTypeReceived(NotificationType.REWARD_ASSIGNMENT, QueueNewNotification); - notificationsBusController.SubscribeToNotificationTypeReceived(NotificationType.EVENTS_STARTED, QueueNewNotification); - notificationsBusController.SubscribeToNotificationTypeReceived(NotificationType.INTERNAL_ARRIVED_TO_DESTINATION, QueueNewNotification); + notificationsBusController.SubscribeToAllNotificationTypesReceived(QueueNewNotification); cts = new CancellationTokenSource(); cts.Token.ThrowIfCancellationRequested(); } protected override void OnViewInstantiated() { - thumbnailImageController = new ImageController(viewInstance.NotificationView.NotificationImage, webRequestController); + thumbnailImageController = new ImageController(viewInstance!.NotificationView.NotificationImage, webRequestController); viewInstance.NotificationView.NotificationClicked += ClickedNotification; viewInstance.NotificationView.CloseButton.onClick.AddListener(StopAnimation); viewInstance.SystemNotificationView.CloseButton.onClick.AddListener(StopAnimation); + badgeThumbnailImageController = new ImageController(viewInstance.BadgeNotificationView.NotificationImage, webRequestController); + viewInstance.BadgeNotificationView.NotificationClicked += ClickedNotification; } private void StopAnimation() @@ -62,10 +66,10 @@ private void StopAnimation() cts.Token.ThrowIfCancellationRequested(); } - private void ClickedNotification(NotificationType notificationType, string _) + private void ClickedNotification(NotificationType notificationType, INotification notification) { StopAnimation(); - notificationsBusController.ClickNotification(notificationType); + notificationsBusController.ClickNotification(notificationType, notification); } private void QueueNewNotification(INotification newNotification) @@ -77,6 +81,9 @@ private void QueueNewNotification(INotification newNotification) private async UniTaskVoid DisplayNewNotificationAsync() { + if (viewInstance == null) + return; + while (notificationQueue.Count > 0) { isDisplaying = true; @@ -87,6 +94,9 @@ private async UniTaskVoid DisplayNewNotificationAsync() case NotificationType.INTERNAL_ARRIVED_TO_DESTINATION: await ProcessArrivedNotificationAsync(notification); break; + case NotificationType.BADGE_GRANTED: + await ProcessBadgeNotificationAsync(notification); + break; default: await ProcessDefaultNotificationAsync(notification); break; @@ -98,7 +108,7 @@ private async UniTaskVoid DisplayNewNotificationAsync() private async UniTask ProcessArrivedNotificationAsync(INotification notification) { - viewInstance.SystemNotificationView.HeaderText.text = notification.GetHeader(); + viewInstance!.SystemNotificationView.HeaderText.text = notification.GetHeader(); viewInstance.SystemNotificationView.NotificationType = notification.Type; viewInstance.SystemNotificationView.NotificationTypeImage.sprite = notificationIconTypes.GetNotificationIcon(notification.Type); @@ -107,9 +117,10 @@ private async UniTask ProcessArrivedNotificationAsync(INotification notification private async UniTask ProcessDefaultNotificationAsync(INotification notification) { - viewInstance.NotificationView.HeaderText.text = notification.GetHeader(); + viewInstance!.NotificationView.HeaderText.text = notification.GetHeader(); viewInstance.NotificationView.TitleText.text = notification.GetTitle(); viewInstance.NotificationView.NotificationType = notification.Type; + viewInstance.NotificationView.Notification = notification; ProcessCustomMetadata(notification); if(!string.IsNullOrEmpty(notification.GetThumbnail())) thumbnailImageController.RequestImage(notification.GetThumbnail(), true); @@ -119,6 +130,19 @@ private async UniTask ProcessDefaultNotificationAsync(INotification notification await AnimateNotificationCanvasGroupAsync(viewInstance.NotificationViewCanvasGroup); } + private async UniTask ProcessBadgeNotificationAsync(INotification notification) + { + viewInstance!.BadgeNotificationView.HeaderText.text = notification.GetHeader(); + viewInstance.BadgeNotificationView.TitleText.text = notification.GetTitle(); + viewInstance.BadgeNotificationView.NotificationType = notification.Type; + viewInstance.BadgeNotificationView.Notification = notification; + + if(!string.IsNullOrEmpty(notification.GetThumbnail())) + badgeThumbnailImageController.RequestImage(notification.GetThumbnail(), true, true); + + await AnimateBadgeNotificationAsync(); + } + private void ProcessCustomMetadata(INotification notification) { switch (notification) @@ -136,7 +160,7 @@ private async UniTask AnimateNotificationCanvasGroupAsync(CanvasGroup notificati notificationCanvasGroup.interactable = true; notificationCanvasGroup.blocksRaycasts = true; await notificationCanvasGroup.DOFade(1, ANIMATION_DURATION).ToUniTask(cancellationToken: cts.Token); - await UniTask.Delay(TimeSpan.FromSeconds(3), cancellationToken: cts.Token); + await UniTask.Delay(TimeSpan.FromSeconds(TIME_BEFORE_HIDE_NOTIFICATION), cancellationToken: cts.Token); } catch (OperationCanceledException) { @@ -149,6 +173,24 @@ private async UniTask AnimateNotificationCanvasGroupAsync(CanvasGroup notificati } } + private async UniTask AnimateBadgeNotificationAsync() + { + if (viewInstance == null) + return; + + try + { + viewInstance.BadgeNotificationView.PlayNotificationAudio(); + viewInstance.BadgeNotificationAnimator.SetTrigger(SHOW_BADGE_TRIGGER); + await UniTask.Delay(TimeSpan.FromSeconds(TIME_BEFORE_HIDE_NOTIFICATION), cancellationToken: cts.Token); + } + catch (OperationCanceledException) { } + finally + { + viewInstance.BadgeNotificationAnimator.SetTrigger(HIDE_BADGE_TRIGGER); + } + } + protected override UniTask WaitForCloseIntentAsync(CancellationToken ct) => UniTask.Never(ct); } diff --git a/Explorer/Assets/DCL/Notifications/NewNotification/NewNotificationView.cs b/Explorer/Assets/DCL/Notifications/NewNotification/NewNotificationView.cs index e9edec1c6c..a74718d00b 100644 --- a/Explorer/Assets/DCL/Notifications/NewNotification/NewNotificationView.cs +++ b/Explorer/Assets/DCL/Notifications/NewNotification/NewNotificationView.cs @@ -17,5 +17,14 @@ public class NewNotificationView : ViewBase, IView [field: SerializeField] public CanvasGroup SystemNotificationViewCanvasGroup { get; private set; } + + [field: SerializeField] + public BadgeNotificationView BadgeNotificationView { get; private set; } + + [field: SerializeField] + public Animator BadgeNotificationAnimator { get; private set; } + + [field: SerializeField] + public CanvasGroup BadgeNotificationViewCanvasGroup { get; private set; } } } diff --git a/Explorer/Assets/DCL/Notifications/NotificationEntry/BadgeNotificationView.cs b/Explorer/Assets/DCL/Notifications/NotificationEntry/BadgeNotificationView.cs new file mode 100644 index 0000000000..b780243b42 --- /dev/null +++ b/Explorer/Assets/DCL/Notifications/NotificationEntry/BadgeNotificationView.cs @@ -0,0 +1,60 @@ +using DCL.Audio; +using DCL.NotificationsBusController.NotificationTypes; +using DCL.UI; +using System; +using TMPro; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +namespace DCL.Notifications.NotificationEntry +{ + public class BadgeNotificationView : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler + { + public event Action<NotificationType, INotification> NotificationClicked; + public NotificationType NotificationType { get; set; } + public INotification Notification { get; set; } + + [field: SerializeField] + public Color NormalColor { get; private set; } + + [field: SerializeField] + public Color HoveredColor { get; private set; } + + [field: SerializeField] + public Image Background { get; private set; } + + [field: SerializeField] + public Button MainButton { get; private set; } + + [field: SerializeField] + public TMP_Text HeaderText { get; private set; } + + [field: SerializeField] + public TMP_Text TitleText { get; private set; } + + [field: SerializeField] + public ImageView NotificationImage { get; private set; } + + [field: SerializeField] + public AudioClipConfig NotificationAudio { get; private set; } + + private void Start() + { + Background.color = NormalColor; + MainButton.onClick.AddListener(() => NotificationClicked?.Invoke(NotificationType, Notification)); + } + + private void OnDestroy() => + MainButton.onClick.RemoveAllListeners(); + + public void OnPointerEnter(PointerEventData eventData) => + Background.color = HoveredColor; + + public void OnPointerExit(PointerEventData eventData) => + Background.color = NormalColor; + + public void PlayNotificationAudio() => + UIAudioEventsBus.Instance.SendPlayAudioEvent(NotificationAudio); + } +} diff --git a/Explorer/Assets/DCL/Notifications/NotificationEntry/BadgeNotificationView.cs.meta b/Explorer/Assets/DCL/Notifications/NotificationEntry/BadgeNotificationView.cs.meta new file mode 100644 index 0000000000..34ae963723 --- /dev/null +++ b/Explorer/Assets/DCL/Notifications/NotificationEntry/BadgeNotificationView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0411748e3bc14e1b94de3bf7ba4cadcc +timeCreated: 1725288666 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Notifications/NotificationEntry/NotificationView.cs b/Explorer/Assets/DCL/Notifications/NotificationEntry/NotificationView.cs index f5395177e8..4218b841c6 100644 --- a/Explorer/Assets/DCL/Notifications/NotificationEntry/NotificationView.cs +++ b/Explorer/Assets/DCL/Notifications/NotificationEntry/NotificationView.cs @@ -8,11 +8,11 @@ namespace DCL.Notifications.NotificationEntry { - public class NotificationView : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler + public class NotificationView : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler { - public event Action<NotificationType, string> NotificationClicked; + public event Action<NotificationType, INotification> NotificationClicked; public NotificationType NotificationType { get; set; } - public string NotificationId { get; set; } + public INotification Notification { get; set; } [field: SerializeField] public Color NormalColor { get; private set; } @@ -26,6 +26,9 @@ public class NotificationView : MonoBehaviour, IPointerClickHandler, IPointerEnt [field: SerializeField] public GameObject UnreadImage { get; private set; } + [field: SerializeField] + public Button MainButton { get; private set; } + [field: SerializeField] public Button CloseButton { get; private set; } @@ -50,11 +53,14 @@ public class NotificationView : MonoBehaviour, IPointerClickHandler, IPointerEnt private void Start() { Background.color = NormalColor; + + MainButton.onClick.RemoveAllListeners(); + MainButton.onClick.AddListener(OnPointerClick); } - public void OnPointerClick(PointerEventData eventData) + private void OnPointerClick() { - NotificationClicked?.Invoke(NotificationType, NotificationId); + NotificationClicked?.Invoke(NotificationType, Notification); } public void OnPointerEnter(PointerEventData eventData) diff --git a/Explorer/Assets/DCL/Notifications/Notifications.asmdef b/Explorer/Assets/DCL/Notifications/Notifications.asmdef index d14ba11286..e8f0683819 100644 --- a/Explorer/Assets/DCL/Notifications/Notifications.asmdef +++ b/Explorer/Assets/DCL/Notifications/Notifications.asmdef @@ -20,7 +20,9 @@ "GUID:828002f0a2864c3cbbca4d1de01c7455", "GUID:6830e2f56251b492e9934f1fafbc8c7d", "GUID:91cf8206af184dac8e30eb46747e9939", - "GUID:a327cdd867b4c134c92b67c566c92ad7" + "GUID:a327cdd867b4c134c92b67c566c92ad7", + "GUID:e7751264a6735a942a64770d71eb49e0", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Notifications/NotificationsMenu/NotificationsMenuController.cs b/Explorer/Assets/DCL/Notifications/NotificationsMenu/NotificationsMenuController.cs index b23bc87506..d67e034b9f 100644 --- a/Explorer/Assets/DCL/Notifications/NotificationsMenu/NotificationsMenuController.cs +++ b/Explorer/Assets/DCL/Notifications/NotificationsMenu/NotificationsMenuController.cs @@ -1,6 +1,7 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; using DCL.Backpack; +using DCL.Diagnostics; using DCL.Notifications.NotificationEntry; using DCL.NotificationsBusController.NotificationsBus; using DCL.NotificationsBusController.NotificationTypes; @@ -55,6 +56,7 @@ public NotificationsMenuController( this.view.LoopList.InitListView(0, OnGetItemByIndex); this.view.CloseButton.onClick.AddListener(ClosePanel); InitialNotificationRequestAsync(lifeCycleCts.Token).Forget(); + notificationsBusController.SubscribeToAllNotificationTypesReceived(OnNotificationReceived); } public void Dispose() @@ -119,7 +121,7 @@ private void SetItemData(NotificationView notificationView, INotification notifi notificationView.HeaderText.text = notificationData.GetHeader(); notificationView.TitleText.text = notificationData.GetTitle(); notificationView.NotificationType = notificationData.Type; - notificationView.NotificationId = notificationData.Id; + notificationView.Notification = notificationData; notificationView.CloseButton.gameObject.SetActive(false); notificationView.UnreadImage.SetActive(!notificationData.Read); notificationView.TimeText.text = TimestampUtilities.GetRelativeTime(notificationData.Timestamp); @@ -140,9 +142,9 @@ private void ProcessCustomMetadata(INotification notification, NotificationView } } - private void ClickedNotification(NotificationType notificationType, string notificationId) + private void ClickedNotification(NotificationType notificationType, INotification notification) { - notificationsBusController.ClickNotification(notificationType); + notificationsBusController.ClickNotification(notificationType, notification); } private async UniTask LoadNotificationThumbnailAsync(NotificationView notificationView, INotification notificationData, @@ -152,11 +154,19 @@ private async UniTask LoadNotificationThumbnailAsync(NotificationView notificati new CommonArguments(URLAddress.FromString(notificationData.GetThumbnail())), new GetTextureArguments(false), GetTextureWebRequest.CreateTexture(TextureWrapMode.Clamp), - ct); + ct, + ReportCategory.UI); Sprite? thumbnailSprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), VectorUtilities.OneHalf, PIXELS_PER_UNIT, 0, SpriteMeshType.FullRect, Vector4.one, false); notificationThumbnailCache.Add(notificationData.Id, thumbnailSprite); notificationView.NotificationImage.SetImage(thumbnailSprite); } + + private void OnNotificationReceived(INotification notification) + { + notifications.Insert(0, notification); + view.LoopList.SetListItemCount(notifications.Count, false); + view.LoopList.RefreshAllShownItem(); + } } } diff --git a/Explorer/Assets/DCL/Notifications/NotificationsRequestController.cs b/Explorer/Assets/DCL/Notifications/NotificationsRequestController.cs index 86f237e8f9..9d1c7679b4 100644 --- a/Explorer/Assets/DCL/Notifications/NotificationsRequestController.cs +++ b/Explorer/Assets/DCL/Notifications/NotificationsRequestController.cs @@ -1,5 +1,6 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using DCL.Multiplayer.Connections.DecentralandUrls; using DCL.Notifications.Serialization; using DCL.NotificationsBusController.NotificationsBus; @@ -75,6 +76,7 @@ public async UniTask<List<INotification>> GetMostRecentNotificationsAsync(Cancel await webRequestController.GetAsync( commonArguments, ct, + ReportCategory.UI, signInfo: WebRequestSignInfo.NewFromRaw(string.Empty, commonArguments.URL, unixTimestamp, "get"), headersInfo: new WebRequestHeadersInfo().WithSign(string.Empty, unixTimestamp)) .CreateFromNewtonsoftJsonAsync<List<INotification>>(serializerSettings: SERIALIZER_SETTINGS); @@ -100,16 +102,19 @@ public async UniTask StartGettingNewNotificationsOverTimeAsync(CancellationToken commonArguments = new CommonArguments(urlBuilder.Build()); unixTimestamp = DateTime.UtcNow.UnixTimeAsMilliseconds(); - lastPolledTimestamp = DateTime.UtcNow.UnixTimeAsMilliseconds(); List<INotification> notifications = await webRequestController.GetAsync( commonArguments, ct, + ReportCategory.UI, signInfo: WebRequestSignInfo.NewFromRaw(string.Empty, commonArguments.URL, unixTimestamp, "get"), headersInfo: new WebRequestHeadersInfo().WithSign(string.Empty, unixTimestamp)) .CreateFromNewtonsoftJsonAsync<List<INotification>>(serializerSettings: SERIALIZER_SETTINGS); + if (notifications.Count > 0) + lastPolledTimestamp = DateTime.UtcNow.UnixTimeAsMilliseconds(); + await UniTask.WhenAll(notifications.Select(notification => { notificationsBusController.AddNotification(notification); @@ -133,8 +138,9 @@ public async UniTask SetNotificationAsReadAsync(string notificationId, Cancellat await webRequestController.PutAsync( commonArgumentsForSetRead, - WebRequests.GenericPutArguments.CreateJson(bodyBuilder.ToString()), + GenericPutArguments.CreateJson(bodyBuilder.ToString()), ct, + ReportCategory.UI, signInfo: WebRequestSignInfo.NewFromRaw(string.Empty, commonArgumentsForSetRead.URL, unixTimestamp, "put"), headersInfo: new WebRequestHeadersInfo().WithSign(string.Empty, unixTimestamp)) .WithNoOpAsync(); diff --git a/Explorer/Assets/DCL/Notifications/Serialization/NotificationJsonDtoConverter.cs b/Explorer/Assets/DCL/Notifications/Serialization/NotificationJsonDtoConverter.cs index f2c80c39c1..f67bcdb68e 100644 --- a/Explorer/Assets/DCL/Notifications/Serialization/NotificationJsonDtoConverter.cs +++ b/Explorer/Assets/DCL/Notifications/Serialization/NotificationJsonDtoConverter.cs @@ -41,6 +41,7 @@ public override List<INotification> ReadJson(JsonReader reader, Type objectType, "events_ended" => new EventEndedNotification(), "reward_assignment" => new RewardAssignedNotification(), "reward_in_progress" => new RewardInProgressNotification(), + "badge_granted" => new BadgeGrantedNotification(), _ => null }; diff --git a/Explorer/Assets/DCL/NotificationsBusController/NotificationTypes/BadgeGrantedNotification.cs b/Explorer/Assets/DCL/NotificationsBusController/NotificationTypes/BadgeGrantedNotification.cs new file mode 100644 index 0000000000..e80c500084 --- /dev/null +++ b/Explorer/Assets/DCL/NotificationsBusController/NotificationTypes/BadgeGrantedNotification.cs @@ -0,0 +1,37 @@ +using Newtonsoft.Json; +using System; + +namespace DCL.NotificationsBusController.NotificationTypes +{ + [Serializable] + public class BadgeGrantedNotification : NotificationBase + { + [JsonProperty("metadata")] + public BadgeGrantedNotificationMetadata Metadata { get; set; } + + public override string GetHeader() => + Metadata.Title; + + public override string GetTitle() => + Metadata.Description; + + public override string GetThumbnail() => + Metadata.Image; + } + + [Serializable] + public struct BadgeGrantedNotificationMetadata + { + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("title")] + public string Title { get; set; } + + [JsonProperty("description")] + public string Description { get; set; } + + [JsonProperty("image")] + public string Image { get; set; } + } +} diff --git a/Explorer/Assets/DCL/NotificationsBusController/NotificationTypes/BadgeGrantedNotification.cs.meta b/Explorer/Assets/DCL/NotificationsBusController/NotificationTypes/BadgeGrantedNotification.cs.meta new file mode 100644 index 0000000000..0eecba5c12 --- /dev/null +++ b/Explorer/Assets/DCL/NotificationsBusController/NotificationTypes/BadgeGrantedNotification.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fa664421a89d40518b7e58519eaeb5ce +timeCreated: 1724673067 \ No newline at end of file diff --git a/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus.asmdef b/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus.asmdef index c6155a3824..25c965725f 100644 --- a/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus.asmdef +++ b/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus.asmdef @@ -1,16 +1,17 @@ { - "name": "NotificationsBus", - "rootNamespace": "", - "references": [ - "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3" - ], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false + "name": "NotificationsBus", + "rootNamespace": "", + "references": [ + "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", + "GUID:fa7b3fdbb04d67549916da7bd2af58ab" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false } \ No newline at end of file diff --git a/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus/INotificationsBusController.cs b/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus/INotificationsBusController.cs index 5d50129267..9239a42a20 100644 --- a/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus/INotificationsBusController.cs +++ b/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus/INotificationsBusController.cs @@ -8,5 +8,7 @@ public interface INotificationsBusController void ClickNotification(NotificationType notificationType, params object[] parameters); void SubscribeToNotificationTypeClick(NotificationType desiredType, NotificationsBusController.NotificationClickedDelegate listener); void SubscribeToNotificationTypeReceived(NotificationType desiredType, NotificationsBusController.NotificationReceivedDelegate listener); + void SubscribeToAllNotificationTypesClick(NotificationsBusController.NotificationClickedDelegate listener); + void SubscribeToAllNotificationTypesReceived(NotificationsBusController.NotificationReceivedDelegate listener); } } diff --git a/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus/NotificationsBusController.cs b/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus/NotificationsBusController.cs index bacf088f57..5b77f325a4 100644 --- a/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus/NotificationsBusController.cs +++ b/Explorer/Assets/DCL/NotificationsBusController/NotificationsBus/NotificationsBusController.cs @@ -1,10 +1,14 @@ using DCL.NotificationsBusController.NotificationTypes; +using System; using System.Collections.Generic; +using Utility; namespace DCL.NotificationsBusController.NotificationsBus { public class NotificationsBusController : INotificationsBusController { + public static readonly IReadOnlyList<NotificationType> NOTIFICATION_TYPES = EnumUtils.Values<NotificationType>(); + public delegate void NotificationClickedDelegate(params object[] parameters); public delegate void NotificationReceivedDelegate(INotification notification); @@ -36,5 +40,27 @@ public void SubscribeToNotificationTypeReceived(NotificationType desiredType, No thisEvent += listener; notificationReceivedSubscribers[desiredType] = thisEvent; } + + public void SubscribeToAllNotificationTypesClick(NotificationClickedDelegate listener) + { + for (var i = 0; i < NOTIFICATION_TYPES.Count; i++) + { + NotificationType notificationType = (NotificationType)i; + notificationClickedSubscribers.TryGetValue(notificationType, out NotificationClickedDelegate thisEvent); + thisEvent += listener; + notificationClickedSubscribers[notificationType] = thisEvent; + } + } + + public void SubscribeToAllNotificationTypesReceived(NotificationReceivedDelegate listener) + { + for (var i = 0; i < NOTIFICATION_TYPES.Count; i++) + { + NotificationType notificationType = (NotificationType)i; + notificationReceivedSubscribers.TryGetValue(notificationType, out NotificationReceivedDelegate thisEvent); + thisEvent += listener; + notificationReceivedSubscribers[notificationType] = thisEvent; + } + } } } diff --git a/Explorer/Assets/DCL/ParcelsService/TeleportController.cs b/Explorer/Assets/DCL/ParcelsService/TeleportController.cs index eb194a7062..705fab7940 100644 --- a/Explorer/Assets/DCL/ParcelsService/TeleportController.cs +++ b/Explorer/Assets/DCL/ParcelsService/TeleportController.cs @@ -80,7 +80,7 @@ public void InvalidateRealm() { // Override parcel as it's a new target parcel = sceneDef.metadata.scene.DecodedBase; - Vector3 parcelBaseWorldPosition = ParcelMathHelper.GetPositionByParcelPosition(parcel); + Vector3 parcelBaseWorldPosition = GetPositionByParcelPositionWithErrorCompensation(parcel); targetWorldPosition = parcelBaseWorldPosition; List<SpawnPoint>? spawnPoints = sceneDef.metadata.spawnPoints; @@ -97,7 +97,7 @@ public void InvalidateRealm() } } else - targetWorldPosition = ParcelMathHelper.GetPositionByParcelPosition(parcel, true); + targetWorldPosition = GetPositionByParcelPositionWithErrorCompensation(parcel, true); await UniTask.Yield(PlayerLoopTiming.LastPostLateUpdate); @@ -120,6 +120,17 @@ public void InvalidateRealm() return new WaitForSceneReadiness(parcel, loadReport, sceneReadinessReportQueue); } + /// <summary> + /// Pulls position a little bit towards the center of the parcel to compensate a possible float error + /// that shifts position outside the parcel + /// </summary> + private static Vector3 GetPositionByParcelPositionWithErrorCompensation(Vector2Int parcel, bool adaptYPositionToTerrain = false) + { + const float EPSILON = 0.0001f; + + return ParcelMathHelper.GetPositionByParcelPosition(parcel, adaptYPositionToTerrain) + new Vector3(EPSILON, 0, EPSILON); + } + // TODO: this method should be removed, implies possible mantainance efforts and its only for debugging purposes public async UniTask TeleportToParcelAsync(Vector2Int parcel, AsyncLoadProcessReport loadReport, CancellationToken ct) { diff --git a/Explorer/Assets/DCL/Passport/Animations.meta b/Explorer/Assets/DCL/Passport/Animations.meta new file mode 100644 index 0000000000..ca2329b9c7 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7f3fda176539e664d8548b00a9119096 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewAnimator.controller b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewAnimator.controller new file mode 100644 index 0000000000..5cf76daf52 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewAnimator.controller @@ -0,0 +1,159 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1101 &-7016859057075441498 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: IsStopped + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 4018600358609368099} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_ExitTime: 0.75 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1107 &-3050064851476947909 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 2470599042862612359} + m_Position: {x: 120, y: 280, z: 0} + - serializedVersion: 1 + m_State: {fileID: 4018600358609368099} + m_Position: {x: 120, y: 390, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 2470599042862612359} +--- !u!1101 &-2832434620000130665 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: IsStopped + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 2470599042862612359} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_ExitTime: 0.75 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Badge3DPreviewAnimator + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: IsStopped + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: -3050064851476947909} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &2470599042862612359 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Badge3DPreviewIdle + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: -7016859057075441498} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 73ee27e2cc81c4c499c732a89adb137c, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &4018600358609368099 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Badge3DPreviewStopped + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: -2832434620000130665} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 671d9ada1bee5ff45bcb84bfb843aafa, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: diff --git a/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewAnimator.controller.meta b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewAnimator.controller.meta new file mode 100644 index 0000000000..a7c82d53c4 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewAnimator.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 33a971bb28d87914298f87968f21c529 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewIdle.anim b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewIdle.anim new file mode 100644 index 0000000000..b507f82512 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewIdle.anim @@ -0,0 +1,409 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Badge3DPreviewIdle + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: -10, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 3.9833333 + value: {x: 0, y: -9.996, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 10} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2 + value: {x: 0, y: 0.5, z: 10} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 3.9833333 + value: {x: 0, y: 0.00010359287, z: 10} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 3.9833333 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.9833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.9833333 + value: 0.00010359287 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 10 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2 + value: 10 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.9833333 + value: 10 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.9833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: + classID: 4 + script: {fileID: 0} + flags: 16 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -10 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.9833333 + value: -9.996 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: + classID: 4 + script: {fileID: 0} + flags: 16 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.9833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: + classID: 4 + script: {fileID: 0} + flags: 16 + m_EulerEditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewIdle.anim.meta b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewIdle.anim.meta new file mode 100644 index 0000000000..5ed7161523 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewIdle.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 73ee27e2cc81c4c499c732a89adb137c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewStopped.anim b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewStopped.anim new file mode 100644 index 0000000000..898c04dde4 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewStopped.anim @@ -0,0 +1,265 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Badge3DPreviewStopped + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 10} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: + classID: 4 + script: {fileID: 0} + flags: 16 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: + classID: 4 + script: {fileID: 0} + flags: 16 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: + classID: 4 + script: {fileID: 0} + flags: 16 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 10 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewStopped.anim.meta b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewStopped.anim.meta new file mode 100644 index 0000000000..fe269c8a0e --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Animations/Badge3DPreviewStopped.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 671d9ada1bee5ff45bcb84bfb843aafa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges.meta b/Explorer/Assets/DCL/Passport/Fields/Badges.meta new file mode 100644 index 0000000000..b1294f633b --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 67194f7c7e674a3f9eb51f0d2c674ebd +timeCreated: 1724169393 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeDetailCard_PassportFieldView.cs b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeDetailCard_PassportFieldView.cs new file mode 100644 index 0000000000..eb2b2e67d8 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeDetailCard_PassportFieldView.cs @@ -0,0 +1,165 @@ +using DCL.BadgesAPIService; +using DCL.UI; +using DCL.WebRequests; +using TMPro; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +namespace DCL.Passport.Fields.Badges +{ + public class BadgeDetailCard_PassportFieldView : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler + { + [field: SerializeField] + public RectTransform SubContainerTransform { get; private set; } + + [field: SerializeField] + public Image BackgroundImage { get; private set; } + + [field: SerializeField] + public Button Button { get; private set; } + + [field: SerializeField] + public GameObject NewMark { get; private set; } + + [field: SerializeField] + public ImageView BadgeImage { get; private set; } + + [field: SerializeField] + public Sprite DefaultBadgeSprite { get; private set; } + + [field: SerializeField] + public TMP_Text BadgeNameText { get; private set; } + + [field: SerializeField] + public GameObject SelectedOutline { get; private set; } + + [field: SerializeField] + public GameObject TopTierMark { get; private set; } + + [field: SerializeField] + public TMP_Text BadgeDateText { get; private set; } + + [field: SerializeField] + public GameObject NextTierTitle { get; private set; } + + [field: SerializeField] + public RectTransform ProgressBar { get; private set; } + + [field: SerializeField] + public RectTransform ProgressBarFill { get; private set; } + + [field: SerializeField] + public Color NormalBackgroundColor { get; private set; } + + [field: SerializeField] + public Color HoverBackgroundColor { get; private set; } + + [field: SerializeField] + public Color LockedBadgeImageColor { get; private set; } + + [field: SerializeField] + public Color NonLockedBadgeImageColor { get; private set; } + + public BadgeInfo Model { get; private set; } + + public bool IsSelected { get; private set; } + + private ImageController? imageController; + + public void ConfigureImageController(IWebRequestController webRequestController) + { + if (imageController != null) + return; + + imageController = new ImageController(BadgeImage, webRequestController); + } + + public void StopLoadingImage() => + imageController?.StopLoading(); + + public void SetInvisible(bool isInvisible) => + SubContainerTransform.gameObject.SetActive(!isInvisible); + + public void SetAsSelected(bool isSelected) + { + SelectedOutline.SetActive(isSelected); + IsSelected = isSelected; + } + + public void SetAsNew(bool isNew) => + NewMark.SetActive(isNew); + + public void Setup(in BadgeInfo badgeInfo, bool isOwnProfile) + { + Model = badgeInfo; + SetupBadgeName(badgeInfo); + SetupBadgeDate(badgeInfo, isOwnProfile); + SetupBadgeNextTier(badgeInfo, isOwnProfile); + SetupBadgeProgressBar(badgeInfo, isOwnProfile); + SetupBadgeImage(badgeInfo); + SetAsNew(badgeInfo.isNew); + } + + public void OnPointerEnter(PointerEventData eventData) => + BackgroundImage.color = HoverBackgroundColor; + + public void OnPointerExit(PointerEventData eventData) => + BackgroundImage.color = NormalBackgroundColor; + + private static bool ShouldShowBadgeProgressBar(in BadgeInfo badgeInfo, bool isOwnProfile) => + isOwnProfile && ((badgeInfo.data.isTier && string.IsNullOrEmpty(badgeInfo.data.completedAt)) || (!badgeInfo.data.isTier && badgeInfo.data.progress.totalStepsTarget is > 1)); + + private void SetupBadgeName(in BadgeInfo badgeInfo) => + BadgeNameText.text = !string.IsNullOrEmpty(badgeInfo.data.progress.lastCompletedTierName) ? $"{badgeInfo.data.name} {badgeInfo.data.progress.lastCompletedTierName}" : badgeInfo.data.name; + + private void SetupBadgeDate(in BadgeInfo badgeInfo, bool isOwnProfile) + { + string completedAtToLoad = !string.IsNullOrEmpty(badgeInfo.data.progress.lastCompletedTierAt) ? badgeInfo.data.progress.lastCompletedTierAt : badgeInfo.data.completedAt; + BadgeDateText.text = !string.IsNullOrEmpty(completedAtToLoad) ? BadgesUtils.FormatTimestampDate(completedAtToLoad) : "—"; + BadgeDateText.gameObject.SetActive( + !ShouldShowBadgeProgressBar(badgeInfo, isOwnProfile) && + ((!badgeInfo.isLocked && !string.IsNullOrEmpty(badgeInfo.data.completedAt)) || + (badgeInfo.isLocked && !badgeInfo.data.isTier) || + (!isOwnProfile && !string.IsNullOrEmpty(badgeInfo.data.progress.lastCompletedTierAt)))); + } + + private void SetupBadgeNextTier(in BadgeInfo badgeInfo, bool isOwnProfile) + { + TopTierMark.SetActive(isOwnProfile && badgeInfo.data.isTier && !string.IsNullOrEmpty(badgeInfo.data.completedAt)); + NextTierTitle.SetActive(isOwnProfile && badgeInfo.data.isTier && badgeInfo.data.progress.stepsDone > 0 && string.IsNullOrEmpty(badgeInfo.data.completedAt)); + } + + private void SetupBadgeProgressBar(in BadgeInfo badgeInfo, bool isOwnProfile) + { + bool showProgressBar = ShouldShowBadgeProgressBar(badgeInfo, isOwnProfile); + ProgressBar.gameObject.SetActive(showProgressBar); + + if (!isOwnProfile) + return; + + if (badgeInfo.data.isTier) + { + int progressPercentage = badgeInfo.GetProgressPercentage(); + ProgressBarFill.sizeDelta = new Vector2((!badgeInfo.isLocked ? progressPercentage : 0) * (ProgressBar.sizeDelta.x / 100), ProgressBarFill.sizeDelta.y); + } + else + { + int simpleBadgeProgressPercentage = badgeInfo.data.progress.stepsDone * 100 / badgeInfo.data.progress.totalStepsTarget; + ProgressBarFill.sizeDelta = new Vector2(simpleBadgeProgressPercentage * (ProgressBar.sizeDelta.x / 100), ProgressBarFill.sizeDelta.y); + } + } + + private void SetupBadgeImage(in BadgeInfo badgeInfo) + { + BadgeImage.SetColor(badgeInfo.isLocked ? LockedBadgeImageColor : NonLockedBadgeImageColor); + imageController?.SetImage(DefaultBadgeSprite); + string imageToLoad = !string.IsNullOrEmpty(badgeInfo.data.progress.lastCompletedTierImage) ? + badgeInfo.data.progress.lastCompletedTierImage : + badgeInfo.data.assets is { textures2d: not null } ? badgeInfo.data.assets.textures2d.normal : ""; + + if (!string.IsNullOrEmpty(imageToLoad)) + imageController?.RequestImage(imageToLoad, hideImageWhileLoading: true); + } + } +} diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeDetailCard_PassportFieldView.cs.meta b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeDetailCard_PassportFieldView.cs.meta new file mode 100644 index 0000000000..abdf9fe767 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeDetailCard_PassportFieldView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 51e7fd108cb944da84d2e0615f7c2fe5 +timeCreated: 1723477136 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeOverviewItem_PassportFieldView.cs b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeOverviewItem_PassportFieldView.cs new file mode 100644 index 0000000000..0f89d9e72f --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeOverviewItem_PassportFieldView.cs @@ -0,0 +1,65 @@ +using DCL.BadgesAPIService; +using DCL.UI; +using DCL.WebRequests; +using TMPro; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace DCL.Passport.Fields.Badges +{ + public class BadgeOverviewItem_PassportFieldView : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler + { + [field: SerializeField] + public ImageView BadgeImage { get; private set; } + + [field: SerializeField] + public Sprite DefaultBadgeSprite { get; private set; } + + [field: SerializeField] + public TMP_Text BadgeNameText { get; private set; } + + [field: SerializeField] + private GameObject badgeNameTooltip; + + private ImageController? imageController; + + private void OnEnable() => + SetBadgeNameToastActive(false); + + public void ConfigureImageController(IWebRequestController webRequestController) + { + if (imageController != null) + return; + + imageController = new ImageController(BadgeImage, webRequestController); + } + + public void StopLoadingImage() => + imageController?.StopLoading(); + + public void Setup(LatestAchievedBadgeData badgeData) + { + SetupBadgeName(badgeData); + SetupBadgeImage(badgeData); + } + + public void OnPointerEnter(PointerEventData eventData) => + SetBadgeNameToastActive(true); + + public void OnPointerExit(PointerEventData eventData) => + SetBadgeNameToastActive(false); + + private void SetupBadgeName(LatestAchievedBadgeData badgeData) => + BadgeNameText.text = $"{badgeData.name} {(string.IsNullOrEmpty(badgeData.tierName) ? string.Empty : badgeData.tierName)}"; + + private void SetupBadgeImage(LatestAchievedBadgeData badgeData) + { + imageController?.SetImage(DefaultBadgeSprite); + if (!string.IsNullOrEmpty(badgeData.image)) + imageController?.RequestImage(badgeData.image, hideImageWhileLoading: true); + } + + private void SetBadgeNameToastActive(bool isActive) => + badgeNameTooltip.SetActive(isActive); + } +} diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeOverviewItem_PassportFieldView.cs.meta b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeOverviewItem_PassportFieldView.cs.meta new file mode 100644 index 0000000000..5315296c29 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeOverviewItem_PassportFieldView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f998d490c2e344a1b5c73cfaf061450b +timeCreated: 1723455442 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeTierButton_PassportFieldView.cs b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeTierButton_PassportFieldView.cs new file mode 100644 index 0000000000..c72de00333 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeTierButton_PassportFieldView.cs @@ -0,0 +1,77 @@ +using DCL.BadgesAPIService; +using DCL.UI; +using DCL.WebRequests; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +namespace DCL.Passport.Fields.Badges +{ + public class BadgeTierButton_PassportFieldView : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler + { + [field: SerializeField] + public Image BackgroundImage { get; private set; } + + [field: SerializeField] + public Button Button { get; private set; } + + [field: SerializeField] + public ImageView TierImage { get; private set; } + + [field: SerializeField] + public Sprite DefaultTierSprite { get; private set; } + + [field: SerializeField] + public GameObject SelectedOutline { get; private set; } + + [field: SerializeField] + public Color NormalBackgroundColor { get; private set; } + + [field: SerializeField] + public Color HoverBackgroundColor { get; private set; } + + [field: SerializeField] + public Color LockedBadgeImageColor { get; private set; } + + [field: SerializeField] + public Color NonLockedBadgeImageColor { get; private set; } + + public TierData Model { get; private set; } + + private ImageController? imageController; + + public void ConfigureImageController(IWebRequestController webRequestController) + { + if (imageController != null) + return; + + imageController = new ImageController(TierImage, webRequestController); + } + + public void StopLoadingImage() => + imageController?.StopLoading(); + + public void SetAsSelected(bool isSelected) => + SelectedOutline.SetActive(isSelected); + + public void Setup(TierData tierData, string completedAt) + { + Model = tierData; + SetupTierImage(tierData, completedAt); + } + + public void OnPointerEnter(PointerEventData eventData) => + BackgroundImage.color = HoverBackgroundColor; + + public void OnPointerExit(PointerEventData eventData) => + BackgroundImage.color = NormalBackgroundColor; + + private void SetupTierImage(TierData tierData, string completedAt) + { + TierImage.SetColor(string.IsNullOrEmpty(completedAt) ? LockedBadgeImageColor : NonLockedBadgeImageColor); + imageController?.SetImage(DefaultTierSprite); + if (tierData.assets is { textures2d: not null } && !string.IsNullOrEmpty(tierData.assets.textures2d.normal)) + imageController?.RequestImage(tierData.assets.textures2d.normal, hideImageWhileLoading: true); + } + } +} diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeTierButton_PassportFieldView.cs.meta b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeTierButton_PassportFieldView.cs.meta new file mode 100644 index 0000000000..afc836a089 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgeTierButton_PassportFieldView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5081c0826d3f4f90b85c8cc7aff3aa13 +timeCreated: 1724074734 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategoryContainer_PassportFieldView.cs b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategoryContainer_PassportFieldView.cs new file mode 100644 index 0000000000..b7604b6abb --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategoryContainer_PassportFieldView.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace DCL.Passport.Fields.Badges +{ + public class BadgesCategoryContainer_PassportFieldView : MonoBehaviour + { + [field: SerializeField] + public RectTransform BadgeDetailCardsContainer { get; private set; } + + public string Category { get; set; } + } +} diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategoryContainer_PassportFieldView.cs.meta b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategoryContainer_PassportFieldView.cs.meta new file mode 100644 index 0000000000..607a4d0c65 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategoryContainer_PassportFieldView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 94aa441af32d48dda3be4c74e2bc13f2 +timeCreated: 1723796401 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategorySeparator_PassportFieldView.cs b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategorySeparator_PassportFieldView.cs new file mode 100644 index 0000000000..47b63005bf --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategorySeparator_PassportFieldView.cs @@ -0,0 +1,11 @@ +using TMPro; +using UnityEngine; + +namespace DCL.Passport.Fields.Badges +{ + public class BadgesCategorySeparator_PassportFieldView : MonoBehaviour + { + [field: SerializeField] + public TMP_Text CategoryText { get; private set; } + } +} diff --git a/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategorySeparator_PassportFieldView.cs.meta b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategorySeparator_PassportFieldView.cs.meta new file mode 100644 index 0000000000..9a3c8eb0ed --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Fields/Badges/BadgesCategorySeparator_PassportFieldView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 107986b4ea3249129494c5e55465d597 +timeCreated: 1723739472 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Materials.meta b/Explorer/Assets/DCL/Passport/Materials.meta new file mode 100644 index 0000000000..d86acf4c2c --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4f139097299f505449dc0716b49b1f0b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Materials/Badge.shadergraph b/Explorer/Assets/DCL/Passport/Materials/Badge.shadergraph new file mode 100644 index 0000000000..b2996d8170 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Materials/Badge.shadergraph @@ -0,0 +1,2137 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "f03e014e920c4f139a5a21ba28befb52", + "m_Properties": [ + { + "m_Id": "89d385367a874924a23d91f78d630f4e" + }, + { + "m_Id": "93a7e8421cc847f6b2f57d182a924cc0" + }, + { + "m_Id": "f56043e8ec084c0dbc0e73de64699743" + } + ], + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "07bbf76af9b84fcaa00097b90f8a91ab" + } + ], + "m_Nodes": [ + { + "m_Id": "bd5cd4812f6b40a69810c47492e9b0a2" + }, + { + "m_Id": "34244e811b2f4eab8a88b9be630e75ee" + }, + { + "m_Id": "93ecf73b184e47e3b8ab1ab5fa243757" + }, + { + "m_Id": "8b36dd7c8a724188b42e7494291152bd" + }, + { + "m_Id": "b2355b10ab144b6baba68a1b7e302368" + }, + { + "m_Id": "ccb86e968ebe4c3a8fbdf6f3f49aad6d" + }, + { + "m_Id": "8aa721fcc9044db28aabd2b800a4b2a3" + }, + { + "m_Id": "7107b702ce8743adb37bc318682cbc33" + }, + { + "m_Id": "a76f14623d594e67bb21a1fd8a0615ee" + }, + { + "m_Id": "1ae44fae2b4544a78d4fc41b2fc12684" + }, + { + "m_Id": "4bda159a4f974235b7461ffee3f02619" + }, + { + "m_Id": "225322ea1ed44b058eedb586fc1f86ad" + }, + { + "m_Id": "6d8f7d221f7e432cb4c59706f7ab8c86" + }, + { + "m_Id": "74534628e6dd418880c20be4226e4282" + }, + { + "m_Id": "76bfeaea3dd24836a3c9d1879ed861e4" + }, + { + "m_Id": "a70a4892e3794ccfa1fb14ad0bf343e2" + }, + { + "m_Id": "1c689e0b4c9d498ab0e2bf94d5f246a3" + }, + { + "m_Id": "030d6b39f43242fba55497aef82bf140" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "030d6b39f43242fba55497aef82bf140" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "8aa721fcc9044db28aabd2b800a4b2a3" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "1ae44fae2b4544a78d4fc41b2fc12684" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4bda159a4f974235b7461ffee3f02619" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "225322ea1ed44b058eedb586fc1f86ad" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b2355b10ab144b6baba68a1b7e302368" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4bda159a4f974235b7461ffee3f02619" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "8b36dd7c8a724188b42e7494291152bd" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4bda159a4f974235b7461ffee3f02619" + }, + "m_SlotId": 7 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "1c689e0b4c9d498ab0e2bf94d5f246a3" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6d8f7d221f7e432cb4c59706f7ab8c86" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "225322ea1ed44b058eedb586fc1f86ad" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "74534628e6dd418880c20be4226e4282" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "225322ea1ed44b058eedb586fc1f86ad" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "74534628e6dd418880c20be4226e4282" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4bda159a4f974235b7461ffee3f02619" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "74534628e6dd418880c20be4226e4282" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "76bfeaea3dd24836a3c9d1879ed861e4" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "76bfeaea3dd24836a3c9d1879ed861e4" + }, + "m_SlotId": 5 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "030d6b39f43242fba55497aef82bf140" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "76bfeaea3dd24836a3c9d1879ed861e4" + }, + "m_SlotId": 6 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ccb86e968ebe4c3a8fbdf6f3f49aad6d" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a70a4892e3794ccfa1fb14ad0bf343e2" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "74534628e6dd418880c20be4226e4282" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a70a4892e3794ccfa1fb14ad0bf343e2" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "76bfeaea3dd24836a3c9d1879ed861e4" + }, + "m_SlotId": 1 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "bd5cd4812f6b40a69810c47492e9b0a2" + }, + { + "m_Id": "34244e811b2f4eab8a88b9be630e75ee" + }, + { + "m_Id": "93ecf73b184e47e3b8ab1ab5fa243757" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 178.0000457763672, + "y": 223.0 + }, + "m_Blocks": [ + { + "m_Id": "8b36dd7c8a724188b42e7494291152bd" + }, + { + "m_Id": "b2355b10ab144b6baba68a1b7e302368" + }, + { + "m_Id": "ccb86e968ebe4c3a8fbdf6f3f49aad6d" + }, + { + "m_Id": "8aa721fcc9044db28aabd2b800a4b2a3" + }, + { + "m_Id": "7107b702ce8743adb37bc318682cbc33" + }, + { + "m_Id": "a76f14623d594e67bb21a1fd8a0615ee" + }, + { + "m_Id": "1c689e0b4c9d498ab0e2bf94d5f246a3" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Shader Graphs", + "m_GraphPrecision": 1, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_SubDatas": [], + "m_ActiveTargets": [ + { + "m_Id": "2920dadd29e74aadb39d834da3a2d0b6" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.OneMinusNode", + "m_ObjectId": "030d6b39f43242fba55497aef82bf140", + "m_Group": { + "m_Id": "" + }, + "m_Name": "One Minus", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -179.00001525878907, + "y": 662.0000610351563, + "width": 128.0001220703125, + "height": 94.0 + } + }, + "m_Slots": [ + { + "m_Id": "3ffd3461344c4b058cf2cccfe14f5511" + }, + { + "m_Id": "095c00c9221f479d9887bb3957d27dce" + } + ], + "synonyms": [ + "complement", + "invert", + "opposite" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "05be2bbd551f47878b646e55a4d8de7b", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "068bec1467ad4e6c82c5c515027d1080", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "07bbf76af9b84fcaa00097b90f8a91ab", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "89d385367a874924a23d91f78d630f4e" + }, + { + "m_Id": "93a7e8421cc847f6b2f57d182a924cc0" + }, + { + "m_Id": "f56043e8ec084c0dbc0e73de64699743" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "095c00c9221f479d9887bb3957d27dce", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0f071a2d900b491fb8ca5d33497ba98b", + "m_Id": 0, + "m_DisplayName": "Ambient Occlusion", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Occlusion", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "16cefa30251349d2af2da90bc6ed145c", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "17b8ffb2d57a4090a679378848c8e0ee", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "1ad5ea482a0c4e35a0c623da3a8fb1e3", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "1ae44fae2b4544a78d4fc41b2fc12684", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -679.0, + "y": -41.000003814697269, + "width": 137.0, + "height": 34.00004196166992 + } + }, + "m_Slots": [ + { + "m_Id": "d6ed67f72b5041ea8ff82bd26ea7ae62" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "89d385367a874924a23d91f78d630f4e" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "1c689e0b4c9d498ab0e2bf94d5f246a3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "4b253a8028b84f1ca8eaf8d79fbfe25f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "1d2251598cc54483ab123fb748fb496f", + "m_Id": 0, + "m_DisplayName": "hrm", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "225322ea1ed44b058eedb586fc1f86ad", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -511.9999694824219, + "y": 267.0, + "width": 183.0, + "height": 250.99993896484376 + } + }, + "m_Slots": [ + { + "m_Id": "677b974322724b24ba6d587934d0a8e1" + }, + { + "m_Id": "282f63c2aaf0498f800018a3493f65d5" + }, + { + "m_Id": "7e21cf2cd2a8458baee8241015c29550" + }, + { + "m_Id": "43501c7c9a0d4d43b670ea1ecfc5b55a" + }, + { + "m_Id": "b05ad2fa39264578a836732ffe362366" + }, + { + "m_Id": "5c94b38472414f13ab9144eafee48959" + }, + { + "m_Id": "4db482315567435aa619c25b3feb6737" + }, + { + "m_Id": "d508cd7532c44633abdd74b390a213dc" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 1, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "22cc45084604474487f2333176126d1c", + "m_Id": 12, + "m_DisplayName": "PrimitiveSize", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "PrimitiveSize", + "m_StageCapability": 2, + "m_Value": { + "x": 1.0, + "y": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "282f63c2aaf0498f800018a3493f65d5", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "2920dadd29e74aadb39d834da3a2d0b6", + "m_Datas": [], + "m_ActiveSubTarget": { + "m_Id": "f48871b36c7d4f11a9de55e27f8c9e16" + }, + "m_AllowMaterialOverride": false, + "m_SurfaceType": 1, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_SupportsLODCrossFade": false, + "m_CustomEditorGUI": "", + "m_SupportVFX": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "34244e811b2f4eab8a88b9be630e75ee", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "698a3ff4614f45aaaa566f6e319580c9" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3f0e624ae457432397555f2cbb892e5e", + "m_Id": 8, + "m_DisplayName": "LODThreshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "LODThreshold", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "3ffd3461344c4b058cf2cccfe14f5511", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "43501c7c9a0d4d43b670ea1ecfc5b55a", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "4a3d0fe613da4c51b22c9494acf58497", + "m_Id": 3, + "m_DisplayName": "HeightmapSampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "HeightmapSampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4b253a8028b84f1ca8eaf8d79fbfe25f", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "4bda159a4f974235b7461ffee3f02619", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -514.0, + "y": -80.9999771118164, + "width": 183.00003051757813, + "height": 251.0 + } + }, + "m_Slots": [ + { + "m_Id": "068bec1467ad4e6c82c5c515027d1080" + }, + { + "m_Id": "e5d7e23860e240d09716a04428c2569f" + }, + { + "m_Id": "6377be009b7244488811b5a6dee90d2e" + }, + { + "m_Id": "ef53fde8bdbf4965a67c2937daa980be" + }, + { + "m_Id": "f2bd70f7936f4bda9d380233f171f83d" + }, + { + "m_Id": "16cefa30251349d2af2da90bc6ed145c" + }, + { + "m_Id": "b5d8e29da9374c1395689fd6b46efb80" + }, + { + "m_Id": "ab7e5d053bba4c6e9c480f7334f77c5d" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "4db482315567435aa619c25b3feb6737", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "58d8f186354e49bb96cf8707d0bc1ddc", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "5c94b38472414f13ab9144eafee48959", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "610bbb2d8dec4a5e9df934a757f0dcc1", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6377be009b7244488811b5a6dee90d2e", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "677b974322724b24ba6d587934d0a8e1", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "698a3ff4614f45aaaa566f6e319580c9", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "6d8f7d221f7e432cb4c59706f7ab8c86", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -660.0, + "y": 307.0000305175781, + "width": 120.0, + "height": 33.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "b4b83ba1251842f88bf0582152c0dfc5" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "93a7e8421cc847f6b2f57d182a924cc0" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "7107b702ce8743adb37bc318682cbc33", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "bc115aadddc64cdba9fc6028801c13f0" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ParallaxOcclusionMappingNode", + "m_ObjectId": "74534628e6dd418880c20be4226e4282", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Parallax Occlusion Mapping", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1211.9998779296875, + "y": 269.0000305175781, + "width": 296.99993896484377, + "height": 327.9999084472656 + } + }, + "m_Slots": [ + { + "m_Id": "86004148ea8d41aabc9dda177894d6df" + }, + { + "m_Id": "4a3d0fe613da4c51b22c9494acf58497" + }, + { + "m_Id": "ba7019a0fb6c4f1fb72c8b08223eeba3" + }, + { + "m_Id": "9ab5c5cbf8184ec990859007d8a5d60c" + }, + { + "m_Id": "bc5dfe68539f4398903b7ecf378bfad9" + }, + { + "m_Id": "c98a938528ca418d93308e98f0d27fc7" + }, + { + "m_Id": "db4ef6b9a2324a0db7191fa803a27027" + }, + { + "m_Id": "22cc45084604474487f2333176126d1c" + }, + { + "m_Id": "8b9f42075c1b4226beb7164890344733" + }, + { + "m_Id": "3f0e624ae457432397555f2cbb892e5e" + }, + { + "m_Id": "fb50e268b9cd44d992bbc9490edab94e" + }, + { + "m_Id": "7865400327ad47b6a2a5505c9eeecbab" + } + ], + "synonyms": [ + "pom" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "76bfeaea3dd24836a3c9d1879ed861e4", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -519.0, + "y": 615.0000610351563, + "width": 183.00003051757813, + "height": 251.0 + } + }, + "m_Slots": [ + { + "m_Id": "f3ce9482dcb54ac4aff2dfb386f0e7d7" + }, + { + "m_Id": "a6212de329a14f768cbdb14d96fad652" + }, + { + "m_Id": "1ad5ea482a0c4e35a0c623da3a8fb1e3" + }, + { + "m_Id": "d5e594fa29e845669f23546a445f13fd" + }, + { + "m_Id": "58d8f186354e49bb96cf8707d0bc1ddc" + }, + { + "m_Id": "05be2bbd551f47878b646e55a4d8de7b" + }, + { + "m_Id": "d07e53cbd5e2451aba045435da6dcf0e" + }, + { + "m_Id": "610bbb2d8dec4a5e9df934a757f0dcc1" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "7865400327ad47b6a2a5505c9eeecbab", + "m_Id": 1, + "m_DisplayName": "ParallaxUVs", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "ParallaxUVs", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "7e21cf2cd2a8458baee8241015c29550", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "86004148ea8d41aabc9dda177894d6df", + "m_Id": 2, + "m_DisplayName": "Heightmap", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Heightmap", + "m_StageCapability": 2, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "89d385367a874924a23d91f78d630f4e", + "m_Guid": { + "m_GuidSerialized": "98af79f1-3017-4611-99de-784045d0a492" + }, + "m_Name": "baseColor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "baseColor", + "m_DefaultReferenceName": "_baseColor", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "8aa721fcc9044db28aabd2b800a4b2a3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Smoothness", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "df07b3d3a41b48b39a774ac2947d6e5d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Smoothness" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "8b36dd7c8a724188b42e7494291152bd", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "d0fcd9eb77fc41a6b374d7c7fb10ea9b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "8b9f42075c1b4226beb7164890344733", + "m_Id": 7, + "m_DisplayName": "LOD", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "LOD", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "93a7e8421cc847f6b2f57d182a924cc0", + "m_Guid": { + "m_GuidSerialized": "50f5fa3c-a017-4b1e-82d9-b57737a33378" + }, + "m_Name": "normal", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "normal", + "m_DefaultReferenceName": "_normal", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "93ecf73b184e47e3b8ab1ab5fa243757", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "b15ea94cc00947e7bbe85acd20b0d78e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "9ab5c5cbf8184ec990859007d8a5d60c", + "m_Id": 5, + "m_DisplayName": "Steps", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Steps", + "m_StageCapability": 2, + "m_Value": 20.0, + "m_DefaultValue": 5.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a6212de329a14f768cbdb14d96fad652", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "a66ebbec334f4b17b2b4d4e510a5b1d5", + "m_Id": 0, + "m_DisplayName": "Normal (Tangent Space)", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "NormalTS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "a70a4892e3794ccfa1fb14ad0bf343e2", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1331.0001220703125, + "y": 664.0000610351563, + "width": 104.0, + "height": 33.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "1d2251598cc54483ab123fb748fb496f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "f56043e8ec084c0dbc0e73de64699743" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "a76f14623d594e67bb21a1fd8a0615ee", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Occlusion", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "0f071a2d900b491fb8ca5d33497ba98b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Occlusion" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "ab7e5d053bba4c6e9c480f7334f77c5d", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "b05ad2fa39264578a836732ffe362366", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "b15ea94cc00947e7bbe85acd20b0d78e", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "b2355b10ab144b6baba68a1b7e302368", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.NormalTS", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "a66ebbec334f4b17b2b4d4e510a5b1d5" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.NormalTS" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "b4b83ba1251842f88bf0582152c0dfc5", + "m_Id": 0, + "m_DisplayName": "normal", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "b5d8e29da9374c1395689fd6b46efb80", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ba7019a0fb6c4f1fb72c8b08223eeba3", + "m_Id": 4, + "m_DisplayName": "Amplitude", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Amplitude", + "m_StageCapability": 2, + "m_Value": 5.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "bc115aadddc64cdba9fc6028801c13f0", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1, + "m_DefaultColor": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "bc5dfe68539f4398903b7ecf378bfad9", + "m_Id": 6, + "m_DisplayName": "UVs", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UVs", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "bd5cd4812f6b40a69810c47492e9b0a2", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "17b8ffb2d57a4090a679378848c8e0ee" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c275d87752b24a0594b7ce1483319563", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Metallic", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "c98a938528ca418d93308e98f0d27fc7", + "m_Id": 10, + "m_DisplayName": "Tiling", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tiling", + "m_StageCapability": 2, + "m_Value": { + "x": 1.0, + "y": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "ccb86e968ebe4c3a8fbdf6f3f49aad6d", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Metallic", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "c275d87752b24a0594b7ce1483319563" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Metallic" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "d07e53cbd5e2451aba045435da6dcf0e", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "d0fcd9eb77fc41a6b374d7c7fb10ea9b", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "d508cd7532c44633abdd74b390a213dc", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d5e594fa29e845669f23546a445f13fd", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "d6ed67f72b5041ea8ff82bd26ea7ae62", + "m_Id": 0, + "m_DisplayName": "baseColor", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "db4ef6b9a2324a0db7191fa803a27027", + "m_Id": 11, + "m_DisplayName": "Offset", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Offset", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "df07b3d3a41b48b39a774ac2947d6e5d", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Smoothness", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e5d7e23860e240d09716a04428c2569f", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ef53fde8bdbf4965a67c2937daa980be", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f2bd70f7936f4bda9d380233f171f83d", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "f3ce9482dcb54ac4aff2dfb386f0e7d7", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", + "m_ObjectId": "f48871b36c7d4f11a9de55e27f8c9e16", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 0, + "m_ClearCoat": false, + "m_BlendModePreserveSpecular": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "f56043e8ec084c0dbc0e73de64699743", + "m_Guid": { + "m_GuidSerialized": "eef1be49-1095-45ae-81f4-d2506522291f" + }, + "m_Name": "hrm", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "hrm", + "m_DefaultReferenceName": "_hrm", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "fb50e268b9cd44d992bbc9490edab94e", + "m_Id": 0, + "m_DisplayName": "PixelDepthOffset", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "PixelDepthOffset", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + diff --git a/Explorer/Assets/DCL/Passport/Materials/Badge.shadergraph.meta b/Explorer/Assets/DCL/Passport/Materials/Badge.shadergraph.meta new file mode 100644 index 0000000000..0c524fde6e --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Materials/Badge.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 98dc24d5ae5d8924786c1c64452646d5 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/Explorer/Assets/DCL/Passport/Materials/Badge03.mat b/Explorer/Assets/DCL/Passport/Materials/Badge03.mat new file mode 100644 index 0000000000..1ad6974f7d --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Materials/Badge03.mat @@ -0,0 +1,145 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2474059047456235887 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Badge03 + m_Shader: {fileID: -6465566751694194690, guid: 98dc24d5ae5d8924786c1c64452646d5, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _baseColor: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _hrm: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _normal: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueControl: 0 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] diff --git a/Explorer/Assets/DCL/Passport/Materials/Badge03.mat.meta b/Explorer/Assets/DCL/Passport/Materials/Badge03.mat.meta new file mode 100644 index 0000000000..4ca7bd4143 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Materials/Badge03.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 493478f41d9de0944bc5cf983afbb6f7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Materials/Badge3DPreviewRenderTexture.renderTexture b/Explorer/Assets/DCL/Passport/Materials/Badge3DPreviewRenderTexture.renderTexture new file mode 100644 index 0000000000..ba12fc1a1f --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Materials/Badge3DPreviewRenderTexture.renderTexture @@ -0,0 +1,40 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Badge3DPreviewRenderTexture + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + m_IsAlphaChannelOptional: 0 + serializedVersion: 5 + m_Width: 1000 + m_Height: 1000 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthStencilFormat: 0 + m_ColorFormat: 8 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 0 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_EnableRandomWrite: 0 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 + m_ShadowSamplingMode: 2 diff --git a/Explorer/Assets/DCL/Passport/Materials/Badge3DPreviewRenderTexture.renderTexture.meta b/Explorer/Assets/DCL/Passport/Materials/Badge3DPreviewRenderTexture.renderTexture.meta new file mode 100644 index 0000000000..70cd9442f4 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Materials/Badge3DPreviewRenderTexture.renderTexture.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 12d1eb45a938cce40bf2831d970c5727 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges.meta b/Explorer/Assets/DCL/Passport/Modules/Badges.meta new file mode 100644 index 0000000000..4d4e34609e --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3f53110b65294b6b959a6c4e8da792d2 +timeCreated: 1724169460 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeDetailsCards_PassportModuleSubController.cs b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeDetailsCards_PassportModuleSubController.cs new file mode 100644 index 0000000000..24a3de8fb3 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeDetailsCards_PassportModuleSubController.cs @@ -0,0 +1,153 @@ +using DCL.BadgesAPIService; +using DCL.Passport.Fields.Badges; +using DCL.WebRequests; +using System; +using System.Collections.Generic; +using UnityEngine.Pool; +using Object = UnityEngine.Object; + +namespace DCL.Passport.Modules.Badges +{ + public class BadgeDetailsCards_PassportModuleSubController + { + private const int BADGES_DETAIL_CARDS_POOL_DEFAULT_CAPACITY = 50; + private const int GRID_ITEMS_PER_ROW = 6; + + public readonly Dictionary<string,List<BadgeDetailCard_PassportFieldView>> InstantiatedBadgeDetailCards = new (); + + private readonly BadgesDetails_PassportModuleView view; + private readonly BadgesCategories_PassportModuleSubController badgesCategoriesController; + private readonly BadgeInfo_PassportModuleSubController badgeInfoController; + private readonly IObjectPool<BadgeDetailCard_PassportFieldView> badgeDetailCardsPool; + private readonly IObjectPool<BadgeDetailCard_PassportFieldView> emptyItemsPool; + private readonly List<BadgeDetailCard_PassportFieldView> instantiatedEmptyItems = new (); + + public BadgeDetailsCards_PassportModuleSubController( + BadgesDetails_PassportModuleView view, + IWebRequestController webRequestController, + BadgesCategories_PassportModuleSubController badgesCategoriesController, + BadgeInfo_PassportModuleSubController badgeInfoController) + { + this.view = view; + this.badgesCategoriesController = badgesCategoriesController; + this.badgeInfoController = badgeInfoController; + + badgeDetailCardsPool = new ObjectPool<BadgeDetailCard_PassportFieldView>( + InstantiateBadgeDetailCardPrefab, + defaultCapacity: BADGES_DETAIL_CARDS_POOL_DEFAULT_CAPACITY, + actionOnGet: badgeDetailCardView => + { + badgeDetailCardView.ConfigureImageController(webRequestController); + badgeDetailCardView.gameObject.SetActive(true); + badgeDetailCardView.SetAsSelected(false); + }, + actionOnRelease: badgeDetailCardView => badgeDetailCardView.gameObject.SetActive(false)); + + emptyItemsPool = new ObjectPool<BadgeDetailCard_PassportFieldView>( + InstantiateBadgeDetailCardPrefab, + defaultCapacity: GRID_ITEMS_PER_ROW - 1, + actionOnGet: emptyItemView => + { + emptyItemView.gameObject.SetActive(true); + emptyItemView.SetInvisible(true); + }, + actionOnRelease: emptyItemView => emptyItemView.gameObject.SetActive(false)); + } + + public void CreateBadgeDetailCard(BadgeInfo badge, bool isOwnProfile) + { + var badgeDetailCard = badgeDetailCardsPool.Get(); + badgeDetailCard.Setup(badge, isOwnProfile); + badgeDetailCard.Button.onClick.AddListener(() => { SelectBadgeCard(badgeDetailCard, isOwnProfile); }); + + // Place badge into the corresponding category container + foreach (var badgesCategoryContainer in badgesCategoriesController.InstantiatedBadgesCategoryContainers) + { + if (!string.Equals(badgesCategoryContainer.Category, badge.data.category, StringComparison.OrdinalIgnoreCase)) + continue; + + badgeDetailCard.transform.parent = badgesCategoryContainer.BadgeDetailCardsContainer; + badgeDetailCard.transform.SetAsFirstSibling(); + break; + } + + if (!InstantiatedBadgeDetailCards.ContainsKey(badge.data.category.ToLower())) + InstantiatedBadgeDetailCards.Add(badge.data.category.ToLower(), new List<BadgeDetailCard_PassportFieldView>()); + + InstantiatedBadgeDetailCards[badge.data.category.ToLower()].Add(badgeDetailCard); + } + + public void SelectBadgeCard(BadgeDetailCard_PassportFieldView badgeDetailCard, bool isOwnProfile) + { + if (badgeDetailCard.IsSelected) + return; + + foreach (var instantiatedBadge in InstantiatedBadgeDetailCards) + foreach (var instantiateBadgeByCategory in instantiatedBadge.Value) + instantiateBadgeByCategory.SetAsSelected(false); + + badgeDetailCard.SetAsSelected(true); + badgeInfoController.Setup(badgeDetailCard.Model, isOwnProfile); + + if (!badgeDetailCard.Model.isLocked && isOwnProfile) + { + BadgesUtils.SetBadgeAsRead(badgeDetailCard.Model.data.id); + badgeDetailCard.SetAsNew(false); + } + } + + public void CreateEmptyDetailCards() + { + foreach (var badgeDetailCardsByCategory in InstantiatedBadgeDetailCards) + { + int missingEmptyItems = CalculateMissingEmptyItems(badgeDetailCardsByCategory.Value.Count); + for (var i = 0; i < missingEmptyItems; i++) + { + var emptyItem = emptyItemsPool.Get(); + emptyItem.gameObject.name = "EmptyItem"; + emptyItem.transform.parent = badgeDetailCardsByCategory.Value[0].transform.parent; + emptyItem.transform.SetAsFirstSibling(); + instantiatedEmptyItems.Add(emptyItem); + } + } + } + + private static int CalculateMissingEmptyItems(int totalItems) + { + int remainder = totalItems % GRID_ITEMS_PER_ROW; + int missingItems = remainder == 0 ? 0 : GRID_ITEMS_PER_ROW - remainder; + return missingItems; + } + + public void ClearBadgeDetailCards() + { + ClearEmptyItems(); + + foreach (var badgeDetailCards in InstantiatedBadgeDetailCards) + { + foreach (var badgeDetailCardByCategory in badgeDetailCards.Value) + { + badgeDetailCardByCategory.StopLoadingImage(); + badgeDetailCardByCategory.Button.onClick.RemoveAllListeners(); + badgeDetailCardsPool.Release(badgeDetailCardByCategory); + } + } + + InstantiatedBadgeDetailCards.Clear(); + } + + private BadgeDetailCard_PassportFieldView InstantiateBadgeDetailCardPrefab() + { + BadgeDetailCard_PassportFieldView badgeDetailCareView = Object.Instantiate(view.BadgeDetailCardPrefab, view.MainContainer); + return badgeDetailCareView; + } + + private void ClearEmptyItems() + { + foreach (BadgeDetailCard_PassportFieldView emptyItem in instantiatedEmptyItems) + emptyItemsPool.Release(emptyItem); + + instantiatedEmptyItems.Clear(); + } + } +} diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeDetailsCards_PassportModuleSubController.cs.meta b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeDetailsCards_PassportModuleSubController.cs.meta new file mode 100644 index 0000000000..3e08e1d9d1 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeDetailsCards_PassportModuleSubController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ba6d90d929bd49019fca5a81fff48777 +timeCreated: 1725361863 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleSubController.cs b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleSubController.cs new file mode 100644 index 0000000000..62b6dc4b4e --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleSubController.cs @@ -0,0 +1,301 @@ +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using DCL.BadgesAPIService; +using DCL.Diagnostics; +using DCL.Passport.Fields.Badges; +using DCL.WebRequests; +using System; +using System.Collections.Generic; +using System.Threading; +using UnityEngine; +using UnityEngine.Pool; +using Utility; +using Object = UnityEngine.Object; + +namespace DCL.Passport.Modules.Badges +{ + public class BadgeInfo_PassportModuleSubController + { + private const int BADGE_TIER_BUTTON_POOL_DEFAULT_CAPACITY = 6; + private static readonly int IS_STOPPED_3D_IMAGE_ANIMATION_PARAM = Animator.StringToHash("IsStopped"); + private static readonly int BASE_COLOR = Shader.PropertyToID("_baseColor"); + private static readonly int NORMAL = Shader.PropertyToID("_normal"); + private static readonly int HRM = Shader.PropertyToID("_hrm"); + + private readonly BadgeInfo_PassportModuleView badgeInfoModuleView; + private readonly IWebRequestController webRequestController; + private readonly BadgesAPIClient badgesAPIClient; + private readonly PassportErrorsController passportErrorsController; + private readonly IObjectPool<BadgeTierButton_PassportFieldView> badgeTierButtonsPool; + private readonly List<BadgeTierButton_PassportFieldView> instantiatedBadgeTierButtons = new (); + + private bool isOwnProfile; + private BadgeInfo currentBadgeInfo; + private IReadOnlyList<TierData> currentTiers = Array.Empty<TierData>(); + private CancellationTokenSource loadBadgeTierButtonsCts; + private CancellationTokenSource loadBadge3DImageCts; + + public BadgeInfo_PassportModuleSubController( + BadgeInfo_PassportModuleView badgeInfoModuleView, + IWebRequestController webRequestController, + BadgesAPIClient badgesAPIClient, + PassportErrorsController passportErrorsController) + { + this.badgeInfoModuleView = badgeInfoModuleView; + this.webRequestController = webRequestController; + this.badgesAPIClient = badgesAPIClient; + this.passportErrorsController = passportErrorsController; + + badgeTierButtonsPool = new ObjectPool<BadgeTierButton_PassportFieldView>( + InstantiateBadgeTierButtonPrefab, + defaultCapacity: BADGE_TIER_BUTTON_POOL_DEFAULT_CAPACITY, + actionOnGet: badgeTierButton => + { + badgeTierButton.ConfigureImageController(webRequestController); + badgeTierButton.gameObject.SetActive(true); + badgeTierButton.SetAsSelected(false); + badgeTierButton.transform.SetAsLastSibling(); + }, + actionOnRelease: badgeTierButton => badgeTierButton.gameObject.SetActive(false)); + } + + public void Setup(BadgeInfo badgeInfo, bool isOwnProfileBadge) + { + this.isOwnProfile = isOwnProfileBadge; + currentBadgeInfo = badgeInfo; + + if (badgeInfo.data.isTier) + LoadTierButtons(); + else + { + SetupBadgeInfoView(badgeInfo, Array.Empty<TierData>()); + loadBadge3DImageCts = loadBadge3DImageCts.SafeRestart(); + LoadBadge3DImageAsync(badgeInfo.data.assets, loadBadge3DImageCts.Token).Forget(); + SetAsLoading(false); + } + } + + public void SetAsLoading(bool isLoading) + { + badgeInfoModuleView.MainLoadingSpinner.SetActive(isLoading); + badgeInfoModuleView.MainContainer.SetActive(!isLoading); + } + + public void SetAsEmpty(bool isEmpty) => + badgeInfoModuleView.gameObject.SetActive(!isEmpty); + + public void Clear() + { + loadBadge3DImageCts.SafeCancelAndDispose(); + ClearTiers(); + } + + private BadgeTierButton_PassportFieldView InstantiateBadgeTierButtonPrefab() + { + BadgeTierButton_PassportFieldView badgesFilterButton = Object.Instantiate(badgeInfoModuleView.BadgeTierButtonPrefab, badgeInfoModuleView.AllTiersContainer); + return badgesFilterButton; + } + + private void LoadTierButtons() + { + Clear(); + SetAsLoading(true); + + loadBadgeTierButtonsCts = loadBadgeTierButtonsCts.SafeRestart(); + LoadTierButtonsAsync(currentBadgeInfo, loadBadgeTierButtonsCts.Token).Forget(); + } + + private async UniTaskVoid LoadTierButtonsAsync(BadgeInfo badgeInfo, CancellationToken ct) + { + try + { + IReadOnlyList<TierData>? tiers = await badgesAPIClient.FetchTiersAsync(badgeInfo.data.id, ct); + + foreach (TierData tier in tiers) + { + string tierCompletedAt = badgeInfo.GetTierCompletedDate(tier.tierId); + if (!isOwnProfile && string.IsNullOrEmpty(tierCompletedAt)) + continue; + + CreateBadgeTierButton(tier, tierCompletedAt); + } + + SetupBadgeInfoView(badgeInfo, tiers); + SelectLastCompletedTierButton(badgeInfo, tiers); + SetAsLoading(false); + } + catch (OperationCanceledException) { } + catch (Exception e) + { + const string ERROR_MESSAGE = "There was an error loading tiers. Please try again!"; + passportErrorsController.Show(ERROR_MESSAGE); + ReportHub.LogError(ReportCategory.BADGES, $"{ERROR_MESSAGE} ERROR: {e.Message}"); + } + } + + private void CreateBadgeTierButton(TierData tierData, string completedAt) + { + var badgeTierButton = badgeTierButtonsPool.Get(); + badgeTierButton.Setup(tierData, completedAt); + badgeTierButton.Button.onClick.AddListener(() => SelectTierButton(badgeTierButton)); + instantiatedBadgeTierButtons.Add(badgeTierButton); + } + + private void SelectLastCompletedTierButton(BadgeInfo badge, IReadOnlyList<TierData> tiers) + { + int? lastCompletedTierIndex = null; + for (var i = 0; i < tiers.Count; i++) + { + if (badge.data.progress.stepsDone >= tiers[i].criteria.steps) + lastCompletedTierIndex = i; + } + + var selectedIndex = 0; + for (var i = 0; i < instantiatedBadgeTierButtons.Count; i++) + { + if (i != lastCompletedTierIndex) + continue; + + selectedIndex = i; + break; + } + + if (selectedIndex < instantiatedBadgeTierButtons.Count) + SelectTierButton(instantiatedBadgeTierButtons[selectedIndex]); + } + + private void ClearTiers() + { + loadBadgeTierButtonsCts.SafeCancelAndDispose(); + + foreach (BadgeTierButton_PassportFieldView badgeTierButtons in instantiatedBadgeTierButtons) + { + badgeTierButtons.StopLoadingImage(); + badgeTierButtons.Button.onClick.RemoveAllListeners(); + badgeTierButtonsPool.Release(badgeTierButtons); + } + + instantiatedBadgeTierButtons.Clear(); + } + + private void SelectTierButton(BadgeTierButton_PassportFieldView selectedTierButton) + { + for (var i = 0; i < instantiatedBadgeTierButtons.Count; i++) + { + BadgeTierButton_PassportFieldView tierButton = instantiatedBadgeTierButtons[i]; + tierButton.SetAsSelected(tierButton.Model.tierId == selectedTierButton.Model.tierId); + + if (tierButton.Model.tierId == selectedTierButton.Model.tierId) + { + SelectBadgeTier(i, currentBadgeInfo); + + loadBadge3DImageCts = loadBadge3DImageCts.SafeRestart(); + LoadBadge3DImageAsync(tierButton.Model.assets, loadBadge3DImageCts.Token).Forget(); + } + } + } + + private void SelectBadgeTier(int tierIndex, BadgeInfo badgeInfo) + { + var tier = currentTiers[tierIndex]; + badgeInfoModuleView.BadgeNameText.text = $"{badgeInfo.data.name} {tier.tierName}"; + string tierCompletedAt = badgeInfo.GetTierCompletedDate(tier.tierId); + bool tierIsLocked = string.IsNullOrEmpty(tierCompletedAt); + badgeInfoModuleView.BadgeDateText.text = !tierIsLocked ? $"Unlocked: {BadgesUtils.FormatTimestampDate(tierCompletedAt)}" : "Locked"; + badgeInfoModuleView.BadgeDescriptionText.text = tier.description; + badgeInfoModuleView.Badge3DImage.color = tierIsLocked ? badgeInfoModuleView.Badge3DImageLockedColor : badgeInfoModuleView.Badge3DImageUnlockedColor; + badgeInfoModuleView.Badge3DAnimator.SetBool(IS_STOPPED_3D_IMAGE_ANIMATION_PARAM, tierIsLocked); + } + + private void SetupBadgeInfoView(in BadgeInfo badgeInfo, IReadOnlyList<TierData> tiers) + { + currentTiers = tiers; + badgeInfoModuleView.TierSection.SetActive(badgeInfo.data.isTier); + badgeInfoModuleView.SimpleBadgeProgressBarContainer.SetActive(isOwnProfile && !badgeInfo.data.isTier && badgeInfo.data.progress.totalStepsTarget > 1); + badgeInfoModuleView.Badge3DImage.color = badgeInfo.isLocked ? badgeInfoModuleView.Badge3DImageLockedColor : badgeInfoModuleView.Badge3DImageUnlockedColor; + badgeInfoModuleView.Badge3DAnimator.SetBool(IS_STOPPED_3D_IMAGE_ANIMATION_PARAM, badgeInfo.isLocked); + + if (badgeInfo.data.isTier) + SetupTierBadge(badgeInfo, tiers); + else + SetupNonTierBadge(badgeInfo); + } + + private void SetupTierBadge(BadgeInfo badgeInfo, IReadOnlyList<TierData> tiers) + { + int nextTierToCompleteIndex = tiers.Count - 1; + for (var i = 0; i < tiers.Count; i++) + { + if (badgeInfo.data.progress.nextStepsTarget == tiers[i].criteria.steps) + nextTierToCompleteIndex = i; + } + + var nextTierToComplete = tiers[nextTierToCompleteIndex]; + badgeInfoModuleView.TopTierMark.SetActive(isOwnProfile && !string.IsNullOrEmpty(badgeInfo.data.completedAt)); + badgeInfoModuleView.NextTierContainer.SetActive(isOwnProfile && string.IsNullOrEmpty(badgeInfo.data.completedAt) && badgeInfo.data.progress.stepsDone > 0); + badgeInfoModuleView.NextTierDescriptionText.gameObject.SetActive(isOwnProfile); + badgeInfoModuleView.NextTierProgressBarContainer.SetActive(isOwnProfile); + + if (isOwnProfile) + { + badgeInfoModuleView.NextTierValueText.text = nextTierToComplete.tierName; + badgeInfoModuleView.NextTierDescriptionText.text = nextTierToComplete.description; + int nextTierProgressPercentage = badgeInfo.GetProgressPercentage(); + badgeInfoModuleView.NextTierProgressBarFill.sizeDelta = new Vector2((!badgeInfo.isLocked ? nextTierProgressPercentage : 0) * (badgeInfoModuleView.NextTierProgressBar.sizeDelta.x / 100), badgeInfoModuleView.NextTierProgressBarFill.sizeDelta.y); + badgeInfoModuleView.NextTierProgressValueText.text = $"{badgeInfo.data.progress.stepsDone}/{badgeInfo.data.progress.nextStepsTarget ?? badgeInfo.data.progress.totalStepsTarget}"; + } + } + + private void SetupNonTierBadge(BadgeInfo badgeInfo) + { + badgeInfoModuleView.BadgeNameText.text = badgeInfo.data.name; + badgeInfoModuleView.BadgeDateText.text = !badgeInfo.isLocked ? $"Unlocked: {BadgesUtils.FormatTimestampDate(badgeInfo.data.completedAt)}" : "Locked"; + badgeInfoModuleView.BadgeDescriptionText.text = badgeInfo.data.description; + int simpleBadgeProgressPercentage = badgeInfo.data.progress.stepsDone * 100 / badgeInfo.data.progress.totalStepsTarget; + badgeInfoModuleView.SimpleBadgeProgressBarFill.sizeDelta = new Vector2(simpleBadgeProgressPercentage * (badgeInfoModuleView.SimpleBadgeProgressBar.sizeDelta.x / 100), badgeInfoModuleView.SimpleBadgeProgressBarFill.sizeDelta.y); + badgeInfoModuleView.SimpleBadgeProgressValueText.text = $"{badgeInfo.data.progress.stepsDone}/{badgeInfo.data.progress.totalStepsTarget}"; + } + + private async UniTask LoadBadge3DImageAsync(BadgeAssetsData? assets, CancellationToken ct) + { + try + { + SetBadgeInfoViewAsLoading(true); + + if (assets?.textures3d == null) + return; + + string baseColorUrl = assets.textures3d.baseColor; + string normalUrl = assets.textures3d.normal; + string hrmUrl = assets.textures3d.hrm; + + Texture2D baseColorTexture = await webRequestController.GetTextureAsync(new CommonArguments(URLAddress.FromString(baseColorUrl)), new GetTextureArguments(false), GetTextureWebRequest.CreateTexture(TextureWrapMode.Clamp, FilterMode.Bilinear), ct, ReportCategory.BADGES); + Texture2D normalTexture = await webRequestController.GetTextureAsync(new CommonArguments(URLAddress.FromString(normalUrl)), new GetTextureArguments(false), GetTextureWebRequest.CreateTexture(TextureWrapMode.Clamp, FilterMode.Bilinear), ct, ReportCategory.BADGES); + Texture2D hrmTexture = await webRequestController.GetTextureAsync(new CommonArguments(URLAddress.FromString(hrmUrl)), new GetTextureArguments(false), GetTextureWebRequest.CreateTexture(TextureWrapMode.Clamp, FilterMode.Bilinear), ct, ReportCategory.BADGES); + + Set3DImage(baseColorTexture, normalTexture, hrmTexture); + SetBadgeInfoViewAsLoading(false); + } + catch (OperationCanceledException) { } + catch (Exception e) + { + const string ERROR_MESSAGE = "There was an error loading badge textures. Please try again!"; + passportErrorsController.Show(ERROR_MESSAGE); + ReportHub.LogError(ReportCategory.BADGES, $"{ERROR_MESSAGE} ERROR: {e.Message}"); + } + } + + private void SetBadgeInfoViewAsLoading(bool isLoading) + { + badgeInfoModuleView.ImageLoadingSpinner.SetActive(isLoading); + badgeInfoModuleView.Badge3DImage.gameObject.SetActive(!isLoading); + } + + private void Set3DImage(Texture2D baseColor, Texture2D normal, Texture2D hrm) + { + badgeInfoModuleView.Badge3DMaterial.SetTexture(BASE_COLOR, baseColor); + badgeInfoModuleView.Badge3DMaterial.SetTexture(NORMAL, normal); + badgeInfoModuleView.Badge3DMaterial.SetTexture(HRM, hrm); + } + } +} diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleSubController.cs.meta b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleSubController.cs.meta new file mode 100644 index 0000000000..925e97c943 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleSubController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9b541a4ece294c9288dea87629cfb628 +timeCreated: 1724225989 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleView.cs b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleView.cs new file mode 100644 index 0000000000..a0350b27c2 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleView.cs @@ -0,0 +1,91 @@ +using DCL.Passport.Fields.Badges; +using TMPro; +using UnityEngine; +using UnityEngine.UI; + +namespace DCL.Passport.Modules.Badges +{ + public class BadgeInfo_PassportModuleView : MonoBehaviour + { + [field: SerializeField] + public GameObject MainContainer { get; private set; } + + [field: SerializeField] + public GameObject MainLoadingSpinner { get; private set; } + + [field: SerializeField] + public GameObject ImageLoadingSpinner { get; private set; } + + [field: SerializeField] + public RawImage Badge3DImage { get; private set; } + + [field: SerializeField] + public Color Badge3DImageUnlockedColor { get; private set; } + + [field: SerializeField] + public Color Badge3DImageLockedColor { get; private set; } + + [field: SerializeField] + public Animator Badge3DAnimator { get; private set; } + + [field: SerializeField] + public Material Badge3DMaterial { get; private set; } + + [field: SerializeField] + public Sprite DefaultBadgeSprite { get; private set; } + + [field: SerializeField] + public TMP_Text BadgeNameText { get; private set; } + + [field: SerializeField] + public TMP_Text BadgeDateText { get; private set; } + + [field: SerializeField] + public TMP_Text BadgeDescriptionText { get; private set; } + + [field: SerializeField] + public GameObject TierSection { get; private set; } + + [field: SerializeField] + public BadgeTierButton_PassportFieldView BadgeTierButtonPrefab { get; private set; } + + [field: SerializeField] + public RectTransform AllTiersContainer { get; private set; } + + [field: SerializeField] + public GameObject TopTierMark { get; private set; } + + [field: SerializeField] + public GameObject NextTierContainer { get; private set; } + + [field: SerializeField] + public TMP_Text NextTierValueText { get; private set; } + + [field: SerializeField] + public TMP_Text NextTierDescriptionText { get; private set; } + + [field: SerializeField] + public RectTransform NextTierProgressBar { get; private set; } + + [field: SerializeField] + public GameObject NextTierProgressBarContainer { get; private set; } + + [field: SerializeField] + public RectTransform NextTierProgressBarFill { get; private set; } + + [field: SerializeField] + public TMP_Text NextTierProgressValueText { get; private set; } + + [field: SerializeField] + public RectTransform SimpleBadgeProgressBar { get; private set; } + + [field: SerializeField] + public GameObject SimpleBadgeProgressBarContainer { get; private set; } + + [field: SerializeField] + public RectTransform SimpleBadgeProgressBarFill { get; private set; } + + [field: SerializeField] + public TMP_Text SimpleBadgeProgressValueText { get; private set; } + } +} diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleView.cs.meta b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleView.cs.meta new file mode 100644 index 0000000000..02f8726889 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgeInfo_PassportModuleView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8c970bfa0f514c5bba7b7a959c29e98a +timeCreated: 1723733332 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesCategories_PassportModuleSubController.cs b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesCategories_PassportModuleSubController.cs new file mode 100644 index 0000000000..fd5fc79c68 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesCategories_PassportModuleSubController.cs @@ -0,0 +1,139 @@ +using DCL.Passport.Fields.Badges; +using DCL.UI; +using System; +using System.Collections.Generic; +using UnityEngine.Pool; +using Object = UnityEngine.Object; + +namespace DCL.Passport.Modules.Badges +{ + public class BadgesCategories_PassportModuleSubController + { + private const string ALL_FILTER = "All"; + private const int BADGES_CATEGORIES_POOL_DEFAULT_CAPACITY = 6; + + public readonly List<ButtonWithSelectableStateView> InstantiatedBadgesFilterButtons = new (); + public readonly List<BadgesCategorySeparator_PassportFieldView> InstantiatedBadgesCategorySeparators = new (); + public readonly List<BadgesCategoryContainer_PassportFieldView> InstantiatedBadgesCategoryContainers = new (); + public event Action<string> OnBadgesFilterButtonClicked; + public string? CurrentFilter; + + private readonly BadgesDetails_PassportModuleView view; + private readonly IObjectPool<ButtonWithSelectableStateView> badgesFilterButtonsPool; + private readonly IObjectPool<BadgesCategorySeparator_PassportFieldView> badgesCategorySeparatorsPool; + private readonly IObjectPool<BadgesCategoryContainer_PassportFieldView> badgesCategoryContainersPool; + + public BadgesCategories_PassportModuleSubController(BadgesDetails_PassportModuleView view) + { + this.view = view; + + badgesFilterButtonsPool = new ObjectPool<ButtonWithSelectableStateView>( + InstantiateBadgesFilterButtonPrefab, + defaultCapacity: BADGES_CATEGORIES_POOL_DEFAULT_CAPACITY, + actionOnGet: badgesFilterButton => + { + badgesFilterButton.gameObject.SetActive(false); + badgesFilterButton.gameObject.transform.SetAsLastSibling(); + }, + actionOnRelease: badgesFilterButton => badgesFilterButton.gameObject.SetActive(false)); + + badgesCategorySeparatorsPool = new ObjectPool<BadgesCategorySeparator_PassportFieldView>( + InstantiateBadgesCategorySeparatorPrefab, + defaultCapacity: BADGES_CATEGORIES_POOL_DEFAULT_CAPACITY, + actionOnGet: badgesCategorySeparator => + { + badgesCategorySeparator.gameObject.SetActive(false); + badgesCategorySeparator.gameObject.transform.SetAsLastSibling(); + }, + actionOnRelease: badgesCategorySeparator => badgesCategorySeparator.gameObject.SetActive(false)); + + badgesCategoryContainersPool = new ObjectPool<BadgesCategoryContainer_PassportFieldView>( + InstantiateBadgesCategoryContainerPrefab, + defaultCapacity: BADGES_CATEGORIES_POOL_DEFAULT_CAPACITY, + actionOnGet: badgesCategoryContainer => badgesCategoryContainer.gameObject.SetActive(false), + actionOnRelease: badgesCategoryContainer => badgesCategoryContainer.gameObject.SetActive(false)); + } + + public void CreateFilterButton(string badgeCategory) + { + var badgeFilterButton = badgesFilterButtonsPool.Get(); + badgeFilterButton.SetSelected(badgeCategory == ALL_FILTER); + badgeFilterButton.Text.text = badgeCategory; + badgeFilterButton.Button.onClick.AddListener(() => OnBadgesFilterButtonClicked.Invoke(badgeCategory)); + InstantiatedBadgesFilterButtons.Add(badgeFilterButton); + } + + public void CreateCategorySeparator(string badgeCategory) + { + var badgesCategorySeparator = badgesCategorySeparatorsPool.Get(); + badgesCategorySeparator.gameObject.name = $"Separator_{badgeCategory.ToUpper()}"; + badgesCategorySeparator.CategoryText.text = badgeCategory.ToUpper(); + InstantiatedBadgesCategorySeparators.Add(badgesCategorySeparator); + } + + public void CreateCategoryContainer(string badgeCategory) + { + var badgesCategoryContainer = badgesCategoryContainersPool.Get(); + badgesCategoryContainer.gameObject.name = $"Container_{badgeCategory.ToUpper()}"; + badgesCategoryContainer.Category = badgeCategory; + + // Place category container under the corresponding separator + foreach (var badgesCategorySeparator in InstantiatedBadgesCategorySeparators) + { + if (!string.Equals(badgesCategorySeparator.CategoryText.text, badgeCategory, StringComparison.OrdinalIgnoreCase)) + continue; + + badgesCategoryContainer.transform.SetSiblingIndex(badgesCategorySeparator.transform.GetSiblingIndex() + 1); + break; + } + + InstantiatedBadgesCategoryContainers.Add(badgesCategoryContainer); + } + + public void ClearBadgesFilterButtons() + { + foreach (ButtonWithSelectableStateView badgesFilterButton in InstantiatedBadgesFilterButtons) + { + badgesFilterButton.Button.onClick.RemoveAllListeners(); + badgesFilterButtonsPool.Release(badgesFilterButton); + } + + InstantiatedBadgesFilterButtons.Clear(); + CurrentFilter = null; + } + + public void ClearBadgesCategorySeparators() + { + foreach (BadgesCategorySeparator_PassportFieldView badgesCategorySeparator in InstantiatedBadgesCategorySeparators) + badgesCategorySeparatorsPool.Release(badgesCategorySeparator); + + InstantiatedBadgesCategorySeparators.Clear(); + } + + public void ClearBadgesCategoryContainers() + { + foreach (BadgesCategoryContainer_PassportFieldView badgesCategoryContainer in InstantiatedBadgesCategoryContainers) + badgesCategoryContainersPool.Release(badgesCategoryContainer); + + InstantiatedBadgesCategoryContainers.Clear(); + } + + private ButtonWithSelectableStateView InstantiateBadgesFilterButtonPrefab() + { + ButtonWithSelectableStateView badgesFilterButton = Object.Instantiate(view.BadgesFilterButtonPrefab, view.BadgesFilterButtonsContainer); + return badgesFilterButton; + } + + private BadgesCategorySeparator_PassportFieldView InstantiateBadgesCategorySeparatorPrefab() + { + BadgesCategorySeparator_PassportFieldView badgesCategorySeparator = Object.Instantiate(view.BadgesCategorySeparatorPrefab, view.MainContainer); + return badgesCategorySeparator; + } + + private BadgesCategoryContainer_PassportFieldView InstantiateBadgesCategoryContainerPrefab() + { + BadgesCategoryContainer_PassportFieldView badgesCategoryContainer = Object.Instantiate(view.BadgesCategoryContainerPrefab, view.MainContainer); + return badgesCategoryContainer; + } + } +} diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesCategories_PassportModuleSubController.cs.meta b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesCategories_PassportModuleSubController.cs.meta new file mode 100644 index 0000000000..35d2cd3d12 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesCategories_PassportModuleSubController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 10fab9c3393b43adbf573fe1a1e95076 +timeCreated: 1725359656 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleController.cs b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleController.cs new file mode 100644 index 0000000000..1dc1a04edc --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleController.cs @@ -0,0 +1,283 @@ +using Cysharp.Threading.Tasks; +using DCL.BadgesAPIService; +using DCL.Diagnostics; +using DCL.Passport.Fields.Badges; +using DCL.Profiles; +using DCL.Profiles.Self; +using DCL.UI; +using DCL.WebRequests; +using System; +using System.Collections.Generic; +using System.Threading; +using Utility; + +namespace DCL.Passport.Modules.Badges +{ + public class BadgesDetails_PassportModuleController : IPassportModuleController + { + private const string ALL_FILTER = "All"; + + private readonly BadgesDetails_PassportModuleView view; + private readonly BadgesAPIClient badgesAPIClient; + private readonly PassportErrorsController passportErrorsController; + private readonly ISelfProfile selfProfile; + private readonly BadgesCategories_PassportModuleSubController badgesCategoriesController; + private readonly BadgeInfo_PassportModuleSubController badgeInfoController; + private readonly BadgeDetailsCards_PassportModuleSubController badgeDetailsCardsController; + + private Profile currentProfile; + private string? currentDefaultBadgeId; + private bool isOwnProfile; + private List<string> badgeCategories; + private CancellationTokenSource fetchBadgesCts; + private CancellationTokenSource fetchTiersCts; + private CancellationTokenSource checkProfileCts; + + public BadgesDetails_PassportModuleController( + BadgesDetails_PassportModuleView view, + BadgeInfo_PassportModuleView badgeInfoModuleView, + BadgesAPIClient badgesAPIClient, + PassportErrorsController passportErrorsController, + IWebRequestController webRequestController, + ISelfProfile selfProfile) + { + this.view = view; + this.badgesAPIClient = badgesAPIClient; + this.passportErrorsController = passportErrorsController; + this.selfProfile = selfProfile; + + badgesCategoriesController = new BadgesCategories_PassportModuleSubController(view); + badgeInfoController = new BadgeInfo_PassportModuleSubController(badgeInfoModuleView, webRequestController, badgesAPIClient, passportErrorsController); + badgeDetailsCardsController = new BadgeDetailsCards_PassportModuleSubController(view, webRequestController, badgesCategoriesController, badgeInfoController); + + badgesCategoriesController.OnBadgesFilterButtonClicked += OnBadgesCategoryButtonClicked; + } + + public void SetBadgeByDefault(string badgeId) => + currentDefaultBadgeId = badgeId; + + public void Setup(Profile profile) + { + currentProfile = profile; + checkProfileCts = checkProfileCts.SafeRestart(); + CheckProfileAndLoadBadgesAsync(checkProfileCts.Token).Forget(); + } + + public void Clear() + { + checkProfileCts.SafeCancelAndDispose(); + fetchBadgesCts.SafeCancelAndDispose(); + + badgeDetailsCardsController.ClearBadgeDetailCards(); + badgesCategoriesController.ClearBadgesFilterButtons(); + badgesCategoriesController.ClearBadgesCategorySeparators(); + badgesCategoriesController.ClearBadgesCategoryContainers(); + badgeInfoController.Clear(); + } + + public void Dispose() + { + badgesCategoriesController.OnBadgesFilterButtonClicked -= OnBadgesCategoryButtonClicked; + Clear(); + } + + private async UniTaskVoid CheckProfileAndLoadBadgesAsync(CancellationToken ct) + { + var ownProfile = await selfProfile.ProfileAsync(ct); + isOwnProfile = ownProfile?.UserId == currentProfile.UserId; + LoadBadgeDetailCards(); + } + + private void LoadBadgeDetailCards() + { + Clear(); + badgeInfoController.SetAsLoading(true); + badgeInfoController.SetAsEmpty(false); + view.NoBadgesLabel.SetActive(false); + + if (string.IsNullOrEmpty(currentProfile.UserId)) + return; + + fetchBadgesCts = fetchBadgesCts.SafeRestart(); + LoadBadgeDetailCardsAsync(currentProfile.UserId, fetchBadgesCts.Token).Forget(); + } + + private async UniTaskVoid LoadBadgeDetailCardsAsync(string walletId, CancellationToken ct) + { + try + { + badgesCategoriesController.CreateFilterButton(ALL_FILTER); + badgesCategoriesController.CurrentFilter = ALL_FILTER; + await LoadBadgeCategoriesAsync(ct); + + view.LoadingSpinner.SetActive(true); + var badges = await badgesAPIClient.FetchBadgesAsync(walletId, isOwnProfile, ct); + + foreach (var unlockedBadge in badges.achieved) + badgeDetailsCardsController.CreateBadgeDetailCard(unlockedBadge, isOwnProfile); + + if (isOwnProfile) + { + foreach (var lockedBadge in badges.notAchieved) + badgeDetailsCardsController.CreateBadgeDetailCard(lockedBadge, isOwnProfile); + } + + ActivateOnlyCategoriesInUse(); + badgeDetailsCardsController.CreateEmptyDetailCards(); + ShowBadgesInGridByCategory(ALL_FILTER); + view.LoadingSpinner.SetActive(false); + badgeInfoController.SetAsEmpty(badges.achieved.Count == 0 && badges.notAchieved.Count == 0); + view.NoBadgesLabel.SetActive(badges.achieved.Count == 0 && badges.notAchieved.Count == 0); + } + catch (OperationCanceledException) { } + catch (Exception e) + { + const string ERROR_MESSAGE = "There was an error loading badges. Please try again!"; + passportErrorsController.Show(ERROR_MESSAGE); + ReportHub.LogError(ReportCategory.BADGES, $"{ERROR_MESSAGE} ERROR: {e.Message}"); + } + } + + private async UniTask LoadBadgeCategoriesAsync(CancellationToken ct) + { + try + { + badgeCategories = await badgesAPIClient.FetchBadgeCategoriesAsync(ct); + + foreach (string category in badgeCategories) + { + badgesCategoriesController.CreateFilterButton(category); + badgesCategoriesController.CreateCategorySeparator(category); + badgesCategoriesController.CreateCategoryContainer(category); + } + } + catch (OperationCanceledException) { } + catch (Exception e) + { + const string ERROR_MESSAGE = "There was an error loading badges. Please try again!"; + passportErrorsController.Show(ERROR_MESSAGE); + ReportHub.LogError(ReportCategory.BADGES, $"{ERROR_MESSAGE} ERROR: {e.Message}"); + } + } + + private void ActivateOnlyCategoriesInUse() + { + var numberOfActiveSeparators = 0; + badgesCategoriesController.InstantiatedBadgesFilterButtons[0].gameObject.SetActive(true); + foreach (var badgesCategorySeparator in badgesCategoriesController.InstantiatedBadgesCategorySeparators) + { + if (!badgeDetailsCardsController.InstantiatedBadgeDetailCards.TryGetValue(badgesCategorySeparator.CategoryText.text.ToLower(), out List<BadgeDetailCard_PassportFieldView> badgeDetailCards)) + continue; + + if (badgeDetailCards.Count > 0) + { + badgesCategorySeparator.gameObject.SetActive(true); + numberOfActiveSeparators++; + } + else + { + badgesCategorySeparator.gameObject.SetActive(false); + continue; + } + + foreach (var filterButton in badgesCategoriesController.InstantiatedBadgesFilterButtons) + { + if (!string.Equals(filterButton.Text.text, badgesCategorySeparator.CategoryText.text, StringComparison.OrdinalIgnoreCase)) + continue; + + filterButton.gameObject.SetActive(true); + break; + } + } + + view.BadgesFilterButtonsContainer.gameObject.SetActive(numberOfActiveSeparators > 1); + } + + private void ShowBadgesInGridByCategory(string category) + { + badgesCategoriesController.CurrentFilter = category; + + foreach (var badgesCategorySeparator in badgesCategoriesController.InstantiatedBadgesCategorySeparators) + badgesCategorySeparator.gameObject.SetActive(category == ALL_FILTER && badgeDetailsCardsController.InstantiatedBadgeDetailCards.ContainsKey(badgesCategorySeparator.CategoryText.text.ToLower())); + + foreach (var badgesCategoryContainer in badgesCategoriesController.InstantiatedBadgesCategoryContainers) + badgesCategoryContainer.gameObject.SetActive(category == ALL_FILTER ? + badgeDetailsCardsController.InstantiatedBadgeDetailCards.ContainsKey(badgesCategoryContainer.Category.ToLower()) : + badgesCategoryContainer.Category.Equals(category, StringComparison.OrdinalIgnoreCase)); + + if (string.IsNullOrEmpty(currentDefaultBadgeId)) + SelectFirstBadge(); + else + SelectSpecificBadge(); + } + + private void SelectFirstBadge() + { + var firstElementSelected = false; + BadgeDetailCard_PassportFieldView? cardToSelect = null; + foreach (string? category in badgeCategories) + { + if (badgesCategoriesController.CurrentFilter != ALL_FILTER && !string.Equals(category, badgesCategoriesController.CurrentFilter, StringComparison.OrdinalIgnoreCase)) + continue; + + if (!badgeDetailsCardsController.InstantiatedBadgeDetailCards.TryGetValue(category.ToLower(), out List<BadgeDetailCard_PassportFieldView> badgeDetailCards)) + continue; + + if (badgeDetailCards.Count == 0) + continue; + + foreach (var badgeDetailCard in badgeDetailCards) + { + badgeDetailCard.SetAsSelected(false); + if (!firstElementSelected) + cardToSelect = badgeDetailCard; + + firstElementSelected = true; + } + } + + if (cardToSelect != null) + badgeDetailsCardsController.SelectBadgeCard(cardToSelect, isOwnProfile); + } + + private void SelectSpecificBadge() + { + if (string.IsNullOrEmpty(currentDefaultBadgeId)) + { + SelectFirstBadge(); + return; + } + + BadgeDetailCard_PassportFieldView? cardToSelect = null; + foreach (var badgeDetailCard in badgeDetailsCardsController.InstantiatedBadgeDetailCards) + { + foreach (var badgeCard in badgeDetailCard.Value) + { + if (badgeCard.Model.data.id == currentDefaultBadgeId) + { + badgeCard.SetAsSelected(false); + cardToSelect = badgeCard; + } + } + } + + if (cardToSelect != null) + badgeDetailsCardsController.SelectBadgeCard(cardToSelect, isOwnProfile); + else + SelectFirstBadge(); + + currentDefaultBadgeId = null; + } + + private void OnBadgesCategoryButtonClicked(string categoryFilter) + { + if (badgesCategoriesController.CurrentFilter == categoryFilter) + return; + + foreach (ButtonWithSelectableStateView filterButton in badgesCategoriesController.InstantiatedBadgesFilterButtons) + filterButton.SetSelected(filterButton.Text.text == categoryFilter); + + ShowBadgesInGridByCategory(categoryFilter); + } + } +} diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleController.cs.meta b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleController.cs.meta new file mode 100644 index 0000000000..d4f2f043be --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 60a27759ca294ad0b1ed3fa47a327e2d +timeCreated: 1723476778 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleView.cs b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleView.cs new file mode 100644 index 0000000000..bb65723e52 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleView.cs @@ -0,0 +1,33 @@ +using DCL.Passport.Fields.Badges; +using DCL.UI; +using UnityEngine; + +namespace DCL.Passport.Modules.Badges +{ + public class BadgesDetails_PassportModuleView : MonoBehaviour + { + [field: SerializeField] + public ButtonWithSelectableStateView BadgesFilterButtonPrefab { get; private set; } + + [field: SerializeField] + public RectTransform BadgesFilterButtonsContainer { get; private set; } + + [field: SerializeField] + public BadgesCategorySeparator_PassportFieldView BadgesCategorySeparatorPrefab { get; private set; } + + [field: SerializeField] + public BadgesCategoryContainer_PassportFieldView BadgesCategoryContainerPrefab { get; private set; } + + [field: SerializeField] + public RectTransform MainContainer { get; private set; } + + [field: SerializeField] + public BadgeDetailCard_PassportFieldView BadgeDetailCardPrefab { get; private set; } + + [field: SerializeField] + public GameObject LoadingSpinner { get; private set; } + + [field: SerializeField] + public GameObject NoBadgesLabel { get; private set; } + } +} diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleView.cs.meta b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleView.cs.meta new file mode 100644 index 0000000000..d963167795 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesDetails_PassportModuleView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a31e5242bc2c472fa821f9308a228b27 +timeCreated: 1723469439 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleController.cs b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleController.cs new file mode 100644 index 0000000000..e9beda1d21 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleController.cs @@ -0,0 +1,114 @@ +using Cysharp.Threading.Tasks; +using DCL.BadgesAPIService; +using DCL.Diagnostics; +using DCL.Passport.Fields.Badges; +using DCL.Profiles; +using DCL.WebRequests; +using System; +using System.Collections.Generic; +using System.Threading; +using UnityEngine.Pool; +using Utility; +using Object = UnityEngine.Object; + +namespace DCL.Passport.Modules.Badges +{ + public class BadgesOverview_PassportModuleController : IPassportModuleController + { + private const int BADGES_OVERVIEW_MAX_COUNT = 5; + + private readonly BadgesOverview_PassportModuleView view; + private readonly BadgesAPIClient badgesAPIClient; + private readonly PassportErrorsController passportErrorsController; + private readonly IObjectPool<BadgeOverviewItem_PassportFieldView> badgesOverviewItemsPool; + private readonly List<BadgeOverviewItem_PassportFieldView> instantiatedBadgesOverviewItems = new (); + + private Profile currentProfile; + private CancellationTokenSource fetchBadgesCts; + + public BadgesOverview_PassportModuleController( + BadgesOverview_PassportModuleView view, + BadgesAPIClient badgesAPIClient, + PassportErrorsController passportErrorsController, + IWebRequestController webRequestController) + { + this.view = view; + this.badgesAPIClient = badgesAPIClient; + this.passportErrorsController = passportErrorsController; + + badgesOverviewItemsPool = new ObjectPool<BadgeOverviewItem_PassportFieldView>( + InstantiateBadgeOverviewItemPrefab, + defaultCapacity: BADGES_OVERVIEW_MAX_COUNT, + actionOnGet: badgeOverviewItemView => + { + badgeOverviewItemView.ConfigureImageController(webRequestController); + badgeOverviewItemView.gameObject.SetActive(true); + badgeOverviewItemView.gameObject.transform.SetAsLastSibling(); + }, + actionOnRelease: badgeOverviewItemView => badgeOverviewItemView.gameObject.SetActive(false)); + } + + public void Setup(Profile profile) + { + currentProfile = profile; + LoadBadgesOverviewItems(); + } + + public void Clear() + { + fetchBadgesCts.SafeCancelAndDispose(); + + foreach (BadgeOverviewItem_PassportFieldView badgeOverviewItem in instantiatedBadgesOverviewItems) + { + badgeOverviewItem.StopLoadingImage(); + badgesOverviewItemsPool.Release(badgeOverviewItem); + } + + instantiatedBadgesOverviewItems.Clear(); + } + + public void Dispose() => + Clear(); + + private BadgeOverviewItem_PassportFieldView InstantiateBadgeOverviewItemPrefab() + { + BadgeOverviewItem_PassportFieldView badgeOverviewItemView = Object.Instantiate(view.BadgeOverviewItemPrefab, view.BadgeOverviewItemsContainer); + return badgeOverviewItemView; + } + + private void LoadBadgesOverviewItems() + { + Clear(); + + if (string.IsNullOrEmpty(currentProfile.UserId)) + return; + + fetchBadgesCts = fetchBadgesCts.SafeRestart(); + LoadBadgesOverviewAsync(currentProfile.UserId, fetchBadgesCts.Token).Forget(); + } + + private async UniTaskVoid LoadBadgesOverviewAsync(string walletId, CancellationToken ct) + { + try + { + var badges = await badgesAPIClient.FetchLatestAchievedBadgesAsync(walletId, ct); + foreach (var badgeInfo in badges) + { + var badgeOverviewItem = badgesOverviewItemsPool.Get(); + badgeOverviewItem.Setup(badgeInfo); + instantiatedBadgesOverviewItems.Add(badgeOverviewItem); + } + + view.BadgeOverviewItemsContainer.gameObject.SetActive(instantiatedBadgesOverviewItems.Count > 0); + view.NoBadgesLabel.SetActive(instantiatedBadgesOverviewItems.Count == 0); + } + catch (OperationCanceledException) { } + catch (Exception e) + { + const string ERROR_MESSAGE = "There was an error loading badges. Please try again!"; + passportErrorsController.Show(ERROR_MESSAGE); + ReportHub.LogError(ReportCategory.BADGES, $"{ERROR_MESSAGE} ERROR: {e.Message}"); + } + } + } +} diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleController.cs.meta b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleController.cs.meta new file mode 100644 index 0000000000..9cffa130ef --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5713c5fa4d45407f965595108b662c73 +timeCreated: 1723456164 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleView.cs b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleView.cs new file mode 100644 index 0000000000..cdcdd38499 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleView.cs @@ -0,0 +1,17 @@ +using DCL.Passport.Fields.Badges; +using UnityEngine; + +namespace DCL.Passport.Modules.Badges +{ + public class BadgesOverview_PassportModuleView : MonoBehaviour + { + [field: SerializeField] + public BadgeOverviewItem_PassportFieldView BadgeOverviewItemPrefab { get; private set; } + + [field: SerializeField] + public RectTransform BadgeOverviewItemsContainer { get; private set; } + + [field: SerializeField] + public GameObject NoBadgesLabel { get; private set; } + } +} diff --git a/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleView.cs.meta b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleView.cs.meta new file mode 100644 index 0000000000..773ba232b3 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Modules/Badges/BadgesOverview_PassportModuleView.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f282b72920be42ffb024cf1abac04da5 +timeCreated: 1723455259 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Modules/EquippedItems_PassportModuleController.cs b/Explorer/Assets/DCL/Passport/Modules/EquippedItems_PassportModuleController.cs index 0fcb1c736b..e3b90bc4f6 100644 --- a/Explorer/Assets/DCL/Passport/Modules/EquippedItems_PassportModuleController.cs +++ b/Explorer/Assets/DCL/Passport/Modules/EquippedItems_PassportModuleController.cs @@ -1,6 +1,7 @@ using Arch.Core; using Cysharp.Threading.Tasks; using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; @@ -235,22 +236,26 @@ private void SetGridElements(List<IWearable> gridWearables, IReadOnlyList<IEmote } } - private int CalculateMissingEmptyItems(int totalItems) + private static int CalculateMissingEmptyItems(int totalItems) { - int remainder = totalItems % 6; - int missingItems = remainder == 0 ? 0 : 6 - remainder; + int remainder = totalItems % GRID_ITEMS_PER_ROW; + int missingItems = remainder == 0 ? 0 : GRID_ITEMS_PER_ROW - remainder; return missingItems; } - private async UniTaskVoid AwaitEquippedItemsPromiseAsync(WearablePromise equippedWearablesPromise, EmotePromise equippedEmotesPromise, CancellationToken ct) + private async UniTaskVoid AwaitEquippedItemsPromiseAsync( + WearablePromise equippedWearablesPromise, + EmotePromise equippedEmotesPromise, + CancellationToken ct + ) { try { var wearablesUniTaskAsync = await equippedWearablesPromise.ToUniTaskAsync(world, cancellationToken: ct); var emotesUniTaskAsync = await equippedEmotesPromise.ToUniTaskAsync(world, cancellationToken: ct); var currentWearables = wearablesUniTaskAsync.Result!.Value.Asset.Wearables; - var currentEmotes = emotesUniTaskAsync.Result!.Value.Asset.Emotes; - SetGridElements(currentWearables, currentEmotes); + using var consumed = emotesUniTaskAsync.Result!.Value.Asset.ConsumeEmotes(); + SetGridElements(currentWearables, consumed.Value); } catch (OperationCanceledException) { } catch (Exception e) diff --git a/Explorer/Assets/DCL/Passport/Passport.asmdef b/Explorer/Assets/DCL/Passport/Passport.asmdef index 6259682378..7445088357 100644 --- a/Explorer/Assets/DCL/Passport/Passport.asmdef +++ b/Explorer/Assets/DCL/Passport/Passport.asmdef @@ -21,10 +21,15 @@ "GUID:5eabe9a3d4dd19d42a16208ea5411062", "GUID:6830e2f56251b492e9934f1fafbc8c7d", "GUID:bd0560debe21467c961ac123eedc3c05", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:91cf8206af184dac8e30eb46747e9939", "GUID:f95dba842fdbb470fb6d1dced822ba04", - "GUID:52421c42d33594c47a6fbd48b45b1259" + "GUID:52421c42d33594c47a6fbd48b45b1259", + "GUID:009d9a3e28944e8590be5228174e6979", + "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", + "GUID:828002f0a2864c3cbbca4d1de01c7455", + "GUID:543b8f091a5947a3880b7f2bca2358bd", + "GUID:e5a23cdae0ef4d86aafc237a73280975" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Passport/PassportController.Params.cs b/Explorer/Assets/DCL/Passport/PassportController.Params.cs index 562c90ce82..b07357463d 100644 --- a/Explorer/Assets/DCL/Passport/PassportController.Params.cs +++ b/Explorer/Assets/DCL/Passport/PassportController.Params.cs @@ -5,10 +5,12 @@ public partial class PassportController public struct Params { public string UserId { get; } + public string? BadgeIdSelected { get; } - public Params(string userId) + public Params(string userId, string? badgeIdSelected = null) { UserId = userId; + BadgeIdSelected = badgeIdSelected; } } } diff --git a/Explorer/Assets/DCL/Passport/PassportController.cs b/Explorer/Assets/DCL/Passport/PassportController.cs index f77b09d2ec..ed917ed598 100644 --- a/Explorer/Assets/DCL/Passport/PassportController.cs +++ b/Explorer/Assets/DCL/Passport/PassportController.cs @@ -2,6 +2,7 @@ using Cysharp.Threading.Tasks; using DCL.AvatarRendering.Wearables; using DCL.Backpack; +using DCL.BadgesAPIService; using DCL.Browser; using DCL.CharacterPreview; using DCL.Chat; @@ -9,9 +10,13 @@ using DCL.Input; using DCL.Input.Component; using DCL.Multiplayer.Connections.DecentralandUrls; +using DCL.NotificationsBusController.NotificationsBus; +using DCL.NotificationsBusController.NotificationTypes; using DCL.Passport.Modules; +using DCL.Passport.Modules.Badges; using DCL.Profiles; using DCL.Profiles.Self; +using DCL.WebRequests; using MVC; using System; using System.Collections.Generic; @@ -26,8 +31,6 @@ public partial class PassportController : ControllerBase<PassportView, PassportC { private static readonly int BG_SHADER_COLOR_1 = Shader.PropertyToID("_Color1"); - public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup; - private readonly ICursor cursor; private readonly IProfileRepository profileRepository; private readonly ICharacterPreviewFactory characterPreviewFactory; @@ -42,14 +45,24 @@ public partial class PassportController : ControllerBase<PassportView, PassportC private readonly IThumbnailProvider thumbnailProvider; private readonly IWebBrowser webBrowser; private readonly IDecentralandUrlsSource decentralandUrlsSource; + private readonly BadgesAPIClient badgesAPIClient; + private readonly IWebRequestController webRequestController; + private readonly PassportProfileInfoController passportProfileInfoController; + private readonly List<IPassportModuleController> commonPassportModules = new (); + private readonly List<IPassportModuleController> overviewPassportModules = new (); + private readonly List<IPassportModuleController> badgesPassportModules = new (); private readonly IInputBlock inputBlock; - private string? currentUserId; + private Profile? ownProfile; + private string currentUserId; + private CancellationTokenSource? openPassportFromBadgeNotificationCts; private CancellationTokenSource? characterPreviewLoadingCts; private PassportErrorsController? passportErrorsController; private PassportCharacterPreviewController? characterPreviewController; - private readonly PassportProfileInfoController passportProfileInfoController; - private readonly List<IPassportModuleController> passportModules = new (); + private PassportSection currentSection; + private PassportSection alreadyLoadedSections; + + public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup; public event Action<string>? PassportOpened; @@ -70,7 +83,10 @@ public PassportController( IThumbnailProvider thumbnailProvider, IWebBrowser webBrowser, IDecentralandUrlsSource decentralandUrlsSource, - IInputBlock inputBlock + BadgesAPIClient badgesAPIClient, + IWebRequestController webRequestController, + IInputBlock inputBlock, + INotificationsBusController notificationBusController ) : base(viewFactory) { this.cursor = cursor; @@ -87,21 +103,31 @@ IInputBlock inputBlock this.thumbnailProvider = thumbnailProvider; this.webBrowser = webBrowser; this.decentralandUrlsSource = decentralandUrlsSource; + this.badgesAPIClient = badgesAPIClient; + this.webRequestController = webRequestController; this.inputBlock = inputBlock; + passportProfileInfoController = new PassportProfileInfoController(selfProfile, world, playerEntity); + notificationBusController.SubscribeToNotificationTypeReceived(NotificationType.BADGE_GRANTED, OnBadgeNotificationReceived); + notificationBusController.SubscribeToNotificationTypeClick(NotificationType.BADGE_GRANTED, OnBadgeNotificationClicked); } protected override void OnViewInstantiated() { Assert.IsNotNull(world); - passportErrorsController = new PassportErrorsController(viewInstance.ErrorNotification); + passportErrorsController = new PassportErrorsController(viewInstance!.ErrorNotification); characterPreviewController = new PassportCharacterPreviewController(viewInstance.CharacterPreviewView, characterPreviewFactory, world, characterPreviewEventBus); - passportModules.Add(new UserBasicInfo_PassportModuleController(viewInstance.UserBasicInfoModuleView, chatEntryConfiguration, selfProfile, passportErrorsController)); - passportModules.Add(new UserDetailedInfo_PassportModuleController(viewInstance.UserDetailedInfoModuleView, mvcManager, selfProfile, viewInstance.AddLinkModal, passportErrorsController, passportProfileInfoController)); - passportModules.Add(new EquippedItems_PassportModuleController(viewInstance.EquippedItemsModuleView, world, rarityBackgrounds, rarityColors, categoryIcons, thumbnailProvider, webBrowser, decentralandUrlsSource, passportErrorsController)); + commonPassportModules.Add(new UserBasicInfo_PassportModuleController(viewInstance.UserBasicInfoModuleView, chatEntryConfiguration, selfProfile, passportErrorsController)); + overviewPassportModules.Add(new UserDetailedInfo_PassportModuleController(viewInstance.UserDetailedInfoModuleView, mvcManager, selfProfile, viewInstance.AddLinkModal, passportErrorsController, passportProfileInfoController)); + overviewPassportModules.Add(new EquippedItems_PassportModuleController(viewInstance.EquippedItemsModuleView, world, rarityBackgrounds, rarityColors, categoryIcons, thumbnailProvider, webBrowser, decentralandUrlsSource, passportErrorsController)); + overviewPassportModules.Add(new BadgesOverview_PassportModuleController(viewInstance.BadgesOverviewModuleView, badgesAPIClient, passportErrorsController, webRequestController)); + badgesPassportModules.Add(new BadgesDetails_PassportModuleController(viewInstance.BadgesDetailsModuleView, viewInstance.BadgeInfoModuleView, badgesAPIClient, passportErrorsController, webRequestController, selfProfile)); passportProfileInfoController.PublishError += OnPublishError; - passportProfileInfoController.OnProfilePublished += SetupPassportModules; + passportProfileInfoController.OnProfilePublished += OnProfilePublished; + + viewInstance.OverviewSectionButton.Button.onClick.AddListener(OpenOverviewSection); + viewInstance.BadgesSectionButton.Button.onClick.AddListener(() => OpenBadgesSection()); } private void OnPublishError() @@ -112,15 +138,17 @@ private void OnPublishError() protected override void OnViewShow() { currentUserId = inputData.UserId; + alreadyLoadedSections = PassportSection.NONE; cursor.Unlock(); - characterPreviewLoadingCts = characterPreviewLoadingCts.SafeRestart(); - LoadUserProfileAsync(currentUserId, characterPreviewLoadingCts.Token).Forget(); - viewInstance!.MainScroll.verticalNormalizedPosition = 1; - inputBlock.Disable(InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Camera , InputMapComponent.Kind.Player); + if (string.IsNullOrEmpty(inputData.BadgeIdSelected)) + OpenOverviewSection(); + else + OpenBadgesSection(inputData.BadgeIdSelected); - viewInstance.ErrorNotification.Hide(true); + inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.PLAYER); + viewInstance!.ErrorNotification.Hide(true); PassportOpened?.Invoke(currentUserId); } @@ -128,65 +156,176 @@ protected override void OnViewClose() { passportErrorsController!.Hide(true); - inputBlock.Enable(InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Camera , InputMapComponent.Kind.Player); + inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.PLAYER); characterPreviewController!.OnHide(); characterPreviewLoadingCts.SafeCancelAndDispose(); - foreach (IPassportModuleController module in passportModules) + + foreach (IPassportModuleController module in commonPassportModules) + module.Clear(); + + foreach (IPassportModuleController module in overviewPassportModules) module.Clear(); + + foreach (IPassportModuleController module in badgesPassportModules) + module.Clear(); + + currentSection = PassportSection.NONE; } protected override UniTask WaitForCloseIntentAsync(CancellationToken ct) => UniTask.WhenAny( - viewInstance.CloseButton.OnClickAsync(ct), + viewInstance!.CloseButton.OnClickAsync(ct), viewInstance.BackgroundButton.OnClickAsync(ct)); public override void Dispose() { passportErrorsController?.Hide(true); + openPassportFromBadgeNotificationCts.SafeCancelAndDispose(); characterPreviewLoadingCts.SafeCancelAndDispose(); characterPreviewController?.Dispose(); - passportProfileInfoController.OnProfilePublished -= SetupPassportModules; + passportProfileInfoController.OnProfilePublished -= OnProfilePublished; passportProfileInfoController.PublishError -= OnPublishError; - foreach (IPassportModuleController module in passportModules) + foreach (IPassportModuleController module in commonPassportModules) + module.Dispose(); + + foreach (IPassportModuleController module in overviewPassportModules) + module.Dispose(); + + foreach (IPassportModuleController module in badgesPassportModules) module.Dispose(); } - private async UniTaskVoid LoadUserProfileAsync(string userId, CancellationToken ct) + private async UniTaskVoid LoadPassportSectionAsync(string userId, PassportSection sectionToLoad, CancellationToken ct, string? badgeIdSelected = null) { try { + if (EnumUtils.HasFlag(alreadyLoadedSections, sectionToLoad)) + return; + // Load user profile - var profile = await profileRepository.GetAsync(userId, 0, ct); + Profile? profile = await profileRepository.GetAsync(userId, 0, ct); if (profile == null) return; - viewInstance.BackgroundImage.material.SetColor(BG_SHADER_COLOR_1, chatEntryConfiguration.GetNameColor(profile.Name)); + UpdateBackgroundColor(profile.Name); - // Load avatar preview - characterPreviewController!.Initialize(profile.Avatar); - characterPreviewController.OnShow(); + if (sectionToLoad == PassportSection.OVERVIEW) + { + // Load avatar preview + characterPreviewController!.Initialize(profile.Avatar); + characterPreviewController.OnShow(); + } // Load passport modules - SetupPassportModules(profile); + SetupPassportModules(profile, sectionToLoad, badgeIdSelected); + alreadyLoadedSections |= sectionToLoad; } catch (OperationCanceledException) { } catch (Exception e) { - const string ERROR_MESSAGE = "There was an error while trying to load the profile. Please try again!"; + const string ERROR_MESSAGE = "There was an error while opening the Passport. Please try again!"; passportErrorsController!.Show(ERROR_MESSAGE); ReportHub.LogError(ReportCategory.PROFILE, $"{ERROR_MESSAGE} ERROR: {e.Message}"); } } - private void SetupPassportModules(Profile profile) + private void UpdateBackgroundColor(string profileName) + { + Color.RGBToHSV(chatEntryConfiguration.GetNameColor(profileName), out float h, out float s, out float v); + viewInstance?.BackgroundImage.material.SetColor(BG_SHADER_COLOR_1, Color.HSVToRGB(h, s, Mathf.Clamp01(v - 0.3f))); + } + + private void SetupPassportModules(Profile profile, PassportSection passportSection, string? badgeIdSelected = null) { - foreach (IPassportModuleController module in passportModules) + foreach (IPassportModuleController module in commonPassportModules) module.Setup(profile); + + List<IPassportModuleController> passportModulesToSetup = passportSection == PassportSection.OVERVIEW ? overviewPassportModules : badgesPassportModules; + foreach (IPassportModuleController module in passportModulesToSetup) + { + if (module is BadgesDetails_PassportModuleController badgesDetailsController && !string.IsNullOrEmpty(badgeIdSelected)) + badgesDetailsController.SetBadgeByDefault(badgeIdSelected); + + module.Setup(profile); + } + } + + private void OnProfilePublished(Profile profile) => + SetupPassportModules(profile, PassportSection.OVERVIEW); + + private void OpenOverviewSection() + { + if (currentSection == PassportSection.OVERVIEW) + return; + + viewInstance!.OverviewSectionButton.SetSelected(true); + viewInstance.BadgesSectionButton.SetSelected(false); + viewInstance.OverviewSectionPanel.SetActive(true); + viewInstance.BadgesSectionPanel.SetActive(false); + viewInstance.MainScroll.content = viewInstance.OverviewSectionPanel.transform as RectTransform; + viewInstance.MainScroll.verticalNormalizedPosition = 1; + viewInstance.CharacterPreviewView.gameObject.SetActive(true); + + characterPreviewLoadingCts = characterPreviewLoadingCts.SafeRestart(); + LoadPassportSectionAsync(currentUserId, PassportSection.OVERVIEW, characterPreviewLoadingCts.Token).Forget(); + currentSection = PassportSection.OVERVIEW; + viewInstance.BadgeInfoModuleView.gameObject.SetActive(false); + } + + private void OpenBadgesSection(string? badgeIdSelected = null) + { + if (currentSection == PassportSection.BADGES) + return; + + viewInstance!.OverviewSectionButton.SetSelected(false); + viewInstance.BadgesSectionButton.SetSelected(true); + viewInstance.OverviewSectionPanel.SetActive(false); + viewInstance.BadgesSectionPanel.SetActive(true); + viewInstance.MainScroll.content = viewInstance.BadgesSectionPanel.transform as RectTransform; + viewInstance.MainScroll.verticalNormalizedPosition = 1; + viewInstance.CharacterPreviewView.gameObject.SetActive(false); + + characterPreviewLoadingCts = characterPreviewLoadingCts.SafeRestart(); + LoadPassportSectionAsync(currentUserId, PassportSection.BADGES, characterPreviewLoadingCts.Token, badgeIdSelected).Forget(); + currentSection = PassportSection.BADGES; + viewInstance.BadgeInfoModuleView.gameObject.SetActive(true); + } + + private void OnBadgeNotificationReceived(INotification notification) => + BadgesUtils.SetBadgeAsNew(((BadgeGrantedNotification)notification).Metadata.Id); + + private void OnBadgeNotificationClicked(object[] parameters) + { + string badgeIdToOpen = string.Empty; + + if (parameters.Length > 0 && parameters[0] is BadgeGrantedNotification badgeNotification) + badgeIdToOpen = badgeNotification.Metadata.Id; + + openPassportFromBadgeNotificationCts = openPassportFromBadgeNotificationCts.SafeRestart(); + OpenPassportFromBadgeNotificationAsync(badgeIdToOpen, openPassportFromBadgeNotificationCts.Token).Forget(); + } + + private async UniTaskVoid OpenPassportFromBadgeNotificationAsync(string badgeIdToOpen, CancellationToken ct) + { + try + { + ownProfile ??= await selfProfile.ProfileAsync(ct); + + if (ownProfile != null) + mvcManager.ShowAsync(IssueCommand(new Params(ownProfile.UserId, badgeIdToOpen)), ct).Forget(); + } + catch (OperationCanceledException) { } + catch (Exception e) + { + const string ERROR_MESSAGE = "There was an error while opening the Badges section into the Passport. Please try again!"; + passportErrorsController!.Show(ERROR_MESSAGE); + ReportHub.LogError(ReportCategory.PROFILE, $"{ERROR_MESSAGE} ERROR: {e.Message}"); + } } } } diff --git a/Explorer/Assets/DCL/Passport/PassportSection.cs b/Explorer/Assets/DCL/Passport/PassportSection.cs new file mode 100644 index 0000000000..8fcf512ad6 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/PassportSection.cs @@ -0,0 +1,12 @@ +using System; + +namespace DCL.Passport +{ + [Flags] + public enum PassportSection + { + NONE, + OVERVIEW = 1, + BADGES = 1 << 1, + } +} diff --git a/Explorer/Assets/DCL/Passport/PassportSection.cs.meta b/Explorer/Assets/DCL/Passport/PassportSection.cs.meta new file mode 100644 index 0000000000..2405dda459 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/PassportSection.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f05551c7353c4ded941351ca89456b44 +timeCreated: 1723467074 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/PassportView.cs b/Explorer/Assets/DCL/Passport/PassportView.cs index 993646f0da..a02f0f42af 100644 --- a/Explorer/Assets/DCL/Passport/PassportView.cs +++ b/Explorer/Assets/DCL/Passport/PassportView.cs @@ -1,6 +1,7 @@ using DCL.CharacterPreview; using DCL.Passport.Modals; using DCL.Passport.Modules; +using DCL.Passport.Modules.Badges; using DCL.UI; using MVC; using UnityEngine; @@ -34,6 +35,15 @@ public class PassportView : ViewBase, IView [field: SerializeField] public EquippedItems_PassportModuleView EquippedItemsModuleView { get; private set; } + [field: SerializeField] + public BadgesOverview_PassportModuleView BadgesOverviewModuleView { get; private set; } + + [field: SerializeField] + public BadgesDetails_PassportModuleView BadgesDetailsModuleView { get; private set; } + + [field: SerializeField] + public BadgeInfo_PassportModuleView BadgeInfoModuleView { get; private set; } + [field: SerializeField] public RectTransform MainContainer { get; private set; } @@ -42,5 +52,17 @@ public class PassportView : ViewBase, IView [field: SerializeField] public WarningNotificationView ErrorNotification { get; private set; } + + [field: SerializeField] + public ButtonWithSelectableStateView OverviewSectionButton { get; private set; } + + [field: SerializeField] + public ButtonWithSelectableStateView BadgesSectionButton { get; private set; } + + [field: SerializeField] + public GameObject OverviewSectionPanel { get; private set; } + + [field: SerializeField] + public GameObject BadgesSectionPanel { get; private set; } } } diff --git a/Explorer/Assets/DCL/Passport/Prefabs/AdditionalField_PassportField.prefab b/Explorer/Assets/DCL/Passport/Prefabs/AdditionalField_PassportField.prefab index ab0503e026..ec15daa9e3 100644 --- a/Explorer/Assets/DCL/Passport/Prefabs/AdditionalField_PassportField.prefab +++ b/Explorer/Assets/DCL/Passport/Prefabs/AdditionalField_PassportField.prefab @@ -539,7 +539,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6741436331689411846, guid: 593328dae0676544bbbac027ee30f9d5, type: 3} propertyPath: m_hasFontAssetChanged - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 9097780066956728766, guid: 593328dae0676544bbbac027ee30f9d5, type: 3} propertyPath: m_fontColor.a @@ -755,7 +755,7 @@ PrefabInstance: - target: {fileID: 3634989480188834563, guid: a30e7446d5f849649a66f24dfb5b6933, type: 3} propertyPath: m_fontAsset value: - objectReference: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + objectReference: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} - target: {fileID: 3634989480188834563, guid: a30e7446d5f849649a66f24dfb5b6933, type: 3} propertyPath: m_fontSizeMax value: 16 @@ -774,7 +774,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3634989480188834563, guid: a30e7446d5f849649a66f24dfb5b6933, type: 3} propertyPath: m_hasFontAssetChanged - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 3934912518001919750, guid: a30e7446d5f849649a66f24dfb5b6933, type: 3} propertyPath: m_AnchorMax.x @@ -815,7 +815,7 @@ PrefabInstance: - target: {fileID: 5338121310425341266, guid: a30e7446d5f849649a66f24dfb5b6933, type: 3} propertyPath: m_fontAsset value: - objectReference: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + objectReference: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} - target: {fileID: 5338121310425341266, guid: a30e7446d5f849649a66f24dfb5b6933, type: 3} propertyPath: m_fontSizeMax value: 16 @@ -834,7 +834,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5338121310425341266, guid: a30e7446d5f849649a66f24dfb5b6933, type: 3} propertyPath: m_hasFontAssetChanged - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 5421800564082040363, guid: a30e7446d5f849649a66f24dfb5b6933, type: 3} propertyPath: m_Name diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges.meta new file mode 100644 index 0000000000..84015ab1a9 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c03a5989be0c4c9da77890e179de97d8 +timeCreated: 1724169535 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/Badge3DPreviewCamera.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/Badge3DPreviewCamera.prefab new file mode 100644 index 0000000000..5615e8e04b --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/Badge3DPreviewCamera.prefab @@ -0,0 +1,410 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &384134109602129421 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6315629430373237660} + - component: {fileID: 8839841422032170982} + - component: {fileID: 1542994358235849125} + m_Layer: 31 + m_Name: Badge3DPreviewCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6315629430373237660 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 384134109602129421} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8893472050947157426} + - {fileID: 1055635786934427255} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &8839841422032170982 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 384134109602129421} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 20 + field of view: 37 + orthographic: 0 + orthographic size: 3 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 2147483648 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: 12d1eb45a938cce40bf2831d970c5727, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!114 &1542994358235849125 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 384134109602129421} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: 0 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 1 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 +--- !u!1 &3654869557990348961 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8893472050947157426} + - component: {fileID: 539768484126348941} + - component: {fileID: 3544297500350109734} + m_Layer: 31 + m_Name: Point Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8893472050947157426 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3654869557990348961} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -3, z: 5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6315629430373237660} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &539768484126348941 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3654869557990348961} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 2 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 50 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 2147483648 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!114 &3544297500350109734 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3654869557990348961} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 3 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_RenderingLayers: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_ShadowRenderingLayers: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 0 +--- !u!1 &7673796645293113919 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1055635786934427255} + - component: {fileID: 2333833773583042938} + m_Layer: 31 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1055635786934427255 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7673796645293113919} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3523612797060064731} + m_Father: {fileID: 6315629430373237660} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &2333833773583042938 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7673796645293113919} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 33a971bb28d87914298f87968f21c529, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 +--- !u!1 &8665322282150647608 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3523612797060064731} + - component: {fileID: 8484493069459100902} + - component: {fileID: 8296579380273699519} + - component: {fileID: 4502510327866882756} + m_Layer: 31 + m_Name: Badge3DPreviewPlane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3523612797060064731 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8665322282150647608} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0.7071068, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1055635786934427255} + m_LocalEulerAnglesHint: {x: 90, y: 90, z: -90} +--- !u!33 &8484493069459100902 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8665322282150647608} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &8296579380273699519 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8665322282150647608} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 493478f41d9de0944bc5cf983afbb6f7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &4502510327866882756 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8665322282150647608} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/Badge3DPreviewCamera.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/Badge3DPreviewCamera.prefab.meta new file mode 100644 index 0000000000..6ca5624ee5 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/Badge3DPreviewCamera.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8a91951d2f71f174d998356f01a3603c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeDetailCard_PassportField.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeDetailCard_PassportField.prefab new file mode 100644 index 0000000000..c19eb278b6 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeDetailCard_PassportField.prefab @@ -0,0 +1,1557 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &201350337523535441 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8368688260297764256} + - component: {fileID: 3127315530577815492} + - component: {fileID: 2629988230920715453} + m_Layer: 5 + m_Name: BadgeDetailCard_PassportField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8368688260297764256 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 201350337523535441} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 9184249326602769018} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 53.5, y: -24.2} + m_SizeDelta: {x: 150, y: 214} + m_Pivot: {x: 0, y: 1} +--- !u!222 &3127315530577815492 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 201350337523535441} + m_CullTransparentMesh: 1 +--- !u!114 &2629988230920715453 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 201350337523535441} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 51e7fd108cb944da84d2e0615f7c2fe5, type: 3} + m_Name: + m_EditorClassIdentifier: + <SubContainerTransform>k__BackingField: {fileID: 9184249326602769018} + <BackgroundImage>k__BackingField: {fileID: 1816530278998034804} + <Button>k__BackingField: {fileID: 8812524962591062540} + <NewMark>k__BackingField: {fileID: 7029244276979546499} + <BadgeImage>k__BackingField: {fileID: 1051050222174448962} + <DefaultBadgeSprite>k__BackingField: {fileID: 21300000, guid: d2bc0e4246537449fbc27b863cc9b0c3, type: 3} + <BadgeNameText>k__BackingField: {fileID: 5777092650220846656} + <SelectedOutline>k__BackingField: {fileID: 8684358576087683374} + <TopTierMark>k__BackingField: {fileID: 8773965984418862122} + <BadgeDateText>k__BackingField: {fileID: 6061356165548585028} + <NextTierTitle>k__BackingField: {fileID: 4521353412566967113} + <ProgressBar>k__BackingField: {fileID: 8074991929852742615} + <ProgressBarFill>k__BackingField: {fileID: 6226304240553801147} + <NormalBackgroundColor>k__BackingField: {r: 0, g: 0, b: 0, a: 0.4} + <HoverBackgroundColor>k__BackingField: {r: 1, g: 1, b: 1, a: 0.03137255} + <LockedBadgeImageColor>k__BackingField: {r: 1, g: 1, b: 1, a: 0.03137255} + <NonLockedBadgeImageColor>k__BackingField: {r: 1, g: 1, b: 1, a: 1} +--- !u!1 &2549124844008324019 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8074991929852742615} + - component: {fileID: 2754470839022751605} + - component: {fileID: 1291867013153986989} + m_Layer: 5 + m_Name: ProgressBar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &8074991929852742615 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2549124844008324019} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6226304240553801147} + m_Father: {fileID: 9184249326602769018} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 22} + m_SizeDelta: {x: 80, y: 6} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &2754470839022751605 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2549124844008324019} + m_CullTransparentMesh: 1 +--- !u!114 &1291867013153986989 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2549124844008324019} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.101960786} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b34e561ca43654b87acc771ca93cd646, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!1 &4094296564663200649 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7706307914797920044} + - component: {fileID: 5278241098943359122} + - component: {fileID: 1520405774502558655} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7706307914797920044 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4094296564663200649} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1546624755516456829} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 5, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5278241098943359122 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4094296564663200649} + m_CullTransparentMesh: 1 +--- !u!114 &1520405774502558655 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4094296564663200649} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: achieved + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294769916 + m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 9 + m_fontSizeBase: 9 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 10 + m_fontSizeMax: 14 + m_fontStyle: 16 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &4521353412566967113 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6098301305181178247} + - component: {fileID: 5966980540892073867} + - component: {fileID: 6437507901802039752} + m_Layer: 5 + m_Name: NextTierText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &6098301305181178247 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4521353412566967113} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 9184249326602769018} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 34} + m_SizeDelta: {x: 126, y: 15} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &5966980540892073867 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4521353412566967113} + m_CullTransparentMesh: 1 +--- !u!114 &6437507901802039752 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4521353412566967113} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: NEXT TIER + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 3003121663 + m_fontColor: {r: 1, g: 1, b: 1, a: 0.69803923} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 12 + m_fontSizeBase: 12 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 10 + m_fontSizeMax: 14 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &4721286438111740014 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7120843181448403655} + - component: {fileID: 2385077982356413940} + - component: {fileID: 4314068931201055688} + m_Layer: 5 + m_Name: Icon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7120843181448403655 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4721286438111740014} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1546624755516456829} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 4.9, y: 0} + m_SizeDelta: {x: 7, y: 7} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &2385077982356413940 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4721286438111740014} + m_CullTransparentMesh: 1 +--- !u!114 &4314068931201055688 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4721286438111740014} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: cb8d7b1147d7f42ccaf203e780f69acb, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6861037941152311066 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9184249326602769018} + - component: {fileID: 6158808489738580658} + - component: {fileID: 1816530278998034804} + - component: {fileID: 8812524962591062540} + - component: {fileID: 5983943415280752329} + m_Layer: 5 + m_Name: SubContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9184249326602769018 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6861037941152311066} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1546624755516456829} + - {fileID: 6339577723646594589} + - {fileID: 1102155340967602289} + - {fileID: 5629105677564579826} + - {fileID: 4118250534881523296} + - {fileID: 6098301305181178247} + - {fileID: 8074991929852742615} + - {fileID: 624313347813745446} + m_Father: {fileID: 8368688260297764256} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6158808489738580658 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6861037941152311066} + m_CullTransparentMesh: 1 +--- !u!114 &1816530278998034804 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6861037941152311066} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.4} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 12dd1efc4e826764f9b02be515a9a033, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 2 +--- !u!114 &8812524962591062540 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6861037941152311066} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 0, g: 0, b: 0, a: 0.4} + m_HighlightedColor: {r: 1, g: 1, b: 1, a: 0.101960786} + m_PressedColor: {r: 0, g: 0, b: 0, a: 0.4} + m_SelectedColor: {r: 1, g: 1, b: 1, a: 0.101960786} + m_DisabledColor: {r: 0, g: 0, b: 0, a: 0} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1816530278998034804} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &5983943415280752329 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6861037941152311066} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1cdc6c1a43024e58bcd05d3e69a19db4, type: 3} + m_Name: + m_EditorClassIdentifier: + <Button>k__BackingField: {fileID: 8812524962591062540} + <ButtonPressedAudio>k__BackingField: {fileID: 11400000, guid: cbbd6a003fc75e24da47c13feacd92c7, type: 2} + <ButtonHoverAudio>k__BackingField: {fileID: 11400000, guid: 59da234351971c0498a566fb811b0c36, type: 2} +--- !u!1 &7029244276979546499 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 624313347813745446} + - component: {fileID: 1932065512899292576} + - component: {fileID: 3160089996949390165} + m_Layer: 5 + m_Name: NewMark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &624313347813745446 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7029244276979546499} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4801739808480227904} + m_Father: {fileID: 9184249326602769018} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -8.3, y: -8} + m_SizeDelta: {x: 36.699997, y: 18.57} + m_Pivot: {x: 1, y: 1} +--- !u!222 &1932065512899292576 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7029244276979546499} + m_CullTransparentMesh: 1 +--- !u!114 &3160089996949390165 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7029244276979546499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.1764706, b: 0.33333334, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 12dd1efc4e826764f9b02be515a9a033, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 4 +--- !u!1 &7259667444186082313 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4801739808480227904} + - component: {fileID: 6656162761623700194} + - component: {fileID: 6205084886636546469} + m_Layer: 5 + m_Name: NewLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4801739808480227904 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7259667444186082313} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 624313347813745446} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6656162761623700194 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7259667444186082313} + m_CullTransparentMesh: 1 +--- !u!114 &6205084886636546469 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7259667444186082313} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: NEW + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 12 + m_fontSizeBase: 12 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &7496045805075012573 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4118250534881523296} + - component: {fileID: 1231245360812155309} + - component: {fileID: 6061356165548585028} + m_Layer: 5 + m_Name: BadgeDate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4118250534881523296 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7496045805075012573} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 9184249326602769018} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 20} + m_SizeDelta: {x: 126, y: 10} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &1231245360812155309 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7496045805075012573} + m_CullTransparentMesh: 1 +--- !u!114 &6061356165548585028 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7496045805075012573} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\u2014" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 3003121663 + m_fontColor: {r: 1, g: 1, b: 1, a: 0.69803923} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 13 + m_fontSizeBase: 13 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 10 + m_fontSizeMax: 14 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &7533464670735815353 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6226304240553801147} + - component: {fileID: 6972499281475989916} + - component: {fileID: 127016082892208026} + m_Layer: 5 + m_Name: ProgressBarFill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6226304240553801147 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7533464670735815353} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8074991929852742615} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 60, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &6972499281475989916 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7533464670735815353} + m_CullTransparentMesh: 1 +--- !u!114 &127016082892208026 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7533464670735815353} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 02706f511f9374d4495a02b37c255cca, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!1 &7651877767812643760 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1102155340967602289} + - component: {fileID: 2018600729888201056} + - component: {fileID: 7669307147239545067} + - component: {fileID: 1051050222174448962} + m_Layer: 5 + m_Name: BadgeImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1102155340967602289 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7651877767812643760} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6994188666952068991} + m_Father: {fileID: 9184249326602769018} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -64} + m_SizeDelta: {x: 86, y: 86} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2018600729888201056 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7651877767812643760} + m_CullTransparentMesh: 1 +--- !u!114 &7669307147239545067 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7651877767812643760} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d2bc0e4246537449fbc27b863cc9b0c3, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &1051050222174448962 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7651877767812643760} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1e79e296834574c5d9138852d94c8998, type: 3} + m_Name: + m_EditorClassIdentifier: + <LoadingObject>k__BackingField: {fileID: 5857638817186123817} + <Image>k__BackingField: {fileID: 7669307147239545067} +--- !u!1 &8684358576087683374 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6339577723646594589} + - component: {fileID: 3704894138107986292} + - component: {fileID: 6521421557469187249} + m_Layer: 5 + m_Name: SelectedOutline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &6339577723646594589 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8684358576087683374} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 9184249326602769018} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 12, y: 12} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3704894138107986292 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8684358576087683374} + m_CullTransparentMesh: 1 +--- !u!114 &6521421557469187249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8684358576087683374} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.45490196, b: 0.22352941, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 1dcae7b3183f24eb39310ae8e4c092a5, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1.5 +--- !u!1 &8693587359689017563 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5629105677564579826} + - component: {fileID: 5490389247540481891} + - component: {fileID: 5777092650220846656} + m_Layer: 5 + m_Name: BadgeName + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5629105677564579826 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8693587359689017563} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 9184249326602769018} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -121} + m_SizeDelta: {x: 126, y: 38} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5490389247540481891 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8693587359689017563} + m_CullTransparentMesh: 1 +--- !u!114 &5777092650220846656 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8693587359689017563} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Badge Name + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 10 + m_fontSizeMax: 14 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &8773965984418862122 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1546624755516456829} + - component: {fileID: 3701696355567912892} + - component: {fileID: 3717040181519109249} + m_Layer: 5 + m_Name: AchievedMark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1546624755516456829 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8773965984418862122} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7120843181448403655} + - {fileID: 7706307914797920044} + m_Father: {fileID: 9184249326602769018} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 37.5} + m_SizeDelta: {x: 65.2766, y: 14} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &3701696355567912892 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8773965984418862122} + m_CullTransparentMesh: 1 +--- !u!114 &3717040181519109249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8773965984418862122} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.13333334, g: 0.64705884, b: 0.05490196, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 12dd1efc4e826764f9b02be515a9a033, type: 3} + m_Type: 1 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 6 +--- !u!1001 &8152016027400459936 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1102155340967602289} + m_Modifications: + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.x + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -336.96002 + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Name + value: LoadingSpinner + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} +--- !u!1 &5857638817186123817 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 8152016027400459936} + m_PrefabAsset: {fileID: 0} +--- !u!224 &6994188666952068991 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 8152016027400459936} + m_PrefabAsset: {fileID: 0} diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeDetailCard_PassportField.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeDetailCard_PassportField.prefab.meta new file mode 100644 index 0000000000..5273e7554d --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeDetailCard_PassportField.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0e1dd120dcd088a41814a49e4de926e2 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/ExplorePanel/Assets/SystemMenu.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeInfo_PassportSubView.prefab similarity index 51% rename from Explorer/Assets/DCL/ExplorePanel/Assets/SystemMenu.prefab rename to Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeInfo_PassportSubView.prefab index 93a0160f17..9dfe4cfe20 100644 --- a/Explorer/Assets/DCL/ExplorePanel/Assets/SystemMenu.prefab +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeInfo_PassportSubView.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &85887707464957238 +--- !u!1 &366722239076770147 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8,140 +8,193 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 4944797187935891954} - - component: {fileID: 679658448721248532} - - component: {fileID: 3110079610612909851} - - component: {fileID: 8203385680364564446} - - component: {fileID: 4895239566997363781} + - component: {fileID: 6084731364583839620} + - component: {fileID: 2362410370277947892} + - component: {fileID: 5243723824965145378} m_Layer: 5 - m_Name: CloseMenu + m_Name: NextTierValue m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &4944797187935891954 +--- !u!224 &6084731364583839620 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 85887707464957238} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 366722239076770147} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 8267765186225222719} + m_Father: {fileID: 5591882598683303819} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: -621.839, y: -470.404} - m_SizeDelta: {x: 1920, y: 1080} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &679658448721248532 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 44.999996, y: 0} + m_SizeDelta: {x: -90.00001, y: 0} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &2362410370277947892 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 85887707464957238} + m_GameObject: {fileID: 366722239076770147} m_CullTransparentMesh: 1 ---- !u!114 &3110079610612909851 +--- !u!114 &5243723824965145378 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 85887707464957238} + m_GameObject: {fileID: 366722239076770147} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &8203385680364564446 -MonoBehaviour: + m_text: SILVER + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 16 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 9 + m_fontSizeMax: 18 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &603885841950620585 +GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 85887707464957238} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 0 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 3110079610612909851} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!114 &4895239566997363781 + serializedVersion: 6 + m_Component: + - component: {fileID: 4968766394081327445} + - component: {fileID: 3461050850055322930} + m_Layer: 5 + m_Name: SimpleBadgeProgressBar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4968766394081327445 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 603885841950620585} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7914798706302518808} + - {fileID: 5778040473573580} + m_Father: {fileID: 4953146958260233880} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 422, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3461050850055322930 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 85887707464957238} + m_GameObject: {fileID: 603885841950620585} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} m_Name: m_EditorClassIdentifier: - m_IgnoreLayout: 1 + m_IgnoreLayout: 0 m_MinWidth: -1 - m_MinHeight: -1 + m_MinHeight: 30 m_PreferredWidth: -1 m_PreferredHeight: -1 m_FlexibleWidth: -1 m_FlexibleHeight: -1 m_LayoutPriority: 1 ---- !u!1 &192957034105422050 +--- !u!1 &724120708741276712 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -149,50 +202,128 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 5752141580369950532} - - component: {fileID: 5956138144549204116} - - component: {fileID: 451990179035094545} + - component: {fileID: 523436847881732749} + - component: {fileID: 4233365464464617988} m_Layer: 5 - m_Name: Text (TMP) + m_Name: BadgeInfo_PassportSubView + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &523436847881732749 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 724120708741276712} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7611579212404689972} + - {fileID: 1220008731870394335} + - {fileID: 3855642741860842082} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 514, y: 928} + m_Pivot: {x: 0, y: 1} +--- !u!114 &4233365464464617988 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 724120708741276712} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8c970bfa0f514c5bba7b7a959c29e98a, type: 3} + m_Name: + m_EditorClassIdentifier: + <MainContainer>k__BackingField: {fileID: 5242678451131758154} + <MainLoadingSpinner>k__BackingField: {fileID: 2356664135297845385} + <ImageLoadingSpinner>k__BackingField: {fileID: 707054564195466416} + <Badge3DImage>k__BackingField: {fileID: 3850944021201886613} + <Badge3DImageUnlockedColor>k__BackingField: {r: 1, g: 1, b: 1, a: 1} + <Badge3DImageLockedColor>k__BackingField: {r: 1, g: 1, b: 1, a: 0.2} + <Badge3DAnimator>k__BackingField: {fileID: 4775803898855288964} + <Badge3DMaterial>k__BackingField: {fileID: 2100000, guid: 493478f41d9de0944bc5cf983afbb6f7, type: 2} + <DefaultBadgeSprite>k__BackingField: {fileID: 21300000, guid: d2bc0e4246537449fbc27b863cc9b0c3, type: 3} + <BadgeNameText>k__BackingField: {fileID: 4895039616460394219} + <BadgeDateText>k__BackingField: {fileID: 8868651118548766628} + <BadgeDescriptionText>k__BackingField: {fileID: 554059921697414627} + <TierSection>k__BackingField: {fileID: 2347355774804234473} + <BadgeTierButtonPrefab>k__BackingField: {fileID: 2745748071276464951, guid: f638c5ea4e9c6eb4188ca8a1c7186e69, type: 3} + <AllTiersContainer>k__BackingField: {fileID: 591624019621191472} + <TopTierMark>k__BackingField: {fileID: 9064459426940548429} + <NextTierContainer>k__BackingField: {fileID: 7990036928022041474} + <NextTierValueText>k__BackingField: {fileID: 5243723824965145378} + <NextTierDescriptionText>k__BackingField: {fileID: 6267087643615186405} + <NextTierProgressBar>k__BackingField: {fileID: 7047782645285880734} + <NextTierProgressBarContainer>k__BackingField: {fileID: 4800062101727484193} + <NextTierProgressBarFill>k__BackingField: {fileID: 2326033637731831319} + <NextTierProgressValueText>k__BackingField: {fileID: 8327448739598134556} + <SimpleBadgeProgressBar>k__BackingField: {fileID: 7914798706302518808} + <SimpleBadgeProgressBarContainer>k__BackingField: {fileID: 603885841950620585} + <SimpleBadgeProgressBarFill>k__BackingField: {fileID: 4766820125301958299} + <SimpleBadgeProgressValueText>k__BackingField: {fileID: 5876449986843033701} +--- !u!1 &1585193957589129029 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6738831624750552165} + - component: {fileID: 1546021166834101836} + - component: {fileID: 4895039616460394219} + m_Layer: 5 + m_Name: BadgeName m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &5752141580369950532 +--- !u!224 &6738831624750552165 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192957034105422050} + m_GameObject: {fileID: 1585193957589129029} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 4071907483158260624} + m_Father: {fileID: 4953146958260233880} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 37, y: 0} - m_SizeDelta: {x: 200, y: 30} - m_Pivot: {x: 0, y: 0.5} ---- !u!222 &5956138144549204116 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 422, y: 0} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &1546021166834101836 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192957034105422050} + m_GameObject: {fileID: 1585193957589129029} m_CullTransparentMesh: 1 ---- !u!114 &451990179035094545 +--- !u!114 &4895039616460394219 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192957034105422050} + m_GameObject: {fileID: 1585193957589129029} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -200,13 +331,13 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 0 + m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: ACCOUNT SETTINGS + m_text: Badge Name m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} @@ -233,13 +364,13 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 14 - m_fontSizeBase: 15 + m_fontSize: 24 + m_fontSizeBase: 24 m_fontWeight: 400 - m_enableAutoSizing: 1 - m_fontSizeMin: 0 - m_fontSizeMax: 14 - m_fontStyle: 16 + m_enableAutoSizing: 0 + m_fontSizeMin: 15 + m_fontSizeMax: 24 + m_fontStyle: 0 m_HorizontalAlignment: 1 m_VerticalAlignment: 512 m_textAlignment: 65535 @@ -249,12 +380,12 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_TextWrappingMode: 0 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 - m_overflowMode: 1 + m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 + m_enableKerning: 0 m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 @@ -277,7 +408,7 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &528726892192081606 +--- !u!1 &1864848443806700273 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -285,50 +416,50 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 2777237063111902307} - - component: {fileID: 5757154264930382433} - - component: {fileID: 7919072342851405077} + - component: {fileID: 7033740546897469291} + - component: {fileID: 5172796849477954305} + - component: {fileID: 8327448739598134556} m_Layer: 5 - m_Name: Text (TMP) + m_Name: Value m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &2777237063111902307 +--- !u!224 &7033740546897469291 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 528726892192081606} + m_GameObject: {fileID: 1864848443806700273} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 4342812624956019710} + m_Father: {fileID: 4572866439249782663} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &5757154264930382433 + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 367, y: 0} + m_SizeDelta: {x: 70, y: 22} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &5172796849477954305 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 528726892192081606} + m_GameObject: {fileID: 1864848443806700273} m_CullTransparentMesh: 1 ---- !u!114 &7919072342851405077 +--- !u!114 &8327448739598134556 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 528726892192081606} + m_GameObject: {fileID: 1864848443806700273} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -342,7 +473,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Terms of Service + m_text: 100/100 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} @@ -351,8 +482,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4289239968 - m_fontColor: {r: 0.627451, g: 0.60784316, b: 0.65882355, a: 1} + rgba: 4294769916 + m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -369,14 +500,14 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 12 - m_fontSizeBase: 12 + m_fontSize: 16 + m_fontSizeBase: 16 m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 + m_enableAutoSizing: 1 + m_fontSizeMin: 9 + m_fontSizeMax: 16 m_fontStyle: 0 - m_HorizontalAlignment: 2 + m_HorizontalAlignment: 1 m_VerticalAlignment: 512 m_textAlignment: 65535 m_characterSpacing: 0 @@ -385,12 +516,12 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_TextWrappingMode: 0 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 + m_enableKerning: 0 m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 @@ -413,7 +544,7 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &806422774094826258 +--- !u!1 &1932688107631557453 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -421,185 +552,64 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 4342812624956019710} - - component: {fileID: 3476788002972854469} - - component: {fileID: 1044627387933223681} - - component: {fileID: 3230561843785619710} + - component: {fileID: 2880557101886905115} + - component: {fileID: 1559529339897906182} + - component: {fileID: 7503293763071162800} m_Layer: 5 - m_Name: TermsOfServiceButton + m_Name: Text (TMP) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &4342812624956019710 +--- !u!224 &2880557101886905115 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 806422774094826258} + m_GameObject: {fileID: 1932688107631557453} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2777237063111902307} - m_Father: {fileID: 5440871007616277791} + m_Children: [] + m_Father: {fileID: 1180619615557992413} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 35.9, y: 1} - m_SizeDelta: {x: 100, y: 15} - m_Pivot: {x: 0, y: 0.5} ---- !u!222 &3476788002972854469 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 8.499999, y: 0} + m_SizeDelta: {x: -33.000004, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1559529339897906182 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 806422774094826258} + m_GameObject: {fileID: 1932688107631557453} m_CullTransparentMesh: 1 ---- !u!114 &1044627387933223681 +--- !u!114 &7503293763071162800 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 806422774094826258} + m_GameObject: {fileID: 1932688107631557453} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &3230561843785619710 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 806422774094826258} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 0 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 1044627387933223681} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!1 &953437535499145147 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4631241175981062173} - - component: {fileID: 6719013373678550989} - - component: {fileID: 707915790630588744} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &4631241175981062173 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 953437535499145147} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 3968970127064442057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &6719013373678550989 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 953437535499145147} - m_CullTransparentMesh: 1 ---- !u!114 &707915790630588744 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 953437535499145147} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 0 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: PREVIEW PROFILE + m_text: TOP TIER ACHIEVED m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} @@ -608,8 +618,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4294769916 - m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -630,9 +640,9 @@ MonoBehaviour: m_fontSizeBase: 14 m_fontWeight: 400 m_enableAutoSizing: 0 - m_fontSizeMin: 0 - m_fontSizeMax: 14 - m_fontStyle: 16 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 m_HorizontalAlignment: 2 m_VerticalAlignment: 512 m_textAlignment: 65535 @@ -642,12 +652,12 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_TextWrappingMode: 0 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 - m_overflowMode: 1 + m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 + m_enableKerning: 0 m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 @@ -670,7 +680,7 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &1899100217436813828 +--- !u!1 &2347355774804234473 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -678,135 +688,82 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 6351621425599648972} - - component: {fileID: 692190469123726525} - - component: {fileID: 441697096494996439} + - component: {fileID: 2667684757129140296} + - component: {fileID: 3851903499204320948} + - component: {fileID: 3685763205142593297} m_Layer: 5 - m_Name: Text (TMP) + m_Name: TiersInfoSection m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &6351621425599648972 +--- !u!224 &2667684757129140296 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1899100217436813828} + m_GameObject: {fileID: 2347355774804234473} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2772458613686380464} + m_Children: + - {fileID: 591624019621191472} + - {fileID: 1180619615557992413} + - {fileID: 5591882598683303819} + - {fileID: 3479402938063213153} + - {fileID: 2780626632859654021} + - {fileID: 4572866439249782663} + m_Father: {fileID: 4953146958260233880} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 37, y: 0} - m_SizeDelta: {x: 200, y: 30} - m_Pivot: {x: 0, y: 0.5} ---- !u!222 &692190469123726525 -CanvasRenderer: + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -246.95001} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &3851903499204320948 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1899100217436813828} - m_CullTransparentMesh: 1 ---- !u!114 &441697096494996439 + m_GameObject: {fileID: 2347355774804234473} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 8 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &3685763205142593297 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1899100217436813828} + m_GameObject: {fileID: 2347355774804234473} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 0 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: EXIT - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4278190335 - m_fontColor: {r: 1, g: 0, b: 0, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 14 - m_fontSizeBase: 15 - m_fontWeight: 400 - m_enableAutoSizing: 1 - m_fontSizeMin: 0 - m_fontSizeMax: 14 - m_fontStyle: 16 - m_HorizontalAlignment: 1 - m_VerticalAlignment: 512 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_TextWrappingMode: 0 - m_wordWrappingRatios: 0.4 - m_overflowMode: 1 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 - m_ActiveFontFeatures: 6e72656b - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_EmojiFallbackSupport: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &2843225863186887172 + m_HorizontalFit: 0 + m_VerticalFit: 2 +--- !u!1 &2945037717403549381 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -814,50 +771,50 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1493377878246200442} - - component: {fileID: 1362152908693218192} - - component: {fileID: 2618813438192147782} + - component: {fileID: 3479402938063213153} + - component: {fileID: 5059202765106899209} + - component: {fileID: 6267087643615186405} m_Layer: 5 - m_Name: Text (TMP) + m_Name: NextTierDescription m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &1493377878246200442 +--- !u!224 &3479402938063213153 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2843225863186887172} + m_GameObject: {fileID: 2945037717403549381} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 4016207891663665858} + m_Father: {fileID: 2667684757129140296} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 37, y: 0} - m_SizeDelta: {x: 200, y: 30} - m_Pivot: {x: 0, y: 0.5} ---- !u!222 &1362152908693218192 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 422, y: 0} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &5059202765106899209 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2843225863186887172} + m_GameObject: {fileID: 2945037717403549381} m_CullTransparentMesh: 1 ---- !u!114 &2618813438192147782 +--- !u!114 &6267087643615186405 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2843225863186887172} + m_GameObject: {fileID: 2945037717403549381} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -865,16 +822,16 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 0 + m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: SIGN OUT + m_text: Next tier description... m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} - m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] @@ -898,15 +855,15 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 14 - m_fontSizeBase: 15 + m_fontSize: 16 + m_fontSizeBase: 16 m_fontWeight: 400 m_enableAutoSizing: 1 - m_fontSizeMin: 0 - m_fontSizeMax: 14 - m_fontStyle: 16 + m_fontSizeMin: 9 + m_fontSizeMax: 16 + m_fontStyle: 0 m_HorizontalAlignment: 1 - m_VerticalAlignment: 512 + m_VerticalAlignment: 256 m_textAlignment: 65535 m_characterSpacing: 0 m_wordSpacing: 0 @@ -914,12 +871,12 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_TextWrappingMode: 0 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 - m_overflowMode: 1 + m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 + m_enableKerning: 0 m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 @@ -942,7 +899,7 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &4348628084789565896 +--- !u!1 &3406385850194684363 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -950,74 +907,75 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 9223338202751209131} - - component: {fileID: 2480777312377051176} - - component: {fileID: 5771347758678773804} + - component: {fileID: 7047782645285880734} + - component: {fileID: 2515089727087958638} + - component: {fileID: 1590082613424294809} m_Layer: 5 - m_Name: Icon + m_Name: Bar m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &9223338202751209131 +--- !u!224 &7047782645285880734 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4348628084789565896} + m_GameObject: {fileID: 3406385850194684363} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4071907483158260624} + m_Children: + - {fileID: 2326033637731831319} + m_Father: {fileID: 4572866439249782663} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 7.4000244, y: 0} - m_SizeDelta: {x: 20, y: 20} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 360, y: 10} m_Pivot: {x: 0, y: 0.5} ---- !u!222 &2480777312377051176 +--- !u!222 &2515089727087958638 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4348628084789565896} + m_GameObject: {fileID: 3406385850194684363} m_CullTransparentMesh: 1 ---- !u!114 &5771347758678773804 +--- !u!114 &1590082613424294809 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4348628084789565896} + m_GameObject: {fileID: 3406385850194684363} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0.101960786} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: d883afe5a85de49a2b40812854f39499, type: 3} - m_Type: 0 - m_PreserveAspect: 1 + m_Sprite: {fileID: 21300000, guid: b34e561ca43654b87acc771ca93cd646, type: 3} + m_Type: 1 + m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!1 &4744622193739872655 + m_PixelsPerUnitMultiplier: 2 +--- !u!1 &4017220180407911499 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1025,50 +983,50 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 6851616413668786540} - - component: {fileID: 3055966527360511326} - - component: {fileID: 9010651003504951348} + - component: {fileID: 2950351091708145530} + - component: {fileID: 1785520248143884987} + - component: {fileID: 554059921697414627} m_Layer: 5 - m_Name: Text (TMP) + m_Name: BadgeDescription m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &6851616413668786540 +--- !u!224 &2950351091708145530 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4744622193739872655} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 4017220180407911499} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 8963760326965866994} + m_Father: {fileID: 4953146958260233880} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &3055966527360511326 + m_SizeDelta: {x: 422, y: 0} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &1785520248143884987 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4744622193739872655} + m_GameObject: {fileID: 4017220180407911499} m_CullTransparentMesh: 1 ---- !u!114 &9010651003504951348 +--- !u!114 &554059921697414627 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4744622193739872655} + m_GameObject: {fileID: 4017220180407911499} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -1082,7 +1040,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Privacy Policy + m_text: Badge description m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} @@ -1091,8 +1049,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4289239968 - m_fontColor: {r: 0.627451, g: 0.60784316, b: 0.65882355, a: 1} + rgba: 4294769916 + m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -1109,14 +1067,14 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 12 - m_fontSizeBase: 12 + m_fontSize: 18 + m_fontSizeBase: 18 m_fontWeight: 400 m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 + m_fontSizeMin: 9 + m_fontSizeMax: 18 m_fontStyle: 0 - m_HorizontalAlignment: 2 + m_HorizontalAlignment: 1 m_VerticalAlignment: 512 m_textAlignment: 65535 m_characterSpacing: 0 @@ -1125,12 +1083,12 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_TextWrappingMode: 0 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 + m_enableKerning: 0 m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 @@ -1153,7 +1111,7 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &4907598067354379587 +--- !u!1 &4717209861246802826 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1161,65 +1119,65 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7715341444491284271} - - component: {fileID: 1807664657134584881} - - component: {fileID: 6436212438947348718} + - component: {fileID: 2326033637731831319} + - component: {fileID: 9094517526572821062} + - component: {fileID: 8318123556238408705} m_Layer: 5 - m_Name: Divider + m_Name: NextTierProgressBarFill m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &7715341444491284271 +--- !u!224 &2326033637731831319 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4907598067354379587} + m_GameObject: {fileID: 4717209861246802826} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 8267765186225222719} + m_Father: {fileID: 7047782645285880734} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 284, y: 1} - m_Pivot: {x: 0.5, y: 1} ---- !u!222 &1807664657134584881 + m_SizeDelta: {x: 60, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &9094517526572821062 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4907598067354379587} + m_GameObject: {fileID: 4717209861246802826} m_CullTransparentMesh: 1 ---- !u!114 &6436212438947348718 +--- !u!114 &8318123556238408705 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4907598067354379587} + m_GameObject: {fileID: 4717209861246802826} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.2627451, g: 0.2509804, b: 0.2901961, a: 1} - m_RaycastTarget: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 + m_Sprite: {fileID: 21300000, guid: 02706f511f9374d4495a02b37c255cca, type: 3} + m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 @@ -1227,8 +1185,45 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!1 &5626257837216388990 + m_PixelsPerUnitMultiplier: 2 +--- !u!1 &4800062101727484193 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4572866439249782663} + m_Layer: 5 + m_Name: NextTierProgressBar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4572866439249782663 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4800062101727484193} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7047782645285880734} + - {fileID: 7033740546897469291} + m_Father: {fileID: 2667684757129140296} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 422, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &4854153441231283449 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1236,74 +1231,113 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7906646420837152948} - - component: {fileID: 2537931385000270235} - - component: {fileID: 6210010621029394600} + - component: {fileID: 7914798706302518808} + - component: {fileID: 378815463696260501} + - component: {fileID: 7535504737693361262} m_Layer: 5 - m_Name: Icon + m_Name: Bar m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &7906646420837152948 +--- !u!224 &7914798706302518808 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5626257837216388990} + m_GameObject: {fileID: 4854153441231283449} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2772458613686380464} + m_Children: + - {fileID: 4766820125301958299} + m_Father: {fileID: 4968766394081327445} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 7.4000244, y: 0} - m_SizeDelta: {x: 20, y: 20} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 360, y: 10} m_Pivot: {x: 0, y: 0.5} ---- !u!222 &2537931385000270235 +--- !u!222 &378815463696260501 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5626257837216388990} + m_GameObject: {fileID: 4854153441231283449} m_CullTransparentMesh: 1 ---- !u!114 &6210010621029394600 +--- !u!114 &7535504737693361262 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5626257837216388990} + m_GameObject: {fileID: 4854153441231283449} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 0, b: 0, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0.101960786} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 77ba2a94e32134777bf5c87f6cc5ad11, type: 3} - m_Type: 0 - m_PreserveAspect: 1 + m_Sprite: {fileID: 21300000, guid: b34e561ca43654b87acc771ca93cd646, type: 3} + m_Type: 1 + m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!1 &5987030326317348253 + m_PixelsPerUnitMultiplier: 2 +--- !u!1 &5242678451131758154 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7611579212404689972} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7611579212404689972 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5242678451131758154} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8540008312146924672} + - {fileID: 4149271630673527782} + - {fileID: 4953146958260233880} + m_Father: {fileID: 523436847881732749} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &6017536517556254121 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1311,66 +1345,66 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 901637845535984349} - - component: {fileID: 679752389728986527} - - component: {fileID: 8865202906442667213} + - component: {fileID: 2780626632859654021} + - component: {fileID: 8646377155659871645} + - component: {fileID: 9009242482170677591} m_Layer: 5 - m_Name: Icon + m_Name: Div m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &901637845535984349 +--- !u!224 &2780626632859654021 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5987030326317348253} + m_GameObject: {fileID: 6017536517556254121} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 4016207891663665858} + m_Father: {fileID: 2667684757129140296} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 7.4000244, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0, y: 0.5} ---- !u!222 &679752389728986527 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8646377155659871645 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5987030326317348253} + m_GameObject: {fileID: 6017536517556254121} m_CullTransparentMesh: 1 ---- !u!114 &8865202906442667213 +--- !u!114 &9009242482170677591 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5987030326317348253} + m_GameObject: {fileID: 6017536517556254121} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: a7b66c6ad1a67486d875ea94903c3809, type: 3} + m_Sprite: {fileID: 0} m_Type: 0 - m_PreserveAspect: 1 + m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 @@ -1378,7 +1412,7 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1 &6443367924362993227 +--- !u!1 &6127203983563129461 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1386,120 +1420,71 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 8963760326965866994} - - component: {fileID: 9107485736953805959} - - component: {fileID: 7332395792036618228} - - component: {fileID: 1477471589532150726} + - component: {fileID: 8540008312146924672} + - component: {fileID: 3775792512053068699} + - component: {fileID: 3850944021201886613} m_Layer: 5 - m_Name: PrivacyPolicyButton + m_Name: Badge3DImage m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &8963760326965866994 +--- !u!224 &8540008312146924672 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6443367924362993227} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 6127203983563129461} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 6851616413668786540} - m_Father: {fileID: 5440871007616277791} + m_Children: [] + m_Father: {fileID: 7611579212404689972} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0.5} - m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -39.5, y: 1} - m_SizeDelta: {x: 80, y: 15} - m_Pivot: {x: 1, y: 0.5} ---- !u!222 &9107485736953805959 + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 575} + m_SizeDelta: {x: 400, y: 400} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3775792512053068699 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6443367924362993227} + m_GameObject: {fileID: 6127203983563129461} m_CullTransparentMesh: 1 ---- !u!114 &7332395792036618228 +--- !u!114 &3850944021201886613 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6443367924362993227} + m_GameObject: {fileID: 6127203983563129461} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &1477471589532150726 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6443367924362993227} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 0 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 7332395792036618228} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!1 &6617411527318462250 + m_Texture: {fileID: 8400000, guid: 12d1eb45a938cce40bf2831d970c5727, type: 2} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!1 &6387439860807324250 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1507,119 +1492,74 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 434636274221008628} - - component: {fileID: 1041656629829908164} - - component: {fileID: 5847093171511797364} - - component: {fileID: 820959722394673722} + - component: {fileID: 889580915351380838} + - component: {fileID: 7480548874314622131} + - component: {fileID: 362251392957074733} m_Layer: 5 - m_Name: Container + m_Name: Image m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &434636274221008628 +--- !u!224 &889580915351380838 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6617411527318462250} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_GameObject: {fileID: 6387439860807324250} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 3968970127064442057} + m_Father: {fileID: 1180619615557992413} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 1} ---- !u!222 &1041656629829908164 + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 8, y: 0} + m_SizeDelta: {x: 14, y: 14} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &7480548874314622131 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6617411527318462250} + m_GameObject: {fileID: 6387439860807324250} m_CullTransparentMesh: 1 ---- !u!114 &5847093171511797364 +--- !u!114 &362251392957074733 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6617411527318462250} + m_GameObject: {fileID: 6387439860807324250} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.2627451, g: 0.2509804, b: 0.2901961, a: 1} - m_RaycastTarget: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 4848194f7bc4d4e509d067d3160eadac, type: 3} - m_Type: 1 - m_PreserveAspect: 0 + m_Sprite: {fileID: 21300000, guid: 26a52df623c514a6087f35458a11ab2d, type: 3} + m_Type: 0 + m_PreserveAspect: 1 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 2.7 ---- !u!114 &820959722394673722 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6617411527318462250} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 5847093171511797364} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!1 &6926138964552825898 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6783310525232717919 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1627,77 +1567,64 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 8267765186225222719} - - component: {fileID: 8643566542754555841} - - component: {fileID: 537200227428344415} - - component: {fileID: 77460168712524291} - - component: {fileID: 6837883218860801414} - - component: {fileID: 9195262853082399304} - - component: {fileID: 3173027792150692204} - - component: {fileID: 3711508034207725790} - - component: {fileID: 337071616472127276} + - component: {fileID: 4766820125301958299} + - component: {fileID: 3705877595337104099} + - component: {fileID: 2906096296285296128} m_Layer: 5 - m_Name: SystemMenu + m_Name: NextTierProgressBarFill m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &8267765186225222719 +--- !u!224 &4766820125301958299 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6926138964552825898} + m_GameObject: {fileID: 6783310525232717919} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4944797187935891954} - - {fileID: 3968970127064442057} - - {fileID: 7715341444491284271} - - {fileID: 4071907483158260624} - - {fileID: 4016207891663665858} - - {fileID: 2772458613686380464} - - {fileID: 5440871007616277791} - m_Father: {fileID: 0} + m_Children: [] + m_Father: {fileID: 7914798706302518808} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -76, y: -50} - m_SizeDelta: {x: 284, y: 0} - m_Pivot: {x: 1, y: 1} ---- !u!222 &8643566542754555841 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 60, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &3705877595337104099 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6926138964552825898} + m_GameObject: {fileID: 6783310525232717919} m_CullTransparentMesh: 1 ---- !u!114 &537200227428344415 +--- !u!114 &2906096296285296128 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6926138964552825898} + m_GameObject: {fileID: 6783310525232717919} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.08627451, g: 0.08235294, b: 0.09411766, a: 1} - m_RaycastTarget: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 12dd1efc4e826764f9b02be515a9a033, type: 3} + m_Sprite: {fileID: 21300000, guid: 02706f511f9374d4495a02b37c255cca, type: 3} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 @@ -1707,120 +1634,143 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 2 ---- !u!114 &77460168712524291 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6926138964552825898} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 12 - m_Bottom: 0 - m_ChildAlignment: 1 - m_Spacing: 12 - m_ChildForceExpandWidth: 0 - m_ChildForceExpandHeight: 0 - m_ChildControlWidth: 0 - m_ChildControlHeight: 0 - m_ChildScaleWidth: 1 - m_ChildScaleHeight: 1 - m_ReverseArrangement: 0 ---- !u!114 &6837883218860801414 -MonoBehaviour: +--- !u!1 &7013308414442798880 +GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6926138964552825898} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} - m_Name: - m_EditorClassIdentifier: - m_HorizontalFit: 0 - m_VerticalFit: 2 ---- !u!114 &9195262853082399304 -MonoBehaviour: + serializedVersion: 6 + m_Component: + - component: {fileID: 5295030083940270640} + - component: {fileID: 6874100407563630293} + - component: {fileID: 8868651118548766628} + m_Layer: 5 + m_Name: UnlockedDate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5295030083940270640 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6926138964552825898} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 087534717a354563a61fc5e135ae82d7, type: 3} - m_Name: - m_EditorClassIdentifier: - <canvas>k__BackingField: {fileID: 3173027792150692204} - <raycaster>k__BackingField: {fileID: 3711508034207725790} - <CloseButton>k__BackingField: {fileID: 8203385680364564446} - <PreviewProfileButton>k__BackingField: {fileID: 8160145174121610254} - <LogoutButton>k__BackingField: {fileID: 4094168458800644092} - <ExitAppButton>k__BackingField: {fileID: 4454754982330232690} - <PrivacyPolicyButton>k__BackingField: {fileID: 1477471589532150726} - <TermsOfServiceButton>k__BackingField: {fileID: 3230561843785619710} - <CanvasGroup>k__BackingField: {fileID: 337071616472127276} ---- !u!223 &3173027792150692204 -Canvas: + m_GameObject: {fileID: 7013308414442798880} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4953146958260233880} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 422, y: 0} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &6874100407563630293 +CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6926138964552825898} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 2 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 25 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!114 &3711508034207725790 + m_GameObject: {fileID: 7013308414442798880} + m_CullTransparentMesh: 1 +--- !u!114 &8868651118548766628 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6926138964552825898} + m_GameObject: {fileID: 7013308414442798880} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Locked + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: serializedVersion: 2 - m_Bits: 4294967295 ---- !u!225 &337071616472127276 -CanvasGroup: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6926138964552825898} - m_Enabled: 1 - m_Alpha: 1 - m_Interactable: 1 - m_BlocksRaycasts: 1 - m_IgnoreParentGroups: 0 ---- !u!1 &7244985698368279172 + rgba: 3003121663 + m_fontColor: {r: 1, g: 1, b: 1, a: 0.69803923} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 16 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 7 + m_fontSizeMax: 16 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &7114278439401133390 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1828,76 +1778,61 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 5440871007616277791} - - component: {fileID: 244713038969242924} - - component: {fileID: 1888519559700574388} + - component: {fileID: 591624019621191472} + - component: {fileID: 9216553282855841590} m_Layer: 5 - m_Name: Footer + m_Name: AllTiersContainer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &5440871007616277791 +--- !u!224 &591624019621191472 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7244985698368279172} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 7114278439401133390} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4342812624956019710} - - {fileID: 8963760326965866994} - m_Father: {fileID: 8267765186225222719} + m_Children: [] + m_Father: {fileID: 2667684757129140296} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 284, y: 32} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0} ---- !u!222 &244713038969242924 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7244985698368279172} - m_CullTransparentMesh: 1 ---- !u!114 &1888519559700574388 +--- !u!114 &9216553282855841590 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7244985698368279172} + m_GameObject: {fileID: 7114278439401133390} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.17254902, g: 0.16862746, b: 0.19215688, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 6a691ff28b59f4236a6a8d3b7f4aa258, type: 3} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 2 ---- !u!1 &8321281765671348024 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 26 + m_Bottom: 26 + m_ChildAlignment: 0 + m_Spacing: 14 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &7990036928022041474 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1905,56 +1840,54 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 2772458613686380464} - - component: {fileID: 3306636856462873936} - - component: {fileID: 8520217265718021926} - - component: {fileID: 4454754982330232690} + - component: {fileID: 5591882598683303819} + - component: {fileID: 5487910598781877849} + - component: {fileID: 1776498209451491245} m_Layer: 5 - m_Name: ExitButton + m_Name: NextTierContainer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &2772458613686380464 +--- !u!224 &5591882598683303819 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8321281765671348024} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 7990036928022041474} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 7906646420837152948} - - {fileID: 6351621425599648972} - m_Father: {fileID: 8267765186225222719} + - {fileID: 6084731364583839620} + m_Father: {fileID: 2667684757129140296} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 258, y: 40} - m_Pivot: {x: 0.5, y: 1} ---- !u!222 &3306636856462873936 + m_SizeDelta: {x: 422, y: 0} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &5487910598781877849 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8321281765671348024} + m_GameObject: {fileID: 7990036928022041474} m_CullTransparentMesh: 1 ---- !u!114 &8520217265718021926 +--- !u!114 &1776498209451491245 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8321281765671348024} + m_GameObject: {fileID: 7990036928022041474} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} @@ -1965,61 +1898,78 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 12dd1efc4e826764f9b02be515a9a033, type: 3} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 2.7 ---- !u!114 &4454754982330232690 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8321281765671348024} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_HighlightedColor: {r: 0.16078432, g: 0.16078432, b: 0.19215688, a: 1} - m_PressedColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_SelectedColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 8520217265718021926} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!1 &8331150629360833722 + m_text: 'NEXT TIER:' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 3003121663 + m_fontColor: {r: 1, g: 1, b: 1, a: 0.69803923} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 16 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 9 + m_fontSizeMax: 18 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &8320534763579704390 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2027,56 +1977,53 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 4071907483158260624} - - component: {fileID: 470047448958197346} - - component: {fileID: 861734661418513208} - - component: {fileID: 9126658754951377751} + - component: {fileID: 5778040473573580} + - component: {fileID: 5906000884932099535} + - component: {fileID: 5876449986843033701} m_Layer: 5 - m_Name: AccountSettingsButton + m_Name: Value m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &4071907483158260624 + m_IsActive: 1 +--- !u!224 &5778040473573580 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8331150629360833722} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 8320534763579704390} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 9223338202751209131} - - {fileID: 5752141580369950532} - m_Father: {fileID: 8267765186225222719} + m_Children: [] + m_Father: {fileID: 4968766394081327445} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 142, y: -77} - m_SizeDelta: {x: 258, y: 40} - m_Pivot: {x: 0.5, y: 1} ---- !u!222 &470047448958197346 + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 367, y: 0} + m_SizeDelta: {x: 70, y: 22} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &5906000884932099535 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8331150629360833722} + m_GameObject: {fileID: 8320534763579704390} m_CullTransparentMesh: 1 ---- !u!114 &861734661418513208 +--- !u!114 &5876449986843033701 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8331150629360833722} + m_GameObject: {fileID: 8320534763579704390} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} @@ -2087,61 +2034,78 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 12dd1efc4e826764f9b02be515a9a033, type: 3} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 2.7 ---- !u!114 &9126658754951377751 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8331150629360833722} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_HighlightedColor: {r: 0.16078432, g: 0.16078432, b: 0.19215688, a: 1} - m_PressedColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_SelectedColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 861734661418513208} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!1 &8937673140354685923 + m_text: 1/2 + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294769916 + m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 16 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 9 + m_fontSizeMax: 16 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &8896822784863643556 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2149,121 +2113,81 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 3968970127064442057} - - component: {fileID: 653935294227960123} - - component: {fileID: 316290043893972065} - - component: {fileID: 8160145174121610254} + - component: {fileID: 4953146958260233880} + - component: {fileID: 8055502815389580269} + - component: {fileID: 514908637365933852} m_Layer: 5 - m_Name: PreviewProfileButton + m_Name: Information m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &3968970127064442057 +--- !u!224 &4953146958260233880 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8937673140354685923} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 8896822784863643556} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 434636274221008628} - - {fileID: 4631241175981062173} - m_Father: {fileID: 8267765186225222719} + - {fileID: 6738831624750552165} + - {fileID: 5295030083940270640} + - {fileID: 2950351091708145530} + - {fileID: 4968766394081327445} + - {fileID: 2667684757129140296} + m_Father: {fileID: 7611579212404689972} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 258, y: 40} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -583} + m_SizeDelta: {x: -92, y: 0} m_Pivot: {x: 0.5, y: 1} ---- !u!222 &653935294227960123 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8937673140354685923} - m_CullTransparentMesh: 1 ---- !u!114 &316290043893972065 +--- !u!114 &8055502815389580269 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8937673140354685923} + m_GameObject: {fileID: 8896822784863643556} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 12dd1efc4e826764f9b02be515a9a033, type: 3} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 2.7 ---- !u!114 &8160145174121610254 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 6 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &514908637365933852 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8937673140354685923} + m_GameObject: {fileID: 8896822784863643556} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} m_Name: m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_HighlightedColor: {r: 0.16078432, g: 0.16078432, b: 0.19215688, a: 1} - m_PressedColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_SelectedColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 316290043893972065} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!1 &9134152343947891114 + m_HorizontalFit: 0 + m_VerticalFit: 2 +--- !u!1 &9064459426940548429 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2271,61 +2195,61 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 4016207891663665858} - - component: {fileID: 1199929421021400908} - - component: {fileID: 4256903850848767861} - - component: {fileID: 4094168458800644092} + - component: {fileID: 1180619615557992413} + - component: {fileID: 2752376623205941090} + - component: {fileID: 4691642831630635109} + - component: {fileID: 7923668980988370662} m_Layer: 5 - m_Name: SignOutButton + m_Name: TopTierMark m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &4016207891663665858 + m_IsActive: 0 +--- !u!224 &1180619615557992413 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9134152343947891114} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 9064459426940548429} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 901637845535984349} - - {fileID: 1493377878246200442} - m_Father: {fileID: 8267765186225222719} + - {fileID: 889580915351380838} + - {fileID: 2880557101886905115} + m_Father: {fileID: 2667684757129140296} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 258, y: 40} - m_Pivot: {x: 0.5, y: 1} ---- !u!222 &1199929421021400908 + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -26} + m_SizeDelta: {x: 172, y: 26} + m_Pivot: {x: 0, y: 0} +--- !u!222 &2752376623205941090 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9134152343947891114} + m_GameObject: {fileID: 9064459426940548429} m_CullTransparentMesh: 1 ---- !u!114 &4256903850848767861 +--- !u!114 &4691642831630635109 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9134152343947891114} + m_GameObject: {fileID: 9064459426940548429} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 + m_Color: {r: 0.13333334, g: 0.64705884, b: 0.05490196, a: 1} + m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: @@ -2340,48 +2264,317 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 2.7 ---- !u!114 &4094168458800644092 + m_PixelsPerUnitMultiplier: 3 +--- !u!114 &7923668980988370662 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9134152343947891114} + m_GameObject: {fileID: 9064459426940548429} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} m_Name: m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_HighlightedColor: {r: 0.16078432, g: 0.16078432, b: 0.19215688, a: 1} - m_PressedColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_SelectedColor: {r: 0.08235294, g: 0.08235294, b: 0.08627451, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 4256903850848767861} - m_OnClick: - m_PersistentCalls: - m_Calls: [] + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 26 + m_PreferredWidth: -1 + m_PreferredHeight: 26 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1001 &62990548100779520 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 523436847881732749} + m_Modifications: + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.x + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.y + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -336.96002 + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Name + value: LoadingSpinner + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} +--- !u!224 &1220008731870394335 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 62990548100779520} + m_PrefabAsset: {fileID: 0} +--- !u!1 &2356664135297845385 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 62990548100779520} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &3000719496897215033 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 7611579212404689972} + m_Modifications: + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.y + value: 111 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -336.96002 + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Name + value: ImageLoadingSpinner + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} +--- !u!1 &707054564195466416 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 3000719496897215033} + m_PrefabAsset: {fileID: 0} +--- !u!224 &4149271630673527782 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 3000719496897215033} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &7071884122444790270 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 523436847881732749} + m_Modifications: + - target: {fileID: 384134109602129421, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_Name + value: Badge3DPreviewCamera + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8296579380273699519, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + propertyPath: m_SortingLayer + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} +--- !u!4 &3855642741860842082 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6315629430373237660, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + m_PrefabInstance: {fileID: 7071884122444790270} + m_PrefabAsset: {fileID: 0} +--- !u!95 &4775803898855288964 stripped +Animator: + m_CorrespondingSourceObject: {fileID: 2333833773583042938, guid: 8a91951d2f71f174d998356f01a3603c, type: 3} + m_PrefabInstance: {fileID: 7071884122444790270} + m_PrefabAsset: {fileID: 0} diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeInfo_PassportSubView.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeInfo_PassportSubView.prefab.meta new file mode 100644 index 0000000000..51848807dd --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeInfo_PassportSubView.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3d7fee56e5d75a44fb4925c116c3da16 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeOverviewItem_PassportField.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeOverviewItem_PassportField.prefab new file mode 100644 index 0000000000..300240930f --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeOverviewItem_PassportField.prefab @@ -0,0 +1,573 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5529431766610057073 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5696256529636061003} + - component: {fileID: 2560867999595868295} + - component: {fileID: 3813189166464044609} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5696256529636061003 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5529431766610057073} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4637568077965555199} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2560867999595868295 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5529431766610057073} + m_CullTransparentMesh: 1 +--- !u!114 &3813189166464044609 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5529431766610057073} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Badge Name + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294769916 + m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 5 + m_fontSizeMax: 18 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &6963425108721725309 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4637568077965555199} + - component: {fileID: 6265398172727882413} + - component: {fileID: 7530491816978106610} + - component: {fileID: 2232441363619285292} + - component: {fileID: 9103754282043628541} + m_Layer: 5 + m_Name: BadgeNameTooltip + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4637568077965555199 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6963425108721725309} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3238678163943901496} + - {fileID: 5696256529636061003} + m_Father: {fileID: 1938880271342860349} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 16} + m_SizeDelta: {x: 0, y: 37} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &6265398172727882413 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6963425108721725309} + m_CullTransparentMesh: 1 +--- !u!114 &7530491816978106610 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6963425108721725309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.08627451, g: 0.08235294, b: 0.09411765, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 12dd1efc4e826764f9b02be515a9a033, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 2 +--- !u!114 &2232441363619285292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6963425108721725309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 1 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &9103754282043628541 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6963425108721725309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 2 + m_VerticalFit: 0 +--- !u!1 &7782382776629468108 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1938880271342860349} + - component: {fileID: 5020862743440781913} + - component: {fileID: 4503693053391246542} + - component: {fileID: 4893249369438217148} + - component: {fileID: 8440730541124889258} + m_Layer: 5 + m_Name: BadgeOverviewItem_PassportField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1938880271342860349 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7782382776629468108} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2643005321827720393} + - {fileID: 4637568077965555199} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 43, y: -43} + m_SizeDelta: {x: 86, y: 86} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5020862743440781913 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7782382776629468108} + m_CullTransparentMesh: 1 +--- !u!114 &4503693053391246542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7782382776629468108} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d2bc0e4246537449fbc27b863cc9b0c3, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &4893249369438217148 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7782382776629468108} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1e79e296834574c5d9138852d94c8998, type: 3} + m_Name: + m_EditorClassIdentifier: + <LoadingObject>k__BackingField: {fileID: 1510691212834939807} + <Image>k__BackingField: {fileID: 4503693053391246542} +--- !u!114 &8440730541124889258 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7782382776629468108} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f998d490c2e344a1b5c73cfaf061450b, type: 3} + m_Name: + m_EditorClassIdentifier: + <BadgeImage>k__BackingField: {fileID: 4893249369438217148} + <DefaultBadgeSprite>k__BackingField: {fileID: 21300000, guid: d2bc0e4246537449fbc27b863cc9b0c3, type: 3} + <BadgeNameText>k__BackingField: {fileID: 3813189166464044609} + badgeNameTooltip: {fileID: 6963425108721725309} +--- !u!1 &8323893625996196051 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3238678163943901496} + - component: {fileID: 3435493011642615095} + - component: {fileID: 1711552505197905190} + - component: {fileID: 3115834077830766840} + m_Layer: 5 + m_Name: TooltipPeak + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3238678163943901496 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8323893625996196051} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4637568077965555199} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 3} + m_SizeDelta: {x: 26, y: 26} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &3435493011642615095 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8323893625996196051} + m_CullTransparentMesh: 1 +--- !u!114 &1711552505197905190 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8323893625996196051} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.08627451, g: 0.08627451, b: 0.08627451, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 91a92410d7b9c497b90aa66f9a5569ec, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &3115834077830766840 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8323893625996196051} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1001 &3790986066039760150 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1938880271342860349} + m_Modifications: + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.x + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -336.96002 + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Name + value: LoadingSpinner + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} +--- !u!1 &1510691212834939807 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 3790986066039760150} + m_PrefabAsset: {fileID: 0} +--- !u!224 &2643005321827720393 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 3790986066039760150} + m_PrefabAsset: {fileID: 0} diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeOverviewItem_PassportField.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeOverviewItem_PassportField.prefab.meta new file mode 100644 index 0000000000..97ec019c99 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeOverviewItem_PassportField.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0d2247e10e8391743ada671b67366663 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeTierButton_PassportField.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeTierButton_PassportField.prefab new file mode 100644 index 0000000000..1aa06ca6b6 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeTierButton_PassportField.prefab @@ -0,0 +1,484 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2027707052533020318 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4350920823839900670} + - component: {fileID: 1615924498560951094} + - component: {fileID: 6494487392387324144} + - component: {fileID: 4132318424641842056} + - component: {fileID: 1161838136453252941} + m_Layer: 5 + m_Name: SubContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4350920823839900670 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2027707052533020318} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1508183797030182809} + - {fileID: 5503175563780094453} + m_Father: {fileID: 3978680509727456292} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1615924498560951094 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2027707052533020318} + m_CullTransparentMesh: 1 +--- !u!114 &6494487392387324144 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2027707052533020318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.49019608} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 12dd1efc4e826764f9b02be515a9a033, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 2 +--- !u!114 &4132318424641842056 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2027707052533020318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 0, g: 0, b: 0, a: 0.4} + m_HighlightedColor: {r: 1, g: 1, b: 1, a: 0.101960786} + m_PressedColor: {r: 0, g: 0, b: 0, a: 0.4} + m_SelectedColor: {r: 1, g: 1, b: 1, a: 0.101960786} + m_DisabledColor: {r: 0, g: 0, b: 0, a: 0} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6494487392387324144} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1161838136453252941 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2027707052533020318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1cdc6c1a43024e58bcd05d3e69a19db4, type: 3} + m_Name: + m_EditorClassIdentifier: + <Button>k__BackingField: {fileID: 4132318424641842056} + <ButtonPressedAudio>k__BackingField: {fileID: 11400000, guid: cbbd6a003fc75e24da47c13feacd92c7, type: 2} + <ButtonHoverAudio>k__BackingField: {fileID: 11400000, guid: 59da234351971c0498a566fb811b0c36, type: 2} +--- !u!1 &2964634350412032564 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5503175563780094453} + - component: {fileID: 6851967206268340452} + - component: {fileID: 2988784052481771887} + - component: {fileID: 5585173746950945990} + m_Layer: 5 + m_Name: TierImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5503175563780094453 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2964634350412032564} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2451305086142988027} + m_Father: {fileID: 4350920823839900670} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 34, y: 34} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6851967206268340452 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2964634350412032564} + m_CullTransparentMesh: 1 +--- !u!114 &2988784052481771887 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2964634350412032564} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d2bc0e4246537449fbc27b863cc9b0c3, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &5585173746950945990 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2964634350412032564} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1e79e296834574c5d9138852d94c8998, type: 3} + m_Name: + m_EditorClassIdentifier: + <LoadingObject>k__BackingField: {fileID: 1323515191010230701} + <Image>k__BackingField: {fileID: 2988784052481771887} +--- !u!1 &4292382795869077674 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1508183797030182809} + - component: {fileID: 8106194431441244400} + - component: {fileID: 1843150026773241141} + m_Layer: 5 + m_Name: SelectedOutline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1508183797030182809 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4292382795869077674} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4350920823839900670} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 10, y: 10} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8106194431441244400 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4292382795869077674} + m_CullTransparentMesh: 1 +--- !u!114 &1843150026773241141 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4292382795869077674} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.45490196, b: 0.22352941, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 1dcae7b3183f24eb39310ae8e4c092a5, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1.5 +--- !u!1 &4746730671402803157 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3978680509727456292} + - component: {fileID: 7526330343368144448} + - component: {fileID: 2745748071276464951} + m_Layer: 5 + m_Name: BadgeTierButton_PassportField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3978680509727456292 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4746730671402803157} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4350920823839900670} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0, y: 1} +--- !u!222 &7526330343368144448 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4746730671402803157} + m_CullTransparentMesh: 1 +--- !u!114 &2745748071276464951 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4746730671402803157} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5081c0826d3f4f90b85c8cc7aff3aa13, type: 3} + m_Name: + m_EditorClassIdentifier: + <BackgroundImage>k__BackingField: {fileID: 6494487392387324144} + <Button>k__BackingField: {fileID: 4132318424641842056} + <TierImage>k__BackingField: {fileID: 5585173746950945990} + <DefaultTierSprite>k__BackingField: {fileID: 21300000, guid: d2bc0e4246537449fbc27b863cc9b0c3, type: 3} + <SelectedOutline>k__BackingField: {fileID: 4292382795869077674} + <NormalBackgroundColor>k__BackingField: {r: 0, g: 0, b: 0, a: 0.4} + <HoverBackgroundColor>k__BackingField: {r: 1, g: 1, b: 1, a: 0.03137255} + <LockedBadgeImageColor>k__BackingField: {r: 1, g: 1, b: 1, a: 0.03137255} + <NonLockedBadgeImageColor>k__BackingField: {r: 1, g: 1, b: 1, a: 1} +--- !u!1001 &3617892534231648036 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 5503175563780094453} + m_Modifications: + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.x + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.y + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -336.96002 + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Name + value: LoadingSpinner + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} +--- !u!1 &1323515191010230701 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 3617892534231648036} + m_PrefabAsset: {fileID: 0} +--- !u!224 &2451305086142988027 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 3617892534231648036} + m_PrefabAsset: {fileID: 0} diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeTierButton_PassportField.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeTierButton_PassportField.prefab.meta new file mode 100644 index 0000000000..9e7532d8b0 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgeTierButton_PassportField.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f638c5ea4e9c6eb4188ca8a1c7186e69 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesCategorySeparator_PassportField.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesCategorySeparator_PassportField.prefab new file mode 100644 index 0000000000..f72cd21e63 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesCategorySeparator_PassportField.prefab @@ -0,0 +1,294 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1552009290291903052 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3694771936313905784} + - component: {fileID: 5548945502416397694} + - component: {fileID: 2914268505569279401} + - component: {fileID: 6946783051839632296} + m_Layer: 5 + m_Name: BadgesCategorySeparator_PassportField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3694771936313905784 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1552009290291903052} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3186476281001021351} + - {fileID: 3297809471719137516} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 500, y: 25} + m_Pivot: {x: 0, y: 0} +--- !u!222 &5548945502416397694 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1552009290291903052} + m_CullTransparentMesh: 1 +--- !u!114 &2914268505569279401 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1552009290291903052} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 107986b4ea3249129494c5e55465d597, type: 3} + m_Name: + m_EditorClassIdentifier: + <CategoryText>k__BackingField: {fileID: 821444500467697303} +--- !u!114 &6946783051839632296 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1552009290291903052} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 25 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1916057818163613901 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3297809471719137516} + - component: {fileID: 5884945328737428120} + - component: {fileID: 5608207896752581000} + m_Layer: 5 + m_Name: Div + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3297809471719137516 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1916057818163613901} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3694771936313905784} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 1.5} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &5884945328737428120 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1916057818163613901} + m_CullTransparentMesh: 1 +--- !u!114 &5608207896752581000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1916057818163613901} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.2} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7925619810941971372 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3186476281001021351} + - component: {fileID: 8688826780425756318} + - component: {fileID: 821444500467697303} + m_Layer: 5 + m_Name: Category + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3186476281001021351 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7925619810941971372} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3694771936313905784} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 470, y: 16} + m_Pivot: {x: 0, y: 1} +--- !u!222 &8688826780425756318 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7925619810941971372} + m_CullTransparentMesh: 1 +--- !u!114 &821444500467697303 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7925619810941971372} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: EXPLORER + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294769916 + m_fontColor: {r: 0.9882353, g: 0.9882353, b: 0.9882353, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 16 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesCategorySeparator_PassportField.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesCategorySeparator_PassportField.prefab.meta new file mode 100644 index 0000000000..3d497664bb --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesCategorySeparator_PassportField.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d3be8f37a41935e4a90a1f6a3c32e44a +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetailsContainer_PassportField.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetailsContainer_PassportField.prefab new file mode 100644 index 0000000000..46280117a8 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetailsContainer_PassportField.prefab @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4974659802434120679 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9084405837594754544} + - component: {fileID: 3567213590214612298} + - component: {fileID: 6025775863293375988} + m_Layer: 5 + m_Name: BadgesDetailsContainer_PassportField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9084405837594754544 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4974659802434120679} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3567213590214612298 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4974659802434120679} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 20 + m_ChildAlignment: 0 + m_StartCorner: 3 + m_StartAxis: 0 + m_CellSize: {x: 150, y: 214} + m_Spacing: {x: 24, y: 28} + m_Constraint: 0 + m_ConstraintCount: 2 +--- !u!114 &6025775863293375988 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4974659802434120679} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 94aa441af32d48dda3be4c74e2bc13f2, type: 3} + m_Name: + m_EditorClassIdentifier: + <BadgeDetailCardsContainer>k__BackingField: {fileID: 9084405837594754544} diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetailsContainer_PassportField.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetailsContainer_PassportField.prefab.meta new file mode 100644 index 0000000000..22a2ddb7bf --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetailsContainer_PassportField.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 10b094bb67f7dc6438b04c5ab7c49644 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetails_PassportSubView.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetails_PassportSubView.prefab new file mode 100644 index 0000000000..3b34b960d6 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetails_PassportSubView.prefab @@ -0,0 +1,523 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5532064895441123058 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6191958210805338699} + - component: {fileID: 5838806939678784909} + - component: {fileID: 5216151811176735458} + - component: {fileID: 8828950546510196406} + - component: {fileID: 6591204801274590311} + m_Layer: 5 + m_Name: NoBadgesLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &6191958210805338699 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5532064895441123058} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7652398703509124738} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 1020, y: 73.88} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5838806939678784909 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5532064895441123058} + m_CullTransparentMesh: 1 +--- !u!114 &5216151811176735458 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5532064895441123058} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: No badges achieved. + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 3003121663 + m_fontColor: {r: 1, g: 1, b: 1, a: 0.69803923} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 20 + m_fontSizeBase: 20 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &8828950546510196406 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5532064895441123058} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &6591204801274590311 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5532064895441123058} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &6779997798835043434 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7652398703509124738} + - component: {fileID: 6052468564215922103} + - component: {fileID: 7244375437590823786} + - component: {fileID: 3284928737155943795} + - component: {fileID: 6152531127756782913} + - component: {fileID: 8767417865285685167} + m_Layer: 5 + m_Name: BadgesDetails_PassportSubView + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7652398703509124738 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6779997798835043434} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3673768807488380774} + - {fileID: 3344195657738558535} + - {fileID: 6191958210805338699} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 1100, y: 0} + m_SizeDelta: {x: 1100, y: 810} + m_Pivot: {x: 1, y: 1} +--- !u!222 &6052468564215922103 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6779997798835043434} + m_CullTransparentMesh: 1 +--- !u!114 &7244375437590823786 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6779997798835043434} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.4} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 99428d9ed6da74af2966fb29d960e48f, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 2.5 +--- !u!114 &3284928737155943795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6779997798835043434} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 40 + m_Right: 40 + m_Top: 30 + m_Bottom: 30 + m_ChildAlignment: 0 + m_Spacing: 16 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 1 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &6152531127756782913 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6779997798835043434} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a31e5242bc2c472fa821f9308a228b27, type: 3} + m_Name: + m_EditorClassIdentifier: + <BadgesFilterButtonPrefab>k__BackingField: {fileID: 8521217865944743850, guid: 362f3e80b61348b41bdb4e1d0c9d2bc2, type: 3} + <BadgesFilterButtonsContainer>k__BackingField: {fileID: 3344195657738558535} + <BadgesCategorySeparatorPrefab>k__BackingField: {fileID: 2914268505569279401, guid: d3be8f37a41935e4a90a1f6a3c32e44a, type: 3} + <BadgesCategoryContainerPrefab>k__BackingField: {fileID: 6025775863293375988, guid: 10b094bb67f7dc6438b04c5ab7c49644, type: 3} + <MainContainer>k__BackingField: {fileID: 7652398703509124738} + <BadgeDetailCardPrefab>k__BackingField: {fileID: 2629988230920715453, guid: 0e1dd120dcd088a41814a49e4de926e2, type: 3} + <LoadingSpinner>k__BackingField: {fileID: 189436735855779888} + <NoBadgesLabel>k__BackingField: {fileID: 5532064895441123058} +--- !u!114 &8767417865285685167 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6779997798835043434} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 810 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &8338339246391411166 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3344195657738558535} + - component: {fileID: 3479643779332104050} + m_Layer: 5 + m_Name: FiltersContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3344195657738558535 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8338339246391411166} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7652398703509124738} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3479643779332104050 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8338339246391411166} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 24 + m_ChildAlignment: 0 + m_Spacing: 10 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1001 &2506894961685964473 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 7652398703509124738} + m_Modifications: + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.x + value: 60 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_SizeDelta.y + value: 60 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -336.96002 + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_Name + value: LoadingSpinner + objectReference: {fileID: 0} + - target: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + insertIndex: -1 + addedObject: {fileID: 6613678274741793983} + m_SourcePrefab: {fileID: 100100000, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} +--- !u!1 &189436735855779888 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 2506894961685964473} + m_PrefabAsset: {fileID: 0} +--- !u!114 &6613678274741793983 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 189436735855779888} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!224 &3673768807488380774 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1166888513132788191, guid: d565b61885fb1ef41b1582a285e748e9, type: 3} + m_PrefabInstance: {fileID: 2506894961685964473} + m_PrefabAsset: {fileID: 0} diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetails_PassportSubView.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetails_PassportSubView.prefab.meta new file mode 100644 index 0000000000..2aced15b13 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesDetails_PassportSubView.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 74fd684dafc9eaf4d85c16351fc1c4c9 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesFilterButton.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesFilterButton.prefab new file mode 100644 index 0000000000..16cc08d584 --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesFilterButton.prefab @@ -0,0 +1,210 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &3309938375222287071 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 127410955035292441, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Name + value: BadgesFilterButton + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 335731955920881656, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_text + value: All + objectReference: {fileID: 0} + - target: {fileID: 335731955920881656, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_HorizontalAlignment + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 596702907866863807, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_PixelsPerUnitMultiplier + value: 1.2 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.x + value: 53.5718 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.y + value: 40 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: <IconImage>k__BackingField + value: + objectReference: {fileID: 0} + - target: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: <SelectedTextColor>k__BackingField.b + value: 0.9882353 + objectReference: {fileID: 0} + - target: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: <SelectedTextColor>k__BackingField.g + value: 0.9882353 + objectReference: {fileID: 0} + - target: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: <SelectedTextColor>k__BackingField.r + value: 0.9882353 + objectReference: {fileID: 0} + - target: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: <UnselectedTextColor>k__BackingField.b + value: 0.9882353 + objectReference: {fileID: 0} + - target: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: <UnselectedTextColor>k__BackingField.g + value: 0.9882353 + objectReference: {fileID: 0} + - target: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: <UnselectedTextColor>k__BackingField.r + value: 0.9882353 + objectReference: {fileID: 0} + - target: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: <UnselectedBackgroundColor>k__BackingField.a + value: 0.03137255 + objectReference: {fileID: 0} + - target: {fileID: 7772745777469362834, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: + - {fileID: 7772745777469362834, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 127410955035292441, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + insertIndex: -1 + addedObject: {fileID: 5045799609417251536} + m_SourcePrefab: {fileID: 100100000, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} +--- !u!1 &3182889336690567622 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 127410955035292441, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 3309938375222287071} + m_PrefabAsset: {fileID: 0} +--- !u!114 &5045799609417251536 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3182889336690567622} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 14 + m_Right: 14 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesFilterButton.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesFilterButton.prefab.meta new file mode 100644 index 0000000000..1fd764eeaa --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesFilterButton.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 362f3e80b61348b41bdb4e1d0c9d2bc2 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesOverview_PassportModule.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesOverview_PassportModule.prefab new file mode 100644 index 0000000000..1383aa3a8b --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesOverview_PassportModule.prefab @@ -0,0 +1,520 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &560759891071270739 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3283990351063098634} + - component: {fileID: 8548432673564403673} + - component: {fileID: 3107116806423320409} + - component: {fileID: 1537505221014566214} + m_Layer: 5 + m_Name: NoBadgesLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &3283990351063098634 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 560759891071270739} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 748587418752867253} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 40, y: -84.740005} + m_SizeDelta: {x: 1020, y: 19.37} + m_Pivot: {x: 0, y: 0} +--- !u!222 &8548432673564403673 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 560759891071270739} + m_CullTransparentMesh: 1 +--- !u!114 &3107116806423320409 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 560759891071270739} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: No badges achieved. + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 3003121663 + m_fontColor: {r: 1, g: 1, b: 1, a: 0.69803923} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 16 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &1537505221014566214 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 560759891071270739} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 19.37 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &3642235304153402807 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5236224086316262787} + - component: {fileID: 2251730257179697281} + - component: {fileID: 6577322576760096607} + m_Layer: 5 + m_Name: BadgesContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5236224086316262787 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3642235304153402807} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 748587418752867253} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2251730257179697281 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3642235304153402807} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 3 + m_Spacing: 30 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &6577322576760096607 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3642235304153402807} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 86 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &4487318378376810845 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 748587418752867253} + - component: {fileID: 3724472831615668352} + - component: {fileID: 349166741482368605} + - component: {fileID: 5604489016547369028} + - component: {fileID: 7180963114228604054} + m_Layer: 5 + m_Name: BadgesOverview_PassportModule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &748587418752867253 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4487318378376810845} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5866222481281090283} + - {fileID: 5236224086316262787} + - {fileID: 3283990351063098634} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 1100, y: 140} + m_Pivot: {x: 1, y: 1} +--- !u!222 &3724472831615668352 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4487318378376810845} + m_CullTransparentMesh: 1 +--- !u!114 &349166741482368605 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4487318378376810845} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.4} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 99428d9ed6da74af2966fb29d960e48f, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 2.5 +--- !u!114 &5604489016547369028 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4487318378376810845} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 40 + m_Right: 40 + m_Top: 30 + m_Bottom: 30 + m_ChildAlignment: 0 + m_Spacing: 16 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 1 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &7180963114228604054 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4487318378376810845} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f282b72920be42ffb024cf1abac04da5, type: 3} + m_Name: + m_EditorClassIdentifier: + <BadgeOverviewItemPrefab>k__BackingField: {fileID: 8440730541124889258, guid: 0d2247e10e8391743ada671b67366663, type: 3} + <BadgeOverviewItemsContainer>k__BackingField: {fileID: 5236224086316262787} + <NoBadgesLabel>k__BackingField: {fileID: 560759891071270739} +--- !u!1 &6672453353137940626 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5866222481281090283} + - component: {fileID: 2020435517311884723} + - component: {fileID: 5025548691539421331} + - component: {fileID: 5177003901658547094} + m_Layer: 5 + m_Name: BadgesTitle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5866222481281090283 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6672453353137940626} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 748587418752867253} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2020435517311884723 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6672453353137940626} + m_CullTransparentMesh: 1 +--- !u!114 &5025548691539421331 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6672453353137940626} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: BADGES + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 16 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &5177003901658547094 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6672453353137940626} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 19 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesOverview_PassportModule.prefab.meta b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesOverview_PassportModule.prefab.meta new file mode 100644 index 0000000000..e1274f57eb --- /dev/null +++ b/Explorer/Assets/DCL/Passport/Prefabs/Badges/BadgesOverview_PassportModule.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 170ea5f707d0da3449ff8b8d13446e46 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/Passport/Prefabs/Passport.prefab b/Explorer/Assets/DCL/Passport/Prefabs/Passport.prefab index ae5133895e..034636b53e 100644 --- a/Explorer/Assets/DCL/Passport/Prefabs/Passport.prefab +++ b/Explorer/Assets/DCL/Passport/Prefabs/Passport.prefab @@ -26,16 +26,16 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 468122005162280387} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 2699698443393570032} + m_Father: {fileID: 8735803468174630723} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -582.89, y: -375.9145} + m_AnchoredPosition: {x: 32, y: -339.9145} m_SizeDelta: {x: 484.01, y: 129.8289} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7585331578540937687 @@ -189,7 +189,7 @@ GameObject: - component: {fileID: 7816062814671514601} - component: {fileID: 4169767677730551106} m_Layer: 5 - m_Name: InfoPanel + m_Name: OverviewSectionPanel m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -207,6 +207,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 6210271046698684379} - {fileID: 2119156896072113711} - {fileID: 3066046139736365690} m_Father: {fileID: 8830084878494246411} @@ -306,8 +307,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -36, y: -82} - m_SizeDelta: {x: -550, y: -82} + m_AnchoredPosition: {x: -36, y: -94} + m_SizeDelta: {x: -550, y: -94} m_Pivot: {x: 1, y: 1} --- !u!222 &6529361293877201180 CanvasRenderer: @@ -389,6 +390,97 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &4271026606323506798 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3485502174260340894} + - component: {fileID: 2742744602978550253} + - component: {fileID: 999611683302665210} + - component: {fileID: 567388752963607407} + m_Layer: 5 + m_Name: BadgesSectionPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &3485502174260340894 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4271026606323506798} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8859572816687468068} + m_Father: {fileID: 8830084878494246411} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 1100, y: 150} + m_Pivot: {x: 1, y: 1} +--- !u!114 &2742744602978550253 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4271026606323506798} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &999611683302665210 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4271026606323506798} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 20 + m_Bottom: 30 + m_ChildAlignment: 0 + m_Spacing: 20 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &567388752963607407 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4271026606323506798} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 2 --- !u!1 &6969448981733912373 GameObject: m_ObjectHideFlags: 0 @@ -662,9 +754,16 @@ MonoBehaviour: <UserBasicInfoModuleView>k__BackingField: {fileID: 4015141173295826932} <UserDetailedInfoModuleView>k__BackingField: {fileID: 4555535650346299229} <EquippedItemsModuleView>k__BackingField: {fileID: 4775884794244998220} + <BadgesOverviewModuleView>k__BackingField: {fileID: 4605831326972397816} + <BadgesDetailsModuleView>k__BackingField: {fileID: 5017960978050368999} + <BadgeInfoModuleView>k__BackingField: {fileID: 2960552255454602728} <MainContainer>k__BackingField: {fileID: 2324426899192856976} <AddLinkModal>k__BackingField: {fileID: 9054811651154528581} <ErrorNotification>k__BackingField: {fileID: 3800359461374942149} + <OverviewSectionButton>k__BackingField: {fileID: 7865167134026999089} + <BadgesSectionButton>k__BackingField: {fileID: 4917579215862328500} + <OverviewSectionPanel>k__BackingField: {fileID: 1151176965044491678} + <BadgesSectionPanel>k__BackingField: {fileID: 4271026606323506798} --- !u!1 &8054881179605822561 GameObject: m_ObjectHideFlags: 0 @@ -697,6 +796,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2324426899192856976} + - {fileID: 3485502174260340894} m_Father: {fileID: 8817361358025418081} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -833,10 +933,12 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 7577514806039942965} - - {fileID: 499789390975270570} - {fileID: 8735803468174630723} - {fileID: 2806366990685039005} + - {fileID: 1506892681322485089} - {fileID: 8817361358025418081} + - {fileID: 1158856965650064193} + - {fileID: 4111075820835957444} m_Father: {fileID: 4128337754529364266} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} @@ -1031,7 +1133,7 @@ MonoBehaviour: m_TargetGraphic: {fileID: 2756838715054702078} m_HandleRect: {fileID: 1242067529493426053} m_Direction: 2 - m_Value: 1 + m_Value: 0 m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: @@ -1049,124 +1151,260 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1001 &1925107204629919727 +--- !u!1001 &1207332601833928870 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: serializedVersion: 3 - m_TransformParent: {fileID: 4128337754529364266} + m_TransformParent: {fileID: 3485502174260340894} m_Modifications: - - target: {fileID: 1209435917965441081, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} - propertyPath: m_Name - value: AddLinkModal + - target: {fileID: 1471442207075962239, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMax.y + value: 1 objectReference: {fileID: 0} - - target: {fileID: 1209435917965441081, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} - propertyPath: m_IsActive - value: 0 + - target: {fileID: 1471442207075962239, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMin.y + value: 1 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 1471442207075962239, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 61 + objectReference: {fileID: 0} + - target: {fileID: 2271323763057414482, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2271323763057414482, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2271323763057414482, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 296 + objectReference: {fileID: 0} + - target: {fileID: 3344195657738558535, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3344195657738558535, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3344195657738558535, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_SizeDelta.x + value: 1020 + objectReference: {fileID: 0} + - target: {fileID: 3344195657738558535, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_SizeDelta.y + value: 40 + objectReference: {fileID: 0} + - target: {fileID: 3344195657738558535, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 550 + objectReference: {fileID: 0} + - target: {fileID: 3344195657738558535, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchoredPosition.y + value: -50 + objectReference: {fileID: 0} + - target: {fileID: 3673768807488380774, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_SizeDelta.x + value: 60 + objectReference: {fileID: 0} + - target: {fileID: 3673768807488380774, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_SizeDelta.y + value: 60 + objectReference: {fileID: 0} + - target: {fileID: 3854055089243569069, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3854055089243569069, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3854055089243569069, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 172 + objectReference: {fileID: 0} + - target: {fileID: 4036778218098168766, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4036778218098168766, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4036778218098168766, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 518 + objectReference: {fileID: 0} + - target: {fileID: 6601104285856390425, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6601104285856390425, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6601104285856390425, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchoredPosition.x + value: 414 + objectReference: {fileID: 0} + - target: {fileID: 6779997798835043434, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_Name + value: BadgesDetails_PassportSubView + objectReference: {fileID: 0} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_Pivot.x - value: 0.5 + value: 1 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_Pivot.y - value: 0.5 + value: 1 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_AnchorMax.x - value: 1 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_AnchorMax.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_AnchorMin.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 1100 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 100 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalRotation.x - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 1100 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -20 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + - target: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 8459747786341781537, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8459747786341781537, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} ---- !u!224 &5734602008089499209 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} - m_PrefabInstance: {fileID: 1925107204629919727} + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 6779997798835043434, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + insertIndex: -1 + addedObject: {fileID: 780093510386855836} + - targetCorrespondingSourceObject: {fileID: 8338339246391411166, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + insertIndex: -1 + addedObject: {fileID: 5694653495083109557} + m_SourcePrefab: {fileID: 100100000, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} +--- !u!114 &5017960978050368999 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6152531127756782913, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + m_PrefabInstance: {fileID: 1207332601833928870} m_PrefabAsset: {fileID: 0} ---- !u!114 &9054811651154528581 stripped + m_GameObject: {fileID: 5680774750883873996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a31e5242bc2c472fa821f9308a228b27, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &5680774750883873996 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 6779997798835043434, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + m_PrefabInstance: {fileID: 1207332601833928870} + m_PrefabAsset: {fileID: 0} +--- !u!114 &780093510386855836 MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 7430514928200498858, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} - m_PrefabInstance: {fileID: 1925107204629919727} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} + m_GameObject: {fileID: 5680774750883873996} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 379bc81d77e3201429997dcedc3f4d67, type: 3} + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1001 &2941854203418918955 +--- !u!1 &7167186094064466296 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 8338339246391411166, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + m_PrefabInstance: {fileID: 1207332601833928870} + m_PrefabAsset: {fileID: 0} +--- !u!114 &5694653495083109557 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7167186094064466296} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &8859572816687468068 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7652398703509124738, guid: 74fd684dafc9eaf4d85c16351fc1c4c9, type: 3} + m_PrefabInstance: {fileID: 1207332601833928870} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1416964698821859308 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -1174,28 +1412,551 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 2699698443393570032} m_Modifications: - - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} - propertyPath: m_Colors.m_NormalColor.a - value: 0.6 - objectReference: {fileID: 0} - - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} - propertyPath: m_Colors.m_NormalColor.b + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_Pivot.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} - propertyPath: m_Colors.m_NormalColor.g - value: 0 + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_Pivot.y + value: 1 objectReference: {fileID: 0} - - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} - propertyPath: m_Colors.m_NormalColor.r + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_AnchorMax.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} - propertyPath: m_Colors.m_PressedColor.a - value: 0.9019608 + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_AnchorMax.y + value: 1 objectReference: {fileID: 0} - - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} - propertyPath: m_Colors.m_PressedColor.b + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_SizeDelta.x + value: 514 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_SizeDelta.y + value: 928 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 724120708741276712, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_Name + value: BadgeInfo_PassportSubView + objectReference: {fileID: 0} + - target: {fileID: 724120708741276712, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1220008731870394335, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_SizeDelta.x + value: 60 + objectReference: {fileID: 0} + - target: {fileID: 1220008731870394335, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_SizeDelta.y + value: 60 + objectReference: {fileID: 0} + - target: {fileID: 1227019625510773569, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + propertyPath: m_SortingLayer + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 724120708741276712, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + insertIndex: -1 + addedObject: {fileID: 3357227184241439369} + - targetCorrespondingSourceObject: {fileID: 1585193957589129029, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + insertIndex: -1 + addedObject: {fileID: 233920994766544307} + - targetCorrespondingSourceObject: {fileID: 7013308414442798880, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + insertIndex: -1 + addedObject: {fileID: 8345532252945367788} + - targetCorrespondingSourceObject: {fileID: 4017220180407911499, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + insertIndex: -1 + addedObject: {fileID: 7923140119052779709} + m_SourcePrefab: {fileID: 100100000, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} +--- !u!1 &456460481313996969 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1585193957589129029, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + m_PrefabInstance: {fileID: 1416964698821859308} + m_PrefabAsset: {fileID: 0} +--- !u!114 &233920994766544307 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 456460481313996969} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &1506892681322485089 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 523436847881732749, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + m_PrefabInstance: {fileID: 1416964698821859308} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1848312102231258052 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 724120708741276712, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + m_PrefabInstance: {fileID: 1416964698821859308} + m_PrefabAsset: {fileID: 0} +--- !u!114 &3357227184241439369 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1848312102231258052} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &2623937884548567975 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4017220180407911499, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + m_PrefabInstance: {fileID: 1416964698821859308} + m_PrefabAsset: {fileID: 0} +--- !u!114 &7923140119052779709 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2623937884548567975} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &2960552255454602728 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4233365464464617988, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + m_PrefabInstance: {fileID: 1416964698821859308} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1848312102231258052} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8c970bfa0f514c5bba7b7a959c29e98a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &8286156273638271180 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7013308414442798880, guid: 3d7fee56e5d75a44fb4925c116c3da16, type: 3} + m_PrefabInstance: {fileID: 1416964698821859308} + m_PrefabAsset: {fileID: 0} +--- !u!114 &8345532252945367788 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8286156273638271180} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &1925107204629919727 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 4128337754529364266} + m_Modifications: + - target: {fileID: 1209435917965441081, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_Name + value: AddLinkModal + objectReference: {fileID: 0} + - target: {fileID: 1209435917965441081, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} +--- !u!224 &5734602008089499209 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6134532614576955814, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + m_PrefabInstance: {fileID: 1925107204629919727} + m_PrefabAsset: {fileID: 0} +--- !u!114 &9054811651154528581 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7430514928200498858, guid: abb05a29f73246c4c84e75f2cbe05ada, type: 3} + m_PrefabInstance: {fileID: 1925107204629919727} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 379bc81d77e3201429997dcedc3f4d67, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &2274583705303812545 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2699698443393570032} + m_Modifications: + - target: {fileID: 127410955035292441, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Name + value: BadgesSectionButton + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.x + value: -24 + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.x + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 335731955920881656, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_text + value: Badges + objectReference: {fileID: 0} + - target: {fileID: 335731955920881656, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_HorizontalAlignment + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.x + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.y + value: 40 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.x + value: 635 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.y + value: -19.822342 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2609096750127201198, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Interactable + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7772745777469362834, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 127410955035292441, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + insertIndex: -1 + addedObject: {fileID: 2608468025926686283} + - targetCorrespondingSourceObject: {fileID: 7772745777469362834, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + insertIndex: -1 + addedObject: {fileID: 2591918090759485401} + - targetCorrespondingSourceObject: {fileID: 2693366963542867831, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + insertIndex: -1 + addedObject: {fileID: 7183375819184855372} + m_SourcePrefab: {fileID: 100100000, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} +--- !u!224 &1158856965650064193 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 2274583705303812545} + m_PrefabAsset: {fileID: 0} +--- !u!1 &2185466563029220056 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 127410955035292441, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 2274583705303812545} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2608468025926686283 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2185466563029220056} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &4246950728003237558 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2693366963542867831, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 2274583705303812545} + m_PrefabAsset: {fileID: 0} +--- !u!114 &7183375819184855372 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4246950728003237558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &4917579215862328500 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 2274583705303812545} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2185466563029220056} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9cc3ea198393cad4f9d9fa1dfda096d1, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &8380819362256001875 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7772745777469362834, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 2274583705303812545} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2591918090759485401 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8380819362256001875} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &2941854203418918955 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2699698443393570032} + m_Modifications: + - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} + propertyPath: m_Colors.m_NormalColor.a + value: 0.6 + objectReference: {fileID: 0} + - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} + propertyPath: m_Colors.m_NormalColor.b + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} + propertyPath: m_Colors.m_NormalColor.g + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} + propertyPath: m_Colors.m_NormalColor.r + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} + propertyPath: m_Colors.m_PressedColor.a + value: 0.9019608 + objectReference: {fileID: 0} + - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} + propertyPath: m_Colors.m_PressedColor.b value: 0 objectReference: {fileID: 0} - target: {fileID: 793200768551293932, guid: 7842eaf6eb5af984291ecacc1280f742, type: 3} @@ -1455,6 +2216,10 @@ PrefabInstance: propertyPath: <CharacterPreviewSettingsSo>k__BackingField value: objectReference: {fileID: 11400000, guid: 12e8c2b728842294aa5fe600818298fa, type: 2} + - target: {fileID: 3152651773604420013, guid: ef488299c2199b848ad0e35b6b5b019a, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 6064998454780672223, guid: ef488299c2199b848ad0e35b6b5b019a, type: 3} propertyPath: m_Pivot.x value: 0 @@ -1545,7 +2310,10 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] - m_AddedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 6064998454780672223, guid: ef488299c2199b848ad0e35b6b5b019a, type: 3} + insertIndex: 0 + addedObject: {fileID: 499789390975270570} m_AddedComponents: - targetCorrespondingSourceObject: {fileID: 6777088113676516343, guid: ef488299c2199b848ad0e35b6b5b019a, type: 3} insertIndex: -1 @@ -2474,87 +3242,280 @@ MonoBehaviour: m_EditorClassIdentifier: --- !u!1 &7440509307772332503 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 5283006245918565762, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} - m_PrefabInstance: {fileID: 3319432182399011925} + m_CorrespondingSourceObject: {fileID: 5283006245918565762, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} + m_PrefabInstance: {fileID: 3319432182399011925} + m_PrefabAsset: {fileID: 0} +--- !u!114 &3648220755415587765 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7440509307772332503} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &7981443185346276847 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4671136275898720698, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} + m_PrefabInstance: {fileID: 3319432182399011925} + m_PrefabAsset: {fileID: 0} +--- !u!114 &6986249835258349699 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7981443185346276847} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &8039974213192272272 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4720691638035596741, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} + m_PrefabInstance: {fileID: 3319432182399011925} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1122808780431681812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8039974213192272272} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &9170268035567969948 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5860216426975029961, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} + m_PrefabInstance: {fileID: 3319432182399011925} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1349485953121877818 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9170268035567969948} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &9209975054837430067 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5890878185438952294, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} + m_PrefabInstance: {fileID: 3319432182399011925} + m_PrefabAsset: {fileID: 0} +--- !u!114 &7545449401665541328 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9209975054837430067} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &3929564657162272836 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2699698443393570032} + m_Modifications: + - target: {fileID: 127410955035292441, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Name + value: OverviewSectionButton + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.x + value: -24 + objectReference: {fileID: 0} + - target: {fileID: 309735036037124492, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.x + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 335731955920881656, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_text + value: Overview + objectReference: {fileID: 0} + - target: {fileID: 335731955920881656, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_HorizontalAlignment + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.x + value: 107 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_SizeDelta.y + value: 40 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.x + value: 514 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_AnchoredPosition.y + value: -19.822342 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7772745777469362834, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 127410955035292441, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + insertIndex: -1 + addedObject: {fileID: 8575964344029191524} + - targetCorrespondingSourceObject: {fileID: 7772745777469362834, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + insertIndex: -1 + addedObject: {fileID: 5532526257152570684} + - targetCorrespondingSourceObject: {fileID: 2693366963542867831, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + insertIndex: -1 + addedObject: {fileID: 1505269347488553018} + m_SourcePrefab: {fileID: 100100000, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} +--- !u!1 &1434498494838144819 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2693366963542867831, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 3929564657162272836} m_PrefabAsset: {fileID: 0} ---- !u!114 &3648220755415587765 +--- !u!114 &1505269347488553018 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7440509307772332503} + m_GameObject: {fileID: 1434498494838144819} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &7981443185346276847 stripped +--- !u!1 &3984623175899640669 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 4671136275898720698, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} - m_PrefabInstance: {fileID: 3319432182399011925} + m_CorrespondingSourceObject: {fileID: 127410955035292441, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 3929564657162272836} m_PrefabAsset: {fileID: 0} ---- !u!114 &6986249835258349699 +--- !u!114 &8575964344029191524 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7981443185346276847} + m_GameObject: {fileID: 3984623175899640669} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &8039974213192272272 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 4720691638035596741, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} - m_PrefabInstance: {fileID: 3319432182399011925} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1122808780431681812 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} +--- !u!224 &4111075820835957444 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 1118554692721945216, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 3929564657162272836} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8039974213192272272} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &9170268035567969948 stripped +--- !u!1 &6725784259567342294 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 5860216426975029961, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} - m_PrefabInstance: {fileID: 3319432182399011925} + m_CorrespondingSourceObject: {fileID: 7772745777469362834, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 3929564657162272836} m_PrefabAsset: {fileID: 0} ---- !u!114 &1349485953121877818 +--- !u!114 &5532526257152570684 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9170268035567969948} + m_GameObject: {fileID: 6725784259567342294} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &9209975054837430067 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 5890878185438952294, guid: 151a47ce8596ce64e92a50d7bd425f0d, type: 3} - m_PrefabInstance: {fileID: 3319432182399011925} - m_PrefabAsset: {fileID: 0} ---- !u!114 &7545449401665541328 +--- !u!114 &7865167134026999089 stripped MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 6606272585209996661, guid: a2ddc9ce89858b441953c8b428a72288, type: 3} + m_PrefabInstance: {fileID: 3929564657162272836} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9209975054837430067} + m_GameObject: {fileID: 3984623175899640669} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Script: {fileID: 11500000, guid: 9cc3ea198393cad4f9d9fa1dfda096d1, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1001 &6598242538454984024 @@ -2707,6 +3668,271 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 2161002204034297815, guid: aae56f4776100974ba051333a3974811, type: 3} m_PrefabInstance: {fileID: 6598242538454984024} m_PrefabAsset: {fileID: 0} +--- !u!1001 &6650924772207694958 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2324426899192856976} + m_Modifications: + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_SizeDelta.x + value: 1100 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3283990351063098634, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3283990351063098634, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3283990351063098634, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3283990351063098634, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3283990351063098634, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3283990351063098634, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4487318378376810845, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_Name + value: BadgesOverview_PassportSubView + objectReference: {fileID: 0} + - target: {fileID: 5236224086316262787, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5236224086316262787, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5236224086316262787, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5236224086316262787, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5236224086316262787, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5236224086316262787, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5866222481281090283, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5866222481281090283, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5866222481281090283, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5866222481281090283, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5866222481281090283, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5866222481281090283, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4487318378376810845, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + insertIndex: -1 + addedObject: {fileID: 7225586981836695095} + - targetCorrespondingSourceObject: {fileID: 6672453353137940626, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + insertIndex: -1 + addedObject: {fileID: 3742975043558852768} + - targetCorrespondingSourceObject: {fileID: 3642235304153402807, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + insertIndex: -1 + addedObject: {fileID: 4999977540559948304} + - targetCorrespondingSourceObject: {fileID: 560759891071270739, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + insertIndex: -1 + addedObject: {fileID: 4067299529853928377} + m_SourcePrefab: {fileID: 100100000, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} +--- !u!1 &60099509273738492 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 6672453353137940626, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + m_PrefabInstance: {fileID: 6650924772207694958} + m_PrefabAsset: {fileID: 0} +--- !u!114 &3742975043558852768 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 60099509273738492} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &4605831326972397816 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7180963114228604054, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + m_PrefabInstance: {fileID: 6650924772207694958} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7064736720120595763} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f282b72920be42ffb024cf1abac04da5, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &6210271046698684379 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 748587418752867253, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + m_PrefabInstance: {fileID: 6650924772207694958} + m_PrefabAsset: {fileID: 0} +--- !u!1 &6594656277511531325 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 560759891071270739, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + m_PrefabInstance: {fileID: 6650924772207694958} + m_PrefabAsset: {fileID: 0} +--- !u!114 &4067299529853928377 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6594656277511531325} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &7064736720120595763 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4487318378376810845, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + m_PrefabInstance: {fileID: 6650924772207694958} + m_PrefabAsset: {fileID: 0} +--- !u!114 &7225586981836695095 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7064736720120595763} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &7982354781647296985 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 3642235304153402807, guid: 170ea5f707d0da3449ff8b8d13446e46, type: 3} + m_PrefabInstance: {fileID: 6650924772207694958} + m_PrefabAsset: {fileID: 0} +--- !u!114 &4999977540559948304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7982354781647296985} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eddc1fbd4bd796345832996a9560b9bd, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &7245522264043032053 PrefabInstance: m_ObjectHideFlags: 0 @@ -2921,15 +4147,23 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5153584547133964217, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_AnchorMax.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5153584547133964217, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_AnchorMin.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5153584547133964217, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_SizeDelta.x - value: 68 + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5153584547133964217, guid: b705caef58a2b9941b467418b0b7abad, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6606920335302356016, guid: b705caef58a2b9941b467418b0b7abad, type: 3} + propertyPath: m_IsActive + value: 1 objectReference: {fileID: 0} - target: {fileID: 7300815277483745365, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_AnchorMax.y @@ -2949,23 +4183,27 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7845604890218766567, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_AnchorMax.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7845604890218766567, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_AnchorMin.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7845604890218766567, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_SizeDelta.x - value: 72.58 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7845604890218766567, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_AnchoredPosition.x - value: 54.29 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7845604890218766567, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_AnchoredPosition.y - value: -14.55 + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8480904758322488965, guid: b705caef58a2b9941b467418b0b7abad, type: 3} + propertyPath: m_IsActive + value: 1 objectReference: {fileID: 0} - target: {fileID: 8887470154302659290, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_AnchorMax.y @@ -2975,6 +4213,10 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 8887470154302659290, guid: b705caef58a2b9941b467418b0b7abad, type: 3} + propertyPath: m_SizeDelta.y + value: 38 + objectReference: {fileID: 0} - target: {fileID: 8887470154302659290, guid: b705caef58a2b9941b467418b0b7abad, type: 3} propertyPath: m_AnchoredPosition.x value: 0 diff --git a/Explorer/Assets/DCL/Passport/Prefabs/UserDetailInfo_PassportModule.prefab b/Explorer/Assets/DCL/Passport/Prefabs/UserDetailInfo_PassportModule.prefab index 8dd1beaef7..619b3c310d 100644 --- a/Explorer/Assets/DCL/Passport/Prefabs/UserDetailInfo_PassportModule.prefab +++ b/Explorer/Assets/DCL/Passport/Prefabs/UserDetailInfo_PassportModule.prefab @@ -67,7 +67,7 @@ MonoBehaviour: m_Calls: [] m_text: "\u200B" m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} + m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} @@ -133,7 +133,7 @@ MonoBehaviour: m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 + m_hasFontAssetChanged: 1 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &193100552548197144 diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/DCL.Analytics.asmdef b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/DCL.Analytics.asmdef index e511bee492..f3477aa188 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/DCL.Analytics.asmdef +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/DCL.Analytics.asmdef @@ -2,7 +2,6 @@ "name": "DCL.Analytics", "rootNamespace": "", "references": [ - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:e0eedfa2deb9406daf86fd8368728e39", "GUID:8322ea9340a544c59ddc56d4793eac74", "GUID:c80c82a8f4e04453b85fbab973d6774a", @@ -23,7 +22,9 @@ "GUID:45fc0f02fe4e57c4a93a421d8f6f53df", "GUID:e169fa6683c924c7e99a85981a91d953", "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b", - "GUID:28964ef7dc9441b6b8671b61a8106690" + "GUID:28964ef7dc9441b6b8671b61a8106690", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", + "GUID:543b8f091a5947a3880b7f2bca2358bd" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/DecoratorBased/BackpackEventBusDecorator.cs b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/DecoratorBased/BackpackEventBusDecorator.cs index d128ccbf99..4366c354a6 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/DecoratorBased/BackpackEventBusDecorator.cs +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/DecoratorBased/BackpackEventBusDecorator.cs @@ -1,4 +1,5 @@ using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.Backpack.BackpackBus; using DCL.CharacterPreview; diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/Systems/AnalyticsEmotesSystem.cs b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/Systems/AnalyticsEmotesSystem.cs index e0837a04d7..2aa311f802 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/Systems/AnalyticsEmotesSystem.cs +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Analytics/Systems/AnalyticsEmotesSystem.cs @@ -8,6 +8,7 @@ using ECS; using ECS.Abstract; using Segment.Serialization; +using CharacterEmoteSystem = DCL.AvatarRendering.Emotes.Play.CharacterEmoteSystem; namespace DCL.Analytics.Systems { diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Builders/IDebugContainerBuilder.cs b/Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Builders/IDebugContainerBuilder.cs index 253ef9b264..0301906aeb 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Builders/IDebugContainerBuilder.cs +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Builders/IDebugContainerBuilder.cs @@ -27,6 +27,7 @@ public static class Categories public const string ROOM_SCENE = "Room: Scene"; public const string PERFORMANCE = "Performance"; public const string MEMORY = "Memory"; + public const string CURRENT_SCENE = "Current scene"; } } diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DCL.Diagnostics.asmref b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DCL.Diagnostics.asmref new file mode 100644 index 0000000000..2ac3fa4e0f --- /dev/null +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DCL.Diagnostics.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" +} \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSources.PlayMode.Tests.asmref.meta b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DCL.Diagnostics.asmref.meta similarity index 77% rename from Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSources.PlayMode.Tests.asmref.meta rename to Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DCL.Diagnostics.asmref.meta index c3a1e80d06..d2354a86ee 100644 --- a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSources.PlayMode.Tests.asmref.meta +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DCL.Diagnostics.asmref.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2f4a6421084c1f546a0341c24d374e27 +guid: af1362856af29a54c808ba47d3cd4430 AssemblyDefinitionReferenceImporter: externalObjects: {} userData: diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/Diagnostics.asmdef.meta b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/Diagnostics.asmdef.meta deleted file mode 100644 index 4d3306fd03..0000000000 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/Diagnostics.asmdef.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 101b8b6ebaf64668909b49c4b7a1420d -timeCreated: 1687510935 \ No newline at end of file diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DiagnosticsContainer.cs b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DiagnosticsContainer.cs index c14ef0f3b4..4c2542059a 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DiagnosticsContainer.cs +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/DiagnosticsContainer.cs @@ -15,12 +15,19 @@ public class DiagnosticsContainer : IDisposable private ILogHandler defaultLogHandler; public ReportHubLogger ReportHubLogger { get; private set; } + public SentryReportHandler? Sentry { get; private set; } + public void Dispose() { // Restore Default Unity Logger Debug.unityLogger.logHandler = defaultLogHandler; } + public void AddSentryScopeConfigurator(SentryReportHandler.ConfigureScope configureScope) + { + Sentry?.AddScopeConfigurator(configureScope); + } + public static DiagnosticsContainer Create(IReportsHandlingSettings settings, bool enableLocalSceneReporting = false, params (ReportHandler, IReportHandler)[] additionalHandlers) { settings.NotifyErrorDebugLogDisabled(); @@ -32,8 +39,10 @@ public static DiagnosticsContainer Create(IReportsHandlingSettings settings, boo if (settings.IsEnabled(ReportHandler.DebugLog)) handlers.Add((ReportHandler.DebugLog, new DebugLogReportHandler(Debug.unityLogger.logHandler, settings.GetMatrix(ReportHandler.DebugLog), settings.DebounceEnabled))); + SentryReportHandler? sentryReportHandler = null; + if (settings.IsEnabled(ReportHandler.Sentry)) - handlers.Add((ReportHandler.Sentry, new SentryReportHandler(settings.GetMatrix(ReportHandler.Sentry), settings.DebounceEnabled))); + handlers.Add((ReportHandler.Sentry, sentryReportHandler = new SentryReportHandler(settings.GetMatrix(ReportHandler.Sentry), settings.DebounceEnabled))); if (enableLocalSceneReporting) AddLocalSceneReportingHandler(handlers); @@ -48,7 +57,7 @@ public static DiagnosticsContainer Create(IReportsHandlingSettings settings, boo // Enable Hub static accessors ReportHub.Initialize(logger, enableLocalSceneReporting); - return new DiagnosticsContainer { ReportHubLogger = logger, defaultLogHandler = defaultLogHandler }; + return new DiagnosticsContainer { ReportHubLogger = logger, defaultLogHandler = defaultLogHandler, Sentry = sentryReportHandler }; } private static void AddLocalSceneReportingHandler(List<(ReportHandler, IReportHandler)> handlers) diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportCategory.cs b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportCategory.cs index 5017f76834..c35ea174bf 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportCategory.cs +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportCategory.cs @@ -180,6 +180,7 @@ public static class ReportCategory /// </summary> public const string WEARABLE = nameof(WEARABLE); public const string EMOTE = nameof(EMOTE); + public const string THUMBNAILS = nameof(THUMBNAILS); public const string AUTHENTICATION = nameof(AUTHENTICATION); @@ -206,9 +207,9 @@ public static class ReportCategory public const string CHARACTER_TRIGGER_AREA = nameof(CHARACTER_TRIGGER_AREA); /// <summary> - /// CameraModeArea SDK component + /// SDK Camera related systems /// </summary> - public const string CAMERA_MODE_AREA = nameof(CAMERA_MODE_AREA); + public const string SDK_CAMERA = nameof(SDK_CAMERA); /// <summary> /// Player-related data propagated to SDK @@ -258,6 +259,8 @@ public static class ReportCategory public const string BACKPACK = nameof(BACKPACK); + public const string BADGES = nameof(BADGES); + /// <summary> /// Whatever is coming from external pure C# plugins /// </summary> @@ -277,5 +280,8 @@ public static class ReportCategory /// Default category into which falls everything that is reported without info and by default Unity Debug.Log /// </summary> public const string UNSPECIFIED = nameof(UNSPECIFIED); + + public const string PORTABLE_EXPERIENCE= nameof(PORTABLE_EXPERIENCE); + } } diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportData.cs b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportData.cs index 7976d4d73a..19b47f0fc8 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportData.cs +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportData.cs @@ -24,5 +24,8 @@ public ReportData(string category, ReportHint hint = ReportHint.None, SceneShort public static implicit operator ReportData(string category) => new (category); + + public ReportData WithSessionStatic() => + new (Category, ReportHint.SessionStatic | Hint, SceneShortInfo, SceneTickNumber); } } diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportsHandlingSettingsDevelopment.asset b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportsHandlingSettingsDevelopment.asset index 3d7efed23c..fbbd673682 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportsHandlingSettingsDevelopment.asset +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/ReportsHandlingSettingsDevelopment.asset @@ -38,8 +38,6 @@ MonoBehaviour: Severity: 0 - Category: ARCHIPELAGO_REQUEST Severity: 0 - - Category: ASSET_BUNDLES - Severity: 0 - Category: ASSETS_PROVISION Severity: 0 - Category: AUDIO @@ -168,8 +166,6 @@ MonoBehaviour: Severity: 4 - Category: ARCHIPELAGO_REQUEST Severity: 4 - - Category: ASSET_BUNDLES - Severity: 4 - Category: ASSETS_PROVISION Severity: 4 - Category: AUDIO @@ -298,6 +294,10 @@ MonoBehaviour: Severity: 4 - Category: UNSPECIFIED Severity: 3 + - Category: ASSET_BUNDLES + Severity: 0 + - Category: ASSET_BUNDLES + Severity: 4 sentryMatrix: entries: [] debounceEnabled: 1 diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Sentry/SentryReportHandler.cs b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Sentry/SentryReportHandler.cs index f499efb2d9..65234766a4 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Sentry/SentryReportHandler.cs +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Sentry/SentryReportHandler.cs @@ -1,6 +1,9 @@ +using DCL.Optimization.Pools; +using DCL.Optimization.ThreadSafePool; using Sentry; using Sentry.Unity; using System; +using System.Collections.Generic; using UnityEngine; using Object = UnityEngine.Object; @@ -8,9 +11,17 @@ namespace DCL.Diagnostics.Sentry { public class SentryReportHandler : ReportHandlerBase { + public delegate void ConfigureScope(Scope scope); + + private readonly List<ConfigureScope> scopeConfigurators = new (10); + + private readonly PerReportScope.Pool scopesPool; + public SentryReportHandler(ICategorySeverityMatrix matrix, bool debounceEnabled) : base(matrix, debounceEnabled) { + scopesPool = new PerReportScope.Pool(scopeConfigurators); + // To prevent unwanted logs, manual initialization is required. // We need to delay the replacement of Debug.unityLogger.logHandler instance // to ensure that Unity's default logger is initially injected in our custom loggers. @@ -30,41 +41,44 @@ public SentryReportHandler(ICategorySeverityMatrix matrix, bool debounceEnabled) SentrySdk.Init(options); } - internal override void LogInternal(LogType logType, ReportData category, Object context, object message) + public void AddIdentityToScope(Scope scope, string wallet) { - SentrySdk.CaptureMessage(message.ToString(), scope => AddReportData(scope, in category), ToSentryLevel(in logType)); + scope.SetTag("wallet", wallet); } - internal override void LogFormatInternal(LogType logType, ReportData category, Object context, object message, params object[] args) + public void AddCurrentSceneToScope(Scope scope, SceneShortInfo sceneInfo) { - var format = string.Format(message.ToString(), args); - SentrySdk.CaptureMessage(format, scope => AddReportData(scope, in category), ToSentryLevel(in logType)); + scope.SetTag("current_scene.base_parcel", sceneInfo.BaseParcel.ToString()); + scope.SetTag("current_scene.name", sceneInfo.Name); } - internal override void LogExceptionInternal<T>(T ecsSystemException) + public void AddScopeConfigurator(ConfigureScope configureScope) { - SentrySdk.CaptureException(ecsSystemException); + scopeConfigurators.Add(configureScope); } - internal override void LogExceptionInternal(Exception exception, ReportData reportData, Object context) + internal override void LogInternal(LogType logType, ReportData category, Object context, object message) { - SentrySdk.CaptureException(exception, scope => AddReportData(scope, in reportData)); + using PoolExtensions.Scope<PerReportScope> reportScope = scopesPool.Scope(category); + SentrySdk.CaptureMessage(message.ToString(), reportScope.Value.ExecuteCached, ToSentryLevel(in logType)); } - private void AddReportData(Scope scope, in ReportData data) + internal override void LogFormatInternal(LogType logType, ReportData category, Object context, object message, params object[] args) { - AddCategoryTag(scope, in data); - AddSceneInfo(scope, in data); + using PoolExtensions.Scope<PerReportScope> reportScope = scopesPool.Scope(category); + var format = string.Format(message.ToString(), args); + SentrySdk.CaptureMessage(format, reportScope.Value.ExecuteCached, ToSentryLevel(in logType)); } - private void AddCategoryTag(Scope scope, in ReportData data) => - scope.SetTag("category", data.Category); + internal override void LogExceptionInternal<T>(T ecsSystemException) + { + SentrySdk.CaptureException(ecsSystemException); + } - private void AddSceneInfo(Scope scope, in ReportData data) + internal override void LogExceptionInternal(Exception exception, ReportData reportData, Object context) { - if (data.SceneShortInfo.BaseParcel == Vector2Int.zero) return; - scope.SetTag("scene.base_parcel", data.SceneShortInfo.BaseParcel.ToString()); - scope.SetTag("scene.name", data.SceneShortInfo.Name); + using PoolExtensions.Scope<PerReportScope> reportScope = scopesPool.Scope(reportData); + SentrySdk.CaptureException(exception, reportScope.Value.ExecuteCached); } private bool IsValidConfiguration(SentryUnityOptions options) => @@ -86,5 +100,58 @@ private SentryLevel ToSentryLevel(in LogType logType) return SentryLevel.Warning; } } + + private class PerReportScope + { + internal class Pool : ThreadSafeObjectPool<PerReportScope> + { + public Pool(IReadOnlyList<ConfigureScope> scopeConfigurators) : base( + () => new PerReportScope(scopeConfigurators), defaultCapacity: 3, collectionCheck: PoolConstants.CHECK_COLLECTIONS) { } + + public PoolExtensions.Scope<PerReportScope> Scope(ReportData reportData) + { + PoolExtensions.Scope<PerReportScope> scope = this.AutoScope(); + scope.Value.reportData = reportData; + return scope; + } + } + + private readonly IReadOnlyList<ConfigureScope> scopeConfigurators; + + public readonly Action<Scope> ExecuteCached; + + internal ReportData reportData { private get; set; } + + private PerReportScope(IReadOnlyList<ConfigureScope> scopeConfigurators) + { + this.scopeConfigurators = scopeConfigurators; + + ExecuteCached = Execute; + } + + private void Execute(Scope scope) + { + // Add global scope + + for (var i = 0; i < scopeConfigurators.Count; i++) + scopeConfigurators[i](scope); + + // Add local scope + + AddCategoryTag(scope, reportData); + AddSceneInfo(scope, reportData); + } + + private static void AddCategoryTag(Scope scope, ReportData data) => + scope.SetTag("category", data.Category); + + private static void AddSceneInfo(Scope scope, ReportData data) + { + if (data.SceneShortInfo.BaseParcel != Vector2Int.zero) ; + scope.SetTag("scene.base_parcel", data.SceneShortInfo.BaseParcel.ToString()); + + scope.SetTag("scene.name", data.SceneShortInfo.Name); + } + } } } diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Settings/Editor/ReportsHanding.Settings.Editor.asmdef b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Settings/Editor/ReportsHanding.Settings.Editor.asmdef index f0471c1f74..28b18755c4 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Settings/Editor/ReportsHanding.Settings.Editor.asmdef +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Settings/Editor/ReportsHanding.Settings.Editor.asmdef @@ -2,8 +2,8 @@ "name": "ReportsHanding.Settings.Editor", "rootNamespace": "", "references": [ - "GUID:101b8b6ebaf64668909b49c4b7a1420d", - "GUID:fa7b3fdbb04d67549916da7bd2af58ab" + "GUID:fa7b3fdbb04d67549916da7bd2af58ab", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [ "Editor" diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Tests/BaseUnityLoopSystemShould.cs b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Tests/BaseUnityLoopSystemShould.cs index 59bf4ab92f..7a9df8c26d 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Tests/BaseUnityLoopSystemShould.cs +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Tests/BaseUnityLoopSystemShould.cs @@ -63,28 +63,28 @@ public class BaseUnityLoopSystemShould [Test] public void DefineCategory() { - var system = new DirectCategorySystem(null); + var system = new DirectCategorySystem(World.Create()); Assert.That(system.GetReportCategory(), Is.EqualTo("DirectCategorySystem")); } [Test] public void InheritCategoryFromGroup() { - var system = new InheritedCategorySystem(null); + var system = new InheritedCategorySystem(World.Create()); Assert.That(system.GetReportCategory(), Is.EqualTo("DirectCategoryGroup")); } [Test] public void OverrideCategoryFromGroup() { - var system = new OverrideCategorySystem(null); + var system = new OverrideCategorySystem(World.Create()); Assert.That(system.GetReportCategory(), Is.EqualTo("OverrideCategorySystem")); } [Test] public void FallbackToEcsCategory() { - var system = new FallbackCategorySystem(null); + var system = new FallbackCategorySystem(World.Create()); Assert.That(system.GetReportCategory(), Is.EqualTo(ReportCategory.ECS)); } } diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Tests/ReportsHandling.Tests.asmdef b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Tests/ReportsHandling.Tests.asmdef index 2de0d61511..4d434bf2bb 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Tests/ReportsHandling.Tests.asmdef +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling/Tests/ReportsHandling.Tests.asmdef @@ -6,7 +6,8 @@ "UnityEditor.TestRunner", "Diagnostics", "ECS", - "Arch.SystemGroups" + "Arch.SystemGroups", + "DCL.Optimization" ], "includePlatforms": [ "Editor" diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Optimization/DCL.Optimization.asmdef b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Optimization/DCL.Optimization.asmdef index b440c053b4..df19b05a88 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Optimization/DCL.Optimization.asmdef +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Optimization/DCL.Optimization.asmdef @@ -4,8 +4,9 @@ "references": [ "GUID:56e8195b069a4dca9c4c4f313c65f526", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", - "GUID:3c7b57a14671040bd8c549056adc04f5" + "GUID:3c7b57a14671040bd8c549056adc04f5", + "GUID:8e4451082aee64eec9b1cf3f1f114bbd", + "GUID:9887bf5401cdc9140916d3edbea10b69" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Optimization/Pools/PoolConstants.cs b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Optimization/Pools/PoolConstants.cs index 5bbedd8ce8..e9f71cb609 100644 --- a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Optimization/Pools/PoolConstants.cs +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Optimization/Pools/PoolConstants.cs @@ -58,5 +58,10 @@ public static class PoolConstants /// The base number of wearables on a single avatar /// </summary> public const int WEARABLES_PER_AVATAR_COUNT = 15; + + /// <summary> + /// The initial expected number of PX + /// </summary> + public const int PORTABLE_EXPERIENCES_INITIAL_COUNT = 1; } } diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Profiling/csc.rsp b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Profiling/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Profiling/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/PerformanceAndDiagnostics/Profiling/csc.rsp.meta b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Profiling/csc.rsp.meta new file mode 100644 index 0000000000..35fd00cdd6 --- /dev/null +++ b/Explorer/Assets/DCL/PerformanceAndDiagnostics/Profiling/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 59c9dddb2e45406b9f240267240db498 +timeCreated: 1724256932 \ No newline at end of file diff --git a/Explorer/Assets/DCL/PlacesAPIService/IPlacesAPIClient.cs b/Explorer/Assets/DCL/PlacesAPIService/IPlacesAPIClient.cs index a6f98e9573..ee37d70d93 100644 --- a/Explorer/Assets/DCL/PlacesAPIService/IPlacesAPIClient.cs +++ b/Explorer/Assets/DCL/PlacesAPIService/IPlacesAPIClient.cs @@ -1,4 +1,5 @@ using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using System.Collections.Generic; using System.Threading; using UnityEngine; diff --git a/Explorer/Assets/DCL/PlacesAPIService/PlacesAPIClient.cs b/Explorer/Assets/DCL/PlacesAPIService/PlacesAPIClient.cs index 0254e22411..25471538ee 100644 --- a/Explorer/Assets/DCL/PlacesAPIService/PlacesAPIClient.cs +++ b/Explorer/Assets/DCL/PlacesAPIService/PlacesAPIClient.cs @@ -1,5 +1,6 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using DCL.Multiplayer.Connections.DecentralandUrls; using DCL.Optimization.Pools; using DCL.WebRequests; @@ -40,7 +41,7 @@ private URLBuilder ResetURLBuilder() { string url = baseURL + "?search={0}&offset={1}&limit={2}"; - var result = webRequestController.GetAsync(string.Format(url, searchString.Replace(" ", "+"), pageNumber * pageSize, pageSize), ct); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> result = webRequestController.GetAsync(string.Format(url, searchString.Replace(" ", "+"), pageNumber * pageSize, pageSize), ct, ReportCategory.UI); PlacesData.PlacesAPIResponse response = PlacesData.PLACES_API_RESPONSE_POOL.Get(); @@ -58,7 +59,7 @@ await result.OverwriteFromJsonAsync(response, WRJsonParser.Unity, { string url = baseURL + "?order_by={3}&order=desc&with_realms_detail=true&offset={0}&limit={1}&{2}"; - var result = webRequestController.GetAsync(string.Format(url, pageNumber * pageSize, pageSize, filter, sort), ct); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> result = webRequestController.GetAsync(string.Format(url, pageNumber * pageSize, pageSize, filter, sort), ct, ReportCategory.UI); PlacesData.PlacesAPIResponse response = PlacesData.PLACES_API_RESPONSE_POOL.Get(); @@ -76,7 +77,7 @@ await result.OverwriteFromJsonAsync(response, WRJsonParser.Unity, { string url = baseURL + "?positions={0},{1}&with_realms_detail=true"; - var result = webRequestController.GetAsync(string.Format(url, coords.x, coords.y), ct); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> result = webRequestController.GetAsync(string.Format(url, coords.x, coords.y), ct, ReportCategory.UI); using PlacesData.PlacesAPIResponse response = PlacesData.PLACES_API_RESPONSE_POOL.Get(); @@ -94,7 +95,7 @@ await result.OverwriteFromJsonAsync(response, WRJsonParser.Unity, { var url = $"{baseURL}/{placeUUID}?with_realms_detail=true"; - var result = webRequestController.GetAsync(url, ct); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> result = webRequestController.GetAsync(url, ct, ReportCategory.UI); PlacesData.PlacesAPIGetParcelResponse response = await result.CreateFromJson<PlacesData.PlacesAPIGetParcelResponse>(WRJsonParser.Unity, createCustomExceptionOnFailure: static (_, text) => new PlacesAPIException("Error parsing place info:", text)) @@ -120,7 +121,7 @@ await result.OverwriteFromJsonAsync(response, WRJsonParser.Unity, foreach (Vector2Int coords in coordsList) url.AppendParameter(("positions", $"{coords.x},{coords.y}")).AppendParameter(WITH_REALMS_DETAIL); - var result = webRequestController.GetAsync(new CommonArguments(url.Build()), ct); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> result = webRequestController.GetAsync(new CommonArguments(url.Build()), ct, ReportCategory.UI); using PoolExtensions.Scope<PlacesData.PlacesAPIResponse> rentedList = PlacesData.PLACES_API_RESPONSE_POOL.AutoScope(); @@ -137,7 +138,7 @@ await result.OverwriteFromJsonAsync(rentedList.Value, WRJsonParser.Unity, { string url = baseURL + "?only_favorites=true&with_realms_detail=true&offset={0}&limit={1}"; - var result = webRequestController.GetAsync(string.Format(url, pageNumber * pageSize, pageSize), ct); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> result = webRequestController.GetAsync(string.Format(url, pageNumber * pageSize, pageSize), ct, ReportCategory.UI); PlacesData.PlacesAPIResponse response = PlacesData.PLACES_API_RESPONSE_POOL.Get(); @@ -155,7 +156,7 @@ await result.OverwriteFromJsonAsync(response, WRJsonParser.Unity, { string url = baseURL + "?only_favorites=true&with_realms_detail=true"; - var result = webRequestController.GetAsync(url, ct); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> result = webRequestController.GetAsync(url, ct, ReportCategory.UI); PlacesData.PlacesAPIResponse response = PlacesData.PLACES_API_RESPONSE_POOL.Get(); @@ -175,7 +176,7 @@ public async UniTask SetPlaceFavoriteAsync(string placeUUID, bool isFavorite, Ca const string FAVORITE_PAYLOAD = "{\"favorites\": true}"; const string NOT_FAVORITE_PAYLOAD = "{\"favorites\": false}"; - await webRequestController.PatchAsync(string.Format(url, placeUUID), GenericPatchArguments.CreateJson(isFavorite ? FAVORITE_PAYLOAD : NOT_FAVORITE_PAYLOAD), ct) + await webRequestController.PatchAsync(string.Format(url, placeUUID), GenericPatchArguments.CreateJson(isFavorite ? FAVORITE_PAYLOAD : NOT_FAVORITE_PAYLOAD), ct, ReportCategory.UI) .WithCustomExceptionAsync(static exc => new PlacesAPIException(exc, "Error setting place favorite:")); } @@ -193,13 +194,13 @@ public async UniTask SetPlaceVoteAsync(bool? isUpvote, string placeUUID, Cancell else payload = isUpvote == true ? LIKE_PAYLOAD : DISLIKE_PAYLOAD; - await webRequestController.PostAsync(string.Format(url, placeUUID), GenericPostArguments.CreateJson(payload), ct) + await webRequestController.PostAsync(string.Format(url, placeUUID), GenericPostArguments.CreateJson(payload), ct, ReportCategory.UI) .WithCustomExceptionAsync(static exc => new PlacesAPIException(exc, "Error setting place vote:")); } public async UniTask<List<string>> GetPointsOfInterestCoordsAsync(CancellationToken ct) { - var result = webRequestController.PostAsync(poiURL, GenericPostArguments.Empty, ct); + GenericDownloadHandlerUtils.Adapter<GenericPostRequest, GenericPostArguments> result = webRequestController.PostAsync(poiURL, GenericPostArguments.Empty, ct, ReportCategory.UI); PointsOfInterestCoordsAPIResponse response = await result.CreateFromJson<PointsOfInterestCoordsAPIResponse>(WRJsonParser.Unity, createCustomExceptionOnFailure: static (_, text) => new PlacesAPIException("Error parsing get POIs response:", text)); @@ -213,7 +214,7 @@ public async UniTask<List<string>> GetPointsOfInterestCoordsAsync(CancellationTo public async UniTask ReportPlaceAsync(PlaceContentReportPayload placeContentReportPayload, CancellationToken ct) { // POST for getting a signed url - var postResult = webRequestController.PostAsync(contentModerationReportURL, GenericPostArguments.Empty, ct); + GenericDownloadHandlerUtils.Adapter<GenericPostRequest, GenericPostArguments> postResult = webRequestController.PostAsync(contentModerationReportURL, GenericPostArguments.Empty, ct, ReportCategory.UI); using PoolExtensions.Scope<ReportPlaceAPIResponse> responseRental = PlacesData.REPORT_PLACE_API_RESPONSE_POOL.AutoScope(); ReportPlaceAPIResponse response = responseRental.Value; @@ -232,7 +233,7 @@ await postResult.OverwriteFromJsonAsync(response, WRJsonParser.Unity, await UniTask.SwitchToMainThread(); - await webRequestController.PutAsync(response.data.signed_url, GenericPutArguments.CreateJson(putData), ct) + await webRequestController.PutAsync(response.data.signed_url, GenericPutArguments.CreateJson(putData), ct, ReportCategory.UI) .WithCustomExceptionAsync(static exc => new PlacesAPIException(exc, "Error reporting place:")); } } diff --git a/Explorer/Assets/DCL/PluginSystem/DCL.Plugins.asmdef b/Explorer/Assets/DCL/PluginSystem/DCL.Plugins.asmdef index 3034d44998..4b580c21c4 100644 --- a/Explorer/Assets/DCL/PluginSystem/DCL.Plugins.asmdef +++ b/Explorer/Assets/DCL/PluginSystem/DCL.Plugins.asmdef @@ -15,7 +15,6 @@ "GUID:007bff6000804d90ac597452fb69a4ee", "GUID:ac3295688c7c22745a96e6ac34718181", "GUID:75469ad4d38634e559750d17036d5f7c", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:fa7b3fdbb04d67549916da7bd2af58ab", "GUID:286980af24684da6acc1caa413039811", "GUID:3c7b57a14671040bd8c549056adc04f5", @@ -102,8 +101,8 @@ "GUID:01357ec67dc740fd8773f7adcf9791eb", "GUID:d9b09f438ea651c4fbaa0ed6abca7663", "GUID:3ca842002c51d0a43b73e45298809a13", - "GUID:ae249ee11a6e0ea4aa01cefc0246a151", "GUID:ace653ac543d483ba8abee112a3ba2a6", + "GUID:ae249ee11a6e0ea4aa01cefc0246a151", "GUID:d28a7e4beeca475418c15757abf1b6f1", "GUID:0df5180c0c3a0594fbfa11f83736de9f", "GUID:ca926b7b13255b84199c21c5e2d9dfa4", @@ -113,6 +112,7 @@ "GUID:01f7bfa188da76f4b8eedc875c66b334", "GUID:bd6eca6559a7438f86a272185d5bc54b", "GUID:ff9608d635a64a03a75efb8e221a9d57", + "GUID:f1eaef1b40a68e74cb90cbedebf57bbf", "GUID:f4a0f40a2545482b8929d4c3c642f50a", "GUID:e74ed5baa5004d34a6b3240075d14758", "GUID:7175400a68914a45acecc9fb068de3b8", @@ -121,12 +121,15 @@ "GUID:828002f0a2864c3cbbca4d1de01c7455", "GUID:52421c42d33594c47a6fbd48b45b1259", "GUID:df934776371151c45b473e9aa39efd1b", + "GUID:009d9a3e28944e8590be5228174e6979", "GUID:c5db5ed4ea75a402dba1512abe9482ec", "GUID:a285ec5e26824438b1b2ab8f22969298", - "GUID:a0d83a4df040477894e767d4333169ec", "GUID:8baf705856414dad9a73b3f382f1bc8b", - "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b", "GUID:30e71cae72d2eb34584696878bc78813", + "GUID:a0d83a4df040477894e767d4333169ec", + "GUID:543b8f091a5947a3880b7f2bca2358bd", + "GUID:e5a23cdae0ef4d86aafc237a73280975", + "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b", "GUID:1c5f9b69f95e40d18f11049c155eeaf8" ], "includePlatforms": [], diff --git a/Explorer/Assets/DCL/PluginSystem/Global/AvatarPlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/AvatarPlugin.cs index 1038ff0ca2..2d52e344d3 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/AvatarPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/AvatarPlugin.cs @@ -24,6 +24,7 @@ using DCL.AvatarRendering.AvatarShape; using DCL.AvatarRendering.AvatarShape.Helpers; using DCL.Multiplayer.Profiles.Entities; +using DCL.AvatarRendering.Loading.Assets; using DCL.Multiplayer.Profiles.Tables; using UnityEngine; using UnityEngine.AddressableAssets; @@ -48,11 +49,11 @@ public class AvatarPlugin : IDCLGlobalPlugin<AvatarPlugin.AvatarShapeSettings> private readonly IPerformanceBudget memoryBudget; private readonly IRealmData realmData; - private readonly WearableAssetsCache wearableAssetsCache = new (100); + private readonly AttachmentsAssetsCache attachmentsAssetsCache = new (100); // late init private IComponentPool<AvatarBase> avatarPoolRegistry = null!; - private IAvatarMaterialPoolHandler avatarMaterialPoolHandler = null!; + private IAvatarMaterialPoolHandler avatarMaterialPoolHandler = null!; private IExtendedObjectPool<ComputeShader> computeShaderPool = null!; private readonly NametagsData nametagsData; @@ -67,9 +68,9 @@ public class AvatarPlugin : IDCLGlobalPlugin<AvatarPlugin.AvatarShapeSettings> private readonly DefaultFaceFeaturesHandler defaultFaceFeaturesHandler; private readonly TextureArrayContainerFactory textureArrayContainerFactory; - private readonly IWearableCache wearableCache; private readonly RemoteEntities remoteEntities; private readonly ExposedTransform playerTransform; + private readonly IWearableStorage wearableStorage; public AvatarPlugin( IComponentPoolsRegistry poolsRegistry, @@ -84,9 +85,10 @@ public AvatarPlugin( DefaultFaceFeaturesHandler defaultFaceFeaturesHandler, NametagsData nametagsData, TextureArrayContainerFactory textureArrayContainerFactory, - IWearableCache wearableCache, + IWearableStorage wearableStorage, RemoteEntities remoteEntities, - ExposedTransform playerTransform) + ExposedTransform playerTransform + ) { this.assetsProvisioner = assetsProvisioner; this.frameTimeCapBudget = frameTimeCapBudget; @@ -99,17 +101,17 @@ public AvatarPlugin( this.memoryBudget = memoryBudget; this.nametagsData = nametagsData; this.textureArrayContainerFactory = textureArrayContainerFactory; - this.wearableCache = wearableCache; this.remoteEntities = remoteEntities; this.playerTransform = playerTransform; + this.wearableStorage = wearableStorage; componentPoolsRegistry = poolsRegistry; - cacheCleaner.Register(wearableAssetsCache); + cacheCleaner.Register(attachmentsAssetsCache); } public void Dispose() { - wearableAssetsCache.Dispose(); + attachmentsAssetsCache.Dispose(); } public async UniTask InitializeAsync(AvatarShapeSettings settings, CancellationToken ct) @@ -137,12 +139,13 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, cacheCleaner.Register(avatarPoolRegistry); cacheCleaner.Register(computeShaderPool); + foreach (var extendedObjectPool in avatarMaterialPoolHandler.GetAllMaterialsPools()) cacheCleaner.Register(extendedObjectPool.Pool); AvatarInstantiatorSystem.InjectToWorld(ref builder, frameTimeCapBudget, memoryBudget, avatarPoolRegistry, avatarMaterialPoolHandler, - computeShaderPool, wearableAssetsCache, skinningStrategy, vertOutBuffer, mainPlayerAvatarBaseProxy, defaultFaceFeaturesHandler, - wearableCache); + computeShaderPool, attachmentsAssetsCache, skinningStrategy, vertOutBuffer, mainPlayerAvatarBaseProxy, defaultFaceFeaturesHandler, + wearableStorage); MakeVertsOutBufferDefragmentationSystem.InjectToWorld(ref builder, vertOutBuffer, skinningStrategy); @@ -150,7 +153,7 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, FinishAvatarMatricesCalculationSystem.InjectToWorld(ref builder, skinningStrategy); AvatarShapeVisibilitySystem.InjectToWorld(ref builder); - AvatarCleanUpSystem.InjectToWorld(ref builder, frameTimeCapBudget, vertOutBuffer, avatarMaterialPoolHandler, avatarPoolRegistry, computeShaderPool, wearableAssetsCache, mainPlayerAvatarBaseProxy); + AvatarCleanUpSystem.InjectToWorld(ref builder, frameTimeCapBudget, vertOutBuffer, avatarMaterialPoolHandler, avatarPoolRegistry, computeShaderPool, attachmentsAssetsCache, mainPlayerAvatarBaseProxy); TrackTransformMatrixSystem.InjectToWorld(ref builder); NametagPlacementSystem.InjectToWorld(ref builder, nametagViewPool, chatEntryConfiguration, nametagsData, chatBubbleConfiguration); diff --git a/Explorer/Assets/DCL/PluginSystem/Global/BackpackSubPlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/BackpackSubPlugin.cs index d082648543..8881698e2e 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/BackpackSubPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/BackpackSubPlugin.cs @@ -1,5 +1,4 @@ using Arch.Core; -using Arch.SystemGroups; using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; using DCL.AssetsProvision; @@ -31,11 +30,11 @@ namespace DCL.PluginSystem.Global internal class BackpackSubPlugin : IDisposable { private readonly IAssetsProvisioner assetsProvisioner; - private readonly IWearableCache wearableCache; + private readonly IWearableStorage wearableStorage; private readonly ISelfProfile selfProfile; private readonly IEquippedWearables equippedWearables; private readonly IEquippedEmotes equippedEmotes; - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; private readonly IReadOnlyCollection<URN> embeddedEmotes; private readonly ICollection<string> forceRender; private readonly IRealmData realmData; @@ -63,11 +62,11 @@ public BackpackSubPlugin( IAssetsProvisioner assetsProvisioner, IWeb3IdentityCache web3Identity, ICharacterPreviewFactory characterPreviewFactory, - IWearableCache wearableCache, + IWearableStorage wearableStorage, ISelfProfile selfProfile, IEquippedWearables equippedWearables, IEquippedEmotes equippedEmotes, - IEmoteCache emoteCache, + IEmoteStorage emoteStorage, IReadOnlyCollection<URN> embeddedEmotes, ICollection<string> forceRender, IRealmData realmData, @@ -86,11 +85,11 @@ public BackpackSubPlugin( this.assetsProvisioner = assetsProvisioner; this.web3Identity = web3Identity; this.characterPreviewFactory = characterPreviewFactory; - this.wearableCache = wearableCache; + this.wearableStorage = wearableStorage; this.selfProfile = selfProfile; this.equippedWearables = equippedWearables; this.equippedEmotes = equippedEmotes; - this.emoteCache = emoteCache; + this.emoteStorage = emoteStorage; this.embeddedEmotes = embeddedEmotes; this.forceRender = forceRender; this.realmData = realmData; @@ -117,7 +116,7 @@ internal async UniTask InitializeAsync( // Initialize assets that do not require World var sortController = new BackpackSortController(view.BackpackSortView); - busController = new BackpackBusController(wearableCache, backpackEventBus, backpackCommandBus, equippedWearables, equippedEmotes, emoteCache); + busController = new BackpackBusController(wearableStorage, backpackEventBus, backpackCommandBus, equippedWearables, equippedEmotes, emoteStorage); (NFTColorsSO rarityColorMappings, NftTypeIconSO categoryIconsMapping, NftTypeIconSO rarityBackgroundsMapping, NftTypeIconSO rarityInfoPanelBackgroundsMapping) = await UniTask.WhenAll( assetsProvisioner.ProvideMainAssetValueAsync(backpackSettings.RarityColorMappings, ct), @@ -160,7 +159,7 @@ internal async UniTask InitializeAsync( ); //not injected anywhere - var _ = new BackpackEmoteBreadCrumbController(emoteView.BreadCrumb, backpackEventBus); + _ = new BackpackEmoteBreadCrumbController(emoteView.BreadCrumb, backpackEventBus); ObjectPool<BackpackEmoteGridItemView>? emoteGridPool = await BackpackEmoteGridController.InitializeAssetsAsync(assetsProvisioner, emoteView.GridView, ct); diff --git a/Explorer/Assets/DCL/PluginSystem/Global/CharacterCameraPlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/CharacterCameraPlugin.cs index 9092caebf5..b21f8edf59 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/CharacterCameraPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/CharacterCameraPlugin.cs @@ -101,7 +101,7 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, // Register systems ControlCinemachineVirtualCameraSystem.InjectToWorld(ref builder, cinemachineCameraAudioSettings.Value); ApplyCinemachineCameraInputSystem.InjectToWorld(ref builder, input, commandLineArgs.HasDebugFlag()); - PrepareExposedCameraDataSystem.InjectToWorld(ref builder); + PrepareExposedCameraDataSystem.InjectToWorld(ref builder, cinemachinePreset.Brain); ChinemachineFieldOfViewSystem.InjectToWorld(ref builder); ApplyCinemachineSettingsSystem.InjectToWorld(ref builder, debugBuilder); } diff --git a/Explorer/Assets/DCL/PluginSystem/Global/ChatPlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/ChatPlugin.cs index 61f3b64901..64f7d3bc3d 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/ChatPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/ChatPlugin.cs @@ -2,7 +2,6 @@ using Arch.SystemGroups; using Cysharp.Threading.Tasks; using DCL.AssetsProvision; -using DCL.Audio; using DCL.Chat; using DCL.Chat.History; using DCL.Chat.MessageBus; diff --git a/Explorer/Assets/DCL/PluginSystem/Global/EmotePlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/EmotePlugin.cs index ecf88492a5..d1af55e15c 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/EmotePlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/EmotePlugin.cs @@ -4,6 +4,7 @@ using Cysharp.Threading.Tasks; using DCL.AssetsProvision; using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables; using DCL.Backpack; using DCL.DebugUtilities; @@ -25,14 +26,18 @@ using System.Threading; using UnityEngine; using UnityEngine.AddressableAssets; -using CharacterEmoteSystem = DCL.AvatarRendering.Emotes.CharacterEmoteSystem; +using CharacterEmoteSystem = DCL.AvatarRendering.Emotes.Play.CharacterEmoteSystem; +using LoadAudioClipGlobalSystem = DCL.AvatarRendering.Emotes.Load.LoadAudioClipGlobalSystem; +using LoadEmotesByPointersSystem = DCL.AvatarRendering.Emotes.Load.LoadEmotesByPointersSystem; +using LoadOwnedEmotesSystem = DCL.AvatarRendering.Emotes.Load.LoadOwnedEmotesSystem; +using LoadSceneEmotesSystem = DCL.AvatarRendering.Emotes.Load.LoadSceneEmotesSystem; namespace DCL.PluginSystem.Global { public class EmotePlugin : IDCLGlobalPlugin<EmotePlugin.EmoteSettings> { private readonly IWebRequestController webRequestController; - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; private readonly IRealmData realmData; private readonly IEmotesMessageBus messageBus; private readonly IDebugContainerBuilder debugBuilder; @@ -53,7 +58,7 @@ public class EmotePlugin : IDCLGlobalPlugin<EmotePlugin.EmoteSettings> private EmotesWheelController? emotesWheelController; public EmotePlugin(IWebRequestController webRequestController, - IEmoteCache emoteCache, + IEmoteStorage emoteStorage, IRealmData realmData, IEmotesMessageBus messageBus, IDebugContainerBuilder debugBuilder, @@ -81,7 +86,7 @@ public EmotePlugin(IWebRequestController webRequestController, this.entityParticipantTable = entityParticipantTable; this.assetBundleURL = assetBundleURL; this.webRequestController = webRequestController; - this.emoteCache = emoteCache; + this.emoteStorage = emoteStorage; this.realmData = realmData; this.mainUIView = mainUIView; this.cursor = cursor; @@ -102,37 +107,35 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, { var customStreamingSubdirectory = URLSubdirectory.FromString("/Emotes/"); - FinalizeEmoteAssetBundleSystem.InjectToWorld(ref builder); + FinalizeEmoteLoadingSystem.InjectToWorld(ref builder, emoteStorage); LoadEmotesByPointersSystem.InjectToWorld(ref builder, webRequestController, - new NoCache<EmotesDTOList, GetEmotesByPointersFromRealmIntention>(false, false), - emoteCache, realmData, - customStreamingSubdirectory); + new NoCache<EmotesDTOList, GetEmotesByPointersFromRealmIntention>(false, false)); LoadOwnedEmotesSystem.InjectToWorld(ref builder, realmData, webRequestController, new NoCache<EmotesResolution, GetOwnedEmotesFromRealmIntention>(false, false), - emoteCache); + emoteStorage); - CharacterEmoteSystem.InjectToWorld(ref builder, emoteCache, messageBus, audioSourceReference, debugBuilder); + CharacterEmoteSystem.InjectToWorld(ref builder, emoteStorage, messageBus, audioSourceReference, debugBuilder); LoadAudioClipGlobalSystem.InjectToWorld(ref builder, audioClipsCache, webRequestController); RemoteEmotesSystem.InjectToWorld(ref builder, web3IdentityCache, entityParticipantTable, messageBus, arguments.PlayerEntity); - LoadSceneEmotesSystem.InjectToWorld(ref builder, emoteCache, customStreamingSubdirectory); + LoadSceneEmotesSystem.InjectToWorld(ref builder, emoteStorage, realmData, customStreamingSubdirectory); } public async UniTask InitializeAsync(EmoteSettings settings, CancellationToken ct) { EmbeddedEmotesData embeddedEmotesData = (await assetsProvisioner.ProvideMainAssetAsync(settings.EmbeddedEmotes, ct)).Value; - // TODO: convert into an async operation so we dont increment the loading times at app's startup + // TODO: convert into an async operation so we don't increment the loading times at app's startup IEnumerable<IEmote> embeddedEmotes = embeddedEmotesData.GenerateEmotes(); audioSourceReference = (await assetsProvisioner.ProvideMainAssetAsync(settings.EmoteAudioSource, ct)).Value.GetComponent<AudioSource>(); foreach (IEmote embeddedEmote in embeddedEmotes) - emoteCache.Set(embeddedEmote.GetUrn(), embeddedEmote); + emoteStorage.Set(embeddedEmote.GetUrn(), embeddedEmote); var persistentEmoteWheelOpenerController = new PersistentEmoteWheelOpenerController(() => mainUIView.SidebarView.PersistentEmoteWheelOpener, mvcManager); @@ -146,7 +149,7 @@ public async UniTask InitializeAsync(EmoteSettings settings, CancellationToken c IThumbnailProvider thumbnailProvider = new ECSThumbnailProvider(realmData, world, assetBundleURL, webRequestController); emotesWheelController = new EmotesWheelController(EmotesWheelController.CreateLazily(emotesWheelPrefab, null), - selfProfile, emoteCache, emoteWheelRarityBackgrounds, world, playerEntity, thumbnailProvider, + selfProfile, emoteStorage, emoteWheelRarityBackgrounds, world, playerEntity, thumbnailProvider, inputBlock, dclInput, mvcManager, cursor); mvcManager.RegisterController(emotesWheelController); diff --git a/Explorer/Assets/DCL/PluginSystem/Global/ExplorePanelPlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/ExplorePanelPlugin.cs index 1804709d5f..67a7937bd6 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/ExplorePanelPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/ExplorePanelPlugin.cs @@ -59,11 +59,11 @@ public class ExplorePanelPlugin : IDCLGlobalPlugin<ExplorePanelPlugin.ExplorePan private readonly IEquippedEmotes equippedEmotes; private readonly IWeb3Authenticator web3Authenticator; private readonly IWeb3IdentityCache web3IdentityCache; - private readonly IWearableCache wearableCache; + private readonly IWearableStorage wearableStorage; private readonly ICharacterPreviewFactory characterPreviewFactory; private readonly IWebBrowser webBrowser; private readonly IRealmNavigator realmNavigator; - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; private readonly DCLInput dclInput; private readonly IWebRequestController webRequestController; private readonly CharacterPreviewEventBus characterPreviewEventBus; @@ -95,7 +95,7 @@ public ExplorePanelPlugin(IAssetsProvisioner assetsProvisioner, IPlacesAPIService placesAPIService, IWebRequestController webRequestController, IWeb3IdentityCache web3IdentityCache, - IWearableCache wearableCache, + IWearableStorage wearableStorage, ICharacterPreviewFactory characterPreviewFactory, IProfileRepository profileRepository, IWeb3Authenticator web3Authenticator, @@ -104,7 +104,7 @@ public ExplorePanelPlugin(IAssetsProvisioner assetsProvisioner, IEquippedWearables equippedWearables, IEquippedEmotes equippedEmotes, IWebBrowser webBrowser, - IEmoteCache emoteCache, + IEmoteStorage emoteStorage, IRealmNavigator realmNavigator, ICollection<string> forceRender, DCLInput dclInput, @@ -130,7 +130,7 @@ public ExplorePanelPlugin(IAssetsProvisioner assetsProvisioner, this.placesAPIService = placesAPIService; this.webRequestController = webRequestController; this.web3IdentityCache = web3IdentityCache; - this.wearableCache = wearableCache; + this.wearableStorage = wearableStorage; this.characterPreviewFactory = characterPreviewFactory; this.profileRepository = profileRepository; this.web3Authenticator = web3Authenticator; @@ -145,7 +145,7 @@ public ExplorePanelPlugin(IAssetsProvisioner assetsProvisioner, this.profileCache = profileCache; this.assetBundleURL = assetBundleURL; this.notificationsBusController = notificationsBusController; - this.emoteCache = emoteCache; + this.emoteStorage = emoteStorage; this.dclInput = dclInput; this.characterPreviewEventBus = characterPreviewEventBus; this.mapPathEventBus = mapPathEventBus; @@ -176,11 +176,11 @@ public async UniTask InitializeAsync(ExplorePanelSettings settings, Cancellation assetsProvisioner, web3IdentityCache, characterPreviewFactory, - wearableCache, + wearableStorage, selfProfile, equippedWearables, equippedEmotes, - emoteCache, + emoteStorage, settings.EmbeddedEmotesAsURN(), forceRender, realmData, @@ -216,7 +216,7 @@ public async UniTask InitializeAsync(ExplorePanelSettings settings, Cancellation mvcManager.RegisterController(new ExplorePanelController(viewFactoryMethod, navmapController, settingsController, backpackSubPlugin.backpackController!, new ProfileWidgetController(() => explorePanelView.ProfileWidget, web3IdentityCache, profileRepository, webRequestController), - new ProfileMenuController(() => explorePanelView.ProfileMenuView, explorePanelView.ProfileMenuView.ProfileMenu, web3IdentityCache, profileRepository, webRequestController, world, playerEntity, webBrowser, web3Authenticator, userInAppInitializationFlow, profileCache, mvcManager, chatEntryConfiguration), + new ProfileMenuController(() => explorePanelView.ProfileMenuView, web3IdentityCache, profileRepository, webRequestController, world, playerEntity, webBrowser, web3Authenticator, userInAppInitializationFlow, profileCache, mvcManager, chatEntryConfiguration), dclInput, notificationsBusController, mvcManager, inputBlock)); inputHandler = new ExplorePanelInputHandler(dclInput, mvcManager); diff --git a/Explorer/Assets/DCL/PluginSystem/Global/InputPlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/InputPlugin.cs index 2a23340520..dbce7b3263 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/InputPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/InputPlugin.cs @@ -2,6 +2,7 @@ using Cysharp.Threading.Tasks; using DCL.AssetsProvision; using DCL.AvatarRendering.Emotes; +using DCL.CharacterCamera; using DCL.CharacterCamera.Systems; using DCL.CharacterMotion.Systems; using DCL.DebugUtilities; @@ -42,6 +43,7 @@ public class InputPlugin : IDCLGlobalPlugin<InputSettings> private readonly IDebugContainerBuilder debugContainerBuilder; private readonly UIDocument rootUIDocument; private readonly UIDocument cursorUIDocument; + private readonly IExposedCameraData cameraData; private CrosshairCanvas crosshairCanvas = null!; public InputPlugin( @@ -54,7 +56,8 @@ public InputPlugin( IMVCManager mvcManager, IDebugContainerBuilder debugContainerBuilder, UIDocument rootUIDocument, - UIDocument cursorUIDocument) + UIDocument cursorUIDocument, + IExposedCameraData cameraData) { this.dclInput = dclInput; this.cursor = cursor; @@ -66,6 +69,7 @@ public InputPlugin( this.debugContainerBuilder = debugContainerBuilder; this.rootUIDocument = rootUIDocument; this.cursorUIDocument = cursorUIDocument; + this.cameraData = cameraData; dclInput.Enable(); } @@ -88,7 +92,7 @@ public async UniTask InitializeAsync(InputSettings settings, CancellationToken c public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, in GlobalPluginArguments arguments) { - builder.World.Create(new InputMapComponent(InputMapComponent.Kind.None)); + builder.World.Create(new InputMapComponent(InputMapComponent.Kind.NONE)); ApplyInputMapsSystem.InjectToWorld(ref builder, dclInput); UpdateInputJumpSystem.InjectToWorld(ref builder, dclInput.Player.Jump); @@ -96,7 +100,7 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, UpdateCameraInputSystem.InjectToWorld(ref builder, dclInput); DropPlayerFromFreeCameraSystem.InjectToWorld(ref builder, dclInput.FreeCamera.DropPlayer); UpdateEmoteInputSystem.InjectToWorld(ref builder, dclInput, messageBus, mvcManager); - UpdateCursorInputSystem.InjectToWorld(ref builder, dclInput, eventSystem, cursor, crosshairCanvas); + UpdateCursorInputSystem.InjectToWorld(ref builder, dclInput, eventSystem, cursor, crosshairCanvas, cameraData); UpdateShowHideUIInputSystem.InjectToWorld(ref builder, dclInput, mvcManager, debugContainerBuilder, rootUIDocument, cursorUIDocument); } diff --git a/Explorer/Assets/DCL/PluginSystem/Global/MultiplayerPlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/MultiplayerPlugin.cs index bff0ede095..e684d30565 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/MultiplayerPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/MultiplayerPlugin.cs @@ -40,7 +40,7 @@ public class MultiplayerPlugin : IDCLGlobalPlugin<MultiplayerPlugin.Settings> private readonly IArchipelagoIslandRoom archipelagoIslandRoom; private readonly ICharacterObject characterObject; private readonly IDebugContainerBuilder debugContainerBuilder; - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; private readonly IEntityParticipantTable entityParticipantTable; private readonly IGateKeeperSceneRoom gateKeeperSceneRoom; private readonly IMessagePipesHub messagePipesHub; @@ -72,7 +72,7 @@ public MultiplayerPlugin( IRealmData realmData, IRemoteEntities remoteEntities, IScenesCache scenesCache, - IEmoteCache emoteCache, + IEmoteStorage emoteStorage, ICharacterDataPropagationUtility characterDataPropagationUtility) { this.assetsProvisioner = assetsProvisioner; @@ -91,7 +91,7 @@ public MultiplayerPlugin( this.remoteEntities = remoteEntities; this.realmData = realmData; this.scenesCache = scenesCache; - this.emoteCache = emoteCache; + this.emoteStorage = emoteStorage; this.characterDataPropagationUtility = characterDataPropagationUtility; } @@ -129,7 +129,7 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, PlayerCRDTEntitiesHandlerSystem.InjectToWorld(ref builder, scenesCache); PlayerProfileDataPropagationSystem.InjectToWorld(ref builder, characterDataPropagationUtility, globalPluginArguments.PlayerEntity); ResetDirtyFlagSystem<AvatarEmoteCommandComponent>.InjectToWorld(ref builder); - AvatarEmoteCommandPropagationSystem.InjectToWorld(ref builder, emoteCache); + AvatarEmoteCommandPropagationSystem.InjectToWorld(ref builder, emoteStorage); #endif } diff --git a/Explorer/Assets/DCL/PluginSystem/Global/PassportPlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/PassportPlugin.cs index 2e48c7f5f0..e134c5394d 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/PassportPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/PassportPlugin.cs @@ -5,11 +5,13 @@ using DCL.AssetsProvision; using DCL.AvatarRendering.Wearables; using DCL.Backpack; +using DCL.BadgesAPIService; using DCL.Browser; using DCL.CharacterPreview; using DCL.Chat; using DCL.Input; using DCL.Multiplayer.Connections.DecentralandUrls; +using DCL.NotificationsBusController.NotificationsBus; using DCL.Passport; using DCL.Profiles; using DCL.Profiles.Self; @@ -37,7 +39,9 @@ public class PassportPlugin : IDCLGlobalPlugin<PassportPlugin.PassportSettings> private readonly ISelfProfile selfProfile; private readonly IWebBrowser webBrowser; private readonly IDecentralandUrlsSource decentralandUrlsSource; + private readonly BadgesAPIClient badgesAPIClient; private readonly IInputBlock inputBlock; + private readonly INotificationsBusController notificationsBusController; private readonly Arch.Core.World world; private readonly Entity playerEntity; @@ -57,6 +61,8 @@ public PassportPlugin( ISelfProfile selfProfile, IWebBrowser webBrowser, IDecentralandUrlsSource decentralandUrlsSource, + BadgesAPIClient badgesAPIClient, + INotificationsBusController notificationsBusController, IInputBlock inputBlock, Arch.Core.World world, Entity playerEntity @@ -75,7 +81,9 @@ Entity playerEntity this.selfProfile = selfProfile; this.webBrowser = webBrowser; this.decentralandUrlsSource = decentralandUrlsSource; + this.badgesAPIClient = badgesAPIClient; this.inputBlock = inputBlock; + this.notificationsBusController = notificationsBusController; this.world = world; this.playerEntity = playerEntity; } @@ -116,7 +124,10 @@ public async UniTask InitializeAsync(PassportSettings passportSettings, Cancella thumbnailProvider, webBrowser, decentralandUrlsSource, - inputBlock + badgesAPIClient, + webRequestController, + inputBlock, + notificationsBusController ); mvcManager.RegisterController(passportController); diff --git a/Explorer/Assets/DCL/PluginSystem/Global/SidebarPlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/SidebarPlugin.cs index 1375d586b3..2d2f9a1b2f 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/SidebarPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/SidebarPlugin.cs @@ -98,11 +98,12 @@ public async UniTask InitializeAsync(SidebarSettings settings, CancellationToken notificationsBusController, new NotificationsMenuController(mainUIView.SidebarView.NotificationsMenuView, notificationsRequestController, notificationsBusController, notificationIconTypes, webRequestController, sidebarBus, rarityBackgroundMapping), new ProfileWidgetController(() => mainUIView.SidebarView.ProfileWidget, web3IdentityCache, profileRepository, webRequestController), - new ProfileMenuController(() => mainUIView.SidebarView.ProfileMenuView, mainUIView.SidebarView.ProfileMenuView.ProfileMenu, web3IdentityCache, profileRepository, webRequestController, world, playerEntity, webBrowser, web3Authenticator, userInAppInitializationFlow, profileCache, mvcManager, chatEntryConfigurationSo), + new ProfileMenuController(() => mainUIView.SidebarView.ProfileMenuView, web3IdentityCache, profileRepository, webRequestController, world, playerEntity, webBrowser, web3Authenticator, userInAppInitializationFlow, profileCache, mvcManager, chatEntryConfigurationSo), sidebarBus, chatEntryConfigurationSo, web3IdentityCache, - profileRepository + profileRepository, + webBrowser )); } diff --git a/Explorer/Assets/DCL/PluginSystem/Global/WearablePlugin.cs b/Explorer/Assets/DCL/PluginSystem/Global/WearablePlugin.cs index a3200a782a..a7ddb72380 100644 --- a/Explorer/Assets/DCL/PluginSystem/Global/WearablePlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/Global/WearablePlugin.cs @@ -3,10 +3,13 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; using DCL.AssetsProvision; +using DCL.AvatarRendering.Loading.Components; +using DCL.AvatarRendering.Thumbnails.Systems; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Components.Intentions; using DCL.AvatarRendering.Wearables.Helpers; using DCL.AvatarRendering.Wearables.Systems; +using DCL.AvatarRendering.Wearables.Systems.Load; using DCL.PluginSystem; using DCL.PluginSystem.Global; using DCL.ResourcesUnloading; @@ -16,7 +19,6 @@ using Newtonsoft.Json; using SceneRunner.Scene; using System; -using System.Collections.Generic; using System.Threading; using UnityEngine; using UnityEngine.AddressableAssets; @@ -34,20 +36,20 @@ public class WearablePlugin : IDCLGlobalPlugin<WearablePlugin.WearableSettings> private readonly IWebRequestController webRequestController; private readonly IRealmData realmData; - private readonly IWearableCache wearableCache; + private readonly IWearableStorage wearableStorage; private WearablesDTOList defaultWearablesDTOs; private GameObject defaultEmptyWearableAsset; - public WearablePlugin(IAssetsProvisioner assetsProvisioner, IWebRequestController webRequestController, IRealmData realmData, URLDomain assetBundleURL, CacheCleaner cacheCleaner, IWearableCache wearableCache) + public WearablePlugin(IAssetsProvisioner assetsProvisioner, IWebRequestController webRequestController, IRealmData realmData, URLDomain assetBundleURL, CacheCleaner cacheCleaner, IWearableStorage wearableStorage) { - this.wearableCache = wearableCache; + this.wearableStorage = wearableStorage; this.assetsProvisioner = assetsProvisioner; this.webRequestController = webRequestController; this.realmData = realmData; this.assetBundleURL = assetBundleURL; - cacheCleaner.Register(this.wearableCache); + cacheCleaner.Register(this.wearableStorage); } public void Dispose() { } @@ -55,10 +57,13 @@ public void Dispose() { } public async UniTask InitializeAsync(WearableSettings settings, CancellationToken ct) { ProvidedAsset<TextAsset> defaultWearableDefinition = await assetsProvisioner.ProvideMainAssetAsync(settings.defaultWearablesDefinition, ct: ct); - var partialTargetList = new List<WearableDTO>(64); + + var repoolableList = RepoolableList<WearableDTO>.NewList(); + var partialTargetList = repoolableList.List; + partialTargetList.Capacity = 64; JsonConvert.PopulateObject(defaultWearableDefinition.Value.text, partialTargetList); - defaultWearablesDTOs = new WearablesDTOList(partialTargetList); + defaultWearablesDTOs = new WearablesDTOList(repoolableList); var defaultEmptyWearable = await assetsProvisioner.ProvideMainAssetAsync(settings.defaultEmptyWearable, ct: ct); @@ -67,12 +72,12 @@ public async UniTask InitializeAsync(WearableSettings settings, CancellationToke public void InjectToWorld(ref ArchSystemsWorldBuilder<World> builder, in GlobalPluginArguments arguments) { - ResolveWearableByPointerSystem.InjectToWorld(ref builder, wearableCache, realmData, WEARABLES_EMBEDDED_SUBDIRECTORY); - LoadWearablesByParamSystem.InjectToWorld(ref builder, webRequestController, new NoCache<WearablesResponse, GetWearableByParamIntention>(false, false), realmData, EXPLORER_SUBDIRECTORY, WEARABLES_COMPLEMENT_URL, wearableCache); + FinalizeWearableLoadingSystem.InjectToWorld(ref builder, wearableStorage, realmData, WEARABLES_EMBEDDED_SUBDIRECTORY); + LoadWearablesByParamSystem.InjectToWorld(ref builder, webRequestController, new NoCache<WearablesResponse, GetWearableByParamIntention>(false, false), realmData, EXPLORER_SUBDIRECTORY, WEARABLES_COMPLEMENT_URL, wearableStorage); LoadWearablesDTOByPointersSystem.InjectToWorld(ref builder, webRequestController, new NoCache<WearablesDTOList, GetWearableDTOByPointersIntention>(false, false)); LoadWearableAssetBundleManifestSystem.InjectToWorld(ref builder, new NoCache<SceneAssetBundleManifest, GetWearableAssetBundleManifestIntention>(true, true), assetBundleURL, webRequestController); LoadDefaultWearablesSystem.InjectToWorld(ref builder, defaultWearablesDTOs, defaultEmptyWearableAsset, - wearableCache); + wearableStorage); ResolveAvatarAttachmentThumbnailSystem.InjectToWorld(ref builder); } diff --git a/Explorer/Assets/DCL/PluginSystem/World/AssetBundlesPlugin.cs b/Explorer/Assets/DCL/PluginSystem/World/AssetBundlesPlugin.cs index b2de1da0be..27eeadde87 100644 --- a/Explorer/Assets/DCL/PluginSystem/World/AssetBundlesPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/World/AssetBundlesPlugin.cs @@ -44,7 +44,6 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, { // Asset Bundles PrepareAssetBundleLoadingParametersSystem.InjectToWorld(ref builder, sharedDependencies.SceneData, STREAMING_ASSETS_URL); - ReportAssetBundleErrorSystem.InjectToWorld(ref builder, reportsHandlingSettings); // TODO create a runtime ref-counting cache LoadAssetBundleSystem.InjectToWorld(ref builder, assetBundleCache, assetBundleLoadingMutex); @@ -54,7 +53,6 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, { // Asset Bundles PrepareGlobalAssetBundleLoadingParametersSystem.InjectToWorld(ref builder, STREAMING_ASSETS_URL); - ReportGlobalAssetBundleErrorSystem.InjectToWorld(ref builder, reportsHandlingSettings); // TODO create a runtime ref-counting cache LoadGlobalAssetBundleSystem.InjectToWorld(ref builder, assetBundleCache, assetBundleLoadingMutex); diff --git a/Explorer/Assets/DCL/PluginSystem/World/AudioSourcesPlugin.cs b/Explorer/Assets/DCL/PluginSystem/World/AudioSourcesPlugin.cs index aa1f36daca..0906cc4817 100644 --- a/Explorer/Assets/DCL/PluginSystem/World/AudioSourcesPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/World/AudioSourcesPlugin.cs @@ -50,7 +50,7 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, { StartAudioSourceLoadingSystem.InjectToWorld(ref builder, sharedDependencies.SceneData, frameTimeBudgetProvider); LoadAudioClipSystem.InjectToWorld(ref builder, audioClipsCache, webRequestController); - sceneIsCurrentListeners.Add(UpdateAudioSourceSystem.InjectToWorld(ref builder, sharedDependencies.SceneData, audioClipsCache, componentPoolsRegistry, frameTimeBudgetProvider, memoryBudgetProvider, audioMixer)); + sceneIsCurrentListeners.Add(UpdateAudioSourceSystem.InjectToWorld(ref builder, sharedDependencies.SceneData, audioClipsCache, componentPoolsRegistry, frameTimeBudgetProvider, memoryBudgetProvider, audioMixer, sharedDependencies.SceneStateProvider)); finalizeWorldSystems.Add(CleanUpAudioSourceSystem.InjectToWorld(ref builder, audioClipsCache, componentPoolsRegistry)); } diff --git a/Explorer/Assets/DCL/PluginSystem/World/CharacterTriggerAreaPlugin.cs b/Explorer/Assets/DCL/PluginSystem/World/CharacterTriggerAreaPlugin.cs index d2e88aa968..24b8048833 100644 --- a/Explorer/Assets/DCL/PluginSystem/World/CharacterTriggerAreaPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/World/CharacterTriggerAreaPlugin.cs @@ -4,6 +4,7 @@ using DCL.AssetsProvision; using DCL.AvatarRendering.AvatarShape.UnityInterface; using DCL.Character; +using DCL.CharacterCamera; using DCL.CharacterTriggerArea.Systems; using DCL.ECSComponents; using DCL.Optimization.Pools; @@ -31,6 +32,7 @@ public class CharacterTriggerAreaPlugin : IDCLWorldPlugin<CharacterTriggerAreaSe private readonly ObjectProxy<AvatarBase> mainPlayerAvatarBaseProxy; private readonly ObjectProxy<Entity> cameraEntityProxy; private readonly ICharacterObject characterObject; + private readonly IExposedCameraData cameraData; private IComponentPool<CharacterTriggerArea.CharacterTriggerArea>? characterTriggerAreaPoolRegistry; @@ -41,7 +43,8 @@ public CharacterTriggerAreaPlugin( ICharacterObject characterObject, IComponentPoolsRegistry poolsRegistry, IAssetsProvisioner assetsProvisioner, - CacheCleaner cacheCleaner) + CacheCleaner cacheCleaner, + IExposedCameraData cameraData) { this.globalWorld = globalWorld; this.assetsProvisioner = assetsProvisioner; @@ -50,6 +53,7 @@ public CharacterTriggerAreaPlugin( this.mainPlayerAvatarBaseProxy = mainPlayerAvatarBaseProxy; this.cameraEntityProxy = cameraEntityProxy; this.characterObject = characterObject; + this.cameraData = cameraData; } public void Dispose() @@ -67,10 +71,9 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, ResetDirtyFlagSystem<PBCameraModeArea>.InjectToWorld(ref builder); CharacterTriggerAreaHandlerSystem.InjectToWorld(ref builder, characterTriggerAreaPoolRegistry!, mainPlayerAvatarBaseProxy, sharedDependencies.SceneStateProvider, characterObject); - CharacterTriggerAreaCleanUpRegisteredCollisionsSystem.InjectToWorld(ref builder); finalizeWorldSystems.Add(AvatarModifierAreaHandlerSystem.InjectToWorld(ref builder, globalWorld)); - finalizeWorldSystems.Add(CameraModeAreaHandlerSystem.InjectToWorld(ref builder, globalWorld, cameraEntityProxy)); + finalizeWorldSystems.Add(CameraModeAreaHandlerSystem.InjectToWorld(ref builder, globalWorld, cameraEntityProxy, cameraData)); finalizeWorldSystems.Add(CharacterTriggerAreaCleanupSystem.InjectToWorld(ref builder, characterTriggerAreaPoolRegistry!)); } diff --git a/Explorer/Assets/DCL/PluginSystem/World/GltfContainerPlugin.cs b/Explorer/Assets/DCL/PluginSystem/World/GltfContainerPlugin.cs index 73135ce4e7..1e3ef4a0d0 100644 --- a/Explorer/Assets/DCL/PluginSystem/World/GltfContainerPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/World/GltfContainerPlugin.cs @@ -13,8 +13,9 @@ using ECS.Unity.GLTFContainer.Systems; using ECS.Unity.Visibility.Systems; using System.Collections.Generic; -using DCL.Optimization.PerformanceBudgeting; using ECS.SceneLifeCycle; +using ECS.StreamableLoading.Cache; +using ECS.StreamableLoading.GLTF; namespace DCL.PluginSystem.World { @@ -28,14 +29,17 @@ static GltfContainerPlugin() private readonly GltfContainerAssetsCache assetsCache; private readonly ECSWorldSingletonSharedDependencies globalDeps; private readonly ISceneReadinessReportQueue sceneReadinessReportQueue; - private readonly SceneAssetLock sceneAssetLock; + private readonly bool localSceneDevelopment; + private readonly bool useRemoteAssetBundles; - public GltfContainerPlugin(ECSWorldSingletonSharedDependencies globalDeps, CacheCleaner cacheCleaner, ISceneReadinessReportQueue sceneReadinessReportQueue, SceneAssetLock sceneAssetLock) + public GltfContainerPlugin(ECSWorldSingletonSharedDependencies globalDeps, CacheCleaner cacheCleaner, ISceneReadinessReportQueue sceneReadinessReportQueue, SceneAssetLock sceneAssetLock, bool localSceneDevelopment, bool useRemoteAssetBundles) { this.globalDeps = globalDeps; this.sceneReadinessReportQueue = sceneReadinessReportQueue; this.sceneAssetLock = sceneAssetLock; + this.localSceneDevelopment = localSceneDevelopment; + this.useRemoteAssetBundles = useRemoteAssetBundles; assetsCache = new GltfContainerAssetsCache(); cacheCleaner.Register(assetsCache); @@ -51,10 +55,15 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, { var buffer = sharedDependencies.EntityEventsBuilder.Rent<GltfContainerComponent>(); + LoadGLTFSystem.InjectToWorld(ref builder, new NoCache<GLTFData, GetGLTFIntention>(false, false), sharedDependencies.SceneData, sharedDependencies.ScenePartition); + // Asset loading - PrepareGltfAssetLoadingSystem.InjectToWorld(ref builder, assetsCache); - CreateGltfAssetFromAssetBundleSystem.InjectToWorld(ref builder, globalDeps.FrameTimeBudget, globalDeps.MemoryBudget); - ReportGltfErrorsSystem.InjectToWorld(ref builder, globalDeps.ReportsHandlingSettings); + PrepareGltfAssetLoadingSystem.InjectToWorld(ref builder, assetsCache, localSceneDevelopment, useRemoteAssetBundles); + + if (localSceneDevelopment && !useRemoteAssetBundles) + CreateGltfAssetFromRawGltfSystem.InjectToWorld(ref builder, globalDeps.FrameTimeBudget, globalDeps.MemoryBudget); + else + CreateGltfAssetFromAssetBundleSystem.InjectToWorld(ref builder, globalDeps.FrameTimeBudget, globalDeps.MemoryBudget); // GLTF Container LoadGltfContainerSystem.InjectToWorld(ref builder, buffer, sharedDependencies.SceneData, sharedDependencies.EntityCollidersSceneCache); diff --git a/Explorer/Assets/DCL/PluginSystem/World/InputModifierPlugin.cs b/Explorer/Assets/DCL/PluginSystem/World/InputModifierPlugin.cs new file mode 100644 index 0000000000..7463a10b9b --- /dev/null +++ b/Explorer/Assets/DCL/PluginSystem/World/InputModifierPlugin.cs @@ -0,0 +1,40 @@ +using Arch.Core; +using Arch.SystemGroups; +using Cysharp.Threading.Tasks; +using DCL.ECSComponents; +using DCL.PluginSystem.World.Dependencies; +using DCL.SDKComponents.PlayerInputMovement.Systems; +using ECS.LifeCycle; +using ECS.LifeCycle.Systems; +using System.Collections.Generic; +using System.Threading; + +namespace DCL.PluginSystem.World +{ + public class InputModifierPlugin: IDCLWorldPlugin + { + private readonly Arch.Core.World world; + private readonly Entity playerEntity; + + public InputModifierPlugin(Arch.Core.World world, Entity playerEntity) + { + this.world = world; + this.playerEntity = playerEntity; + } + + public void Dispose() + { + // Ignore for now + } + + public UniTask Initialize(IPluginSettingsContainer container, CancellationToken ct) => UniTask.CompletedTask; + + public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, in ECSWorldInstanceSharedDependencies sharedDependencies, + in PersistentEntities persistentEntities, List<IFinalizeWorldSystem> finalizeWorldSystems, List<ISceneIsCurrentListener> sceneIsCurrentListeners) + { + ResetDirtyFlagSystem<PBInputModifier>.InjectToWorld(ref builder); + var system = InputModifierHandlerSystem.InjectToWorld(ref builder, world, playerEntity, sharedDependencies.SceneStateProvider); + sceneIsCurrentListeners.Add(system); + } + } +} diff --git a/Explorer/Assets/DCL/PluginSystem/World/InputModifierPlugin.cs.meta b/Explorer/Assets/DCL/PluginSystem/World/InputModifierPlugin.cs.meta new file mode 100644 index 0000000000..fa72b74629 --- /dev/null +++ b/Explorer/Assets/DCL/PluginSystem/World/InputModifierPlugin.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7083e8bb214847e48fe9811570b95168 +timeCreated: 1724184690 \ No newline at end of file diff --git a/Explorer/Assets/DCL/PluginSystem/World/MainCameraPlugin.cs b/Explorer/Assets/DCL/PluginSystem/World/MainCameraPlugin.cs new file mode 100644 index 0000000000..765e95b3c7 --- /dev/null +++ b/Explorer/Assets/DCL/PluginSystem/World/MainCameraPlugin.cs @@ -0,0 +1,93 @@ +using Arch.SystemGroups; +using Cinemachine; +using Cysharp.Threading.Tasks; +using DCL.AssetsProvision; +using DCL.CharacterCamera; +using DCL.ECSComponents; +using DCL.Optimization.Pools; +using DCL.PluginSystem.World.Dependencies; +using DCL.ResourcesUnloading; +using DCL.SDKComponents.CameraControl.MainCamera.Systems; +using DCL.Utilities; +using ECS.LifeCycle; +using ECS.LifeCycle.Systems; +using System; +using System.Collections.Generic; +using System.Threading; +using UnityEngine; +using UnityEngine.AddressableAssets; +using Object = UnityEngine.Object; + +namespace DCL.PluginSystem.World +{ + public class MainCameraPlugin : IDCLWorldPlugin<MainCameraPlugin.Settings> + { + [Serializable] + public class Settings : IDCLPluginSettings + { + [field: Header(nameof(MainCameraPlugin) + "." + nameof(Settings))] + [field: Space] + [field: SerializeField] + public AssetReferenceGameObject VirtualCameraPrefab; + } + + private readonly IComponentPoolsRegistry poolsRegistry; + private readonly IAssetsProvisioner assetsProvisioner; + private readonly CacheCleaner cacheCleaner; + private readonly IExposedCameraData cameraData; + private readonly Arch.Core.World globalWorld; + private IComponentPool<CinemachineFreeLook>? virtualCameraPoolRegistry; + + public MainCameraPlugin( + IComponentPoolsRegistry poolsRegistry, + IAssetsProvisioner assetsProvisioner, + CacheCleaner cacheCleaner, + IExposedCameraData cameraData, + Arch.Core.World globalWorld) + { + this.assetsProvisioner = assetsProvisioner; + this.poolsRegistry = poolsRegistry; + this.cacheCleaner = cacheCleaner; + this.cameraData = cameraData; + this.globalWorld = globalWorld; + } + + public async UniTask InitializeAsync(Settings settings, CancellationToken ct) + { + await CreateVirtualCameraPoolAsync(settings, ct); + } + + private async UniTask CreateVirtualCameraPoolAsync(Settings settings, CancellationToken ct) + { + CinemachineFreeLook virtualCameraPrefab = (await assetsProvisioner.ProvideMainAssetAsync(settings.VirtualCameraPrefab, ct: ct)).Value.GetComponent<CinemachineFreeLook>(); + virtualCameraPoolRegistry = poolsRegistry.AddGameObjectPool(() => Object.Instantiate(virtualCameraPrefab, Vector3.zero, Quaternion.identity), onRelease: OnPoolRelease, onGet: OnPoolGet); + cacheCleaner.Register(virtualCameraPoolRegistry); + } + + private static void OnPoolRelease(CinemachineFreeLook virtualCam) => + virtualCam.enabled = false; + + private static void OnPoolGet(CinemachineFreeLook virtualCam) => + virtualCam.enabled = false; + + public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, in ECSWorldInstanceSharedDependencies sharedDependencies, in PersistentEntities persistentEntities, List<IFinalizeWorldSystem> finalizeWorldSystems, List<ISceneIsCurrentListener> sceneIsCurrentListeners) + { + finalizeWorldSystems.Add(VirtualCameraSystem.InjectToWorld( + ref builder, + virtualCameraPoolRegistry, + sharedDependencies.SceneStateProvider)); + finalizeWorldSystems.Add(MainCameraSystem.InjectToWorld( + ref builder, + persistentEntities.Camera, + sharedDependencies.EntitiesMap, + sharedDependencies.SceneStateProvider, + cameraData, + globalWorld)); + } + + public void Dispose() + { + virtualCameraPoolRegistry?.Dispose(); + } + } +} diff --git a/Explorer/Assets/DCL/PluginSystem/World/MainCameraPlugin.cs.meta b/Explorer/Assets/DCL/PluginSystem/World/MainCameraPlugin.cs.meta new file mode 100644 index 0000000000..8137b542c3 --- /dev/null +++ b/Explorer/Assets/DCL/PluginSystem/World/MainCameraPlugin.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7d9f07c4d2e1493abc5023b39932d2a0 +timeCreated: 1723725021 \ No newline at end of file diff --git a/Explorer/Assets/DCL/PluginSystem/World/MapPinPlugin.cs b/Explorer/Assets/DCL/PluginSystem/World/MapPinPlugin.cs index 8ae169464e..3c94f0dbcf 100644 --- a/Explorer/Assets/DCL/PluginSystem/World/MapPinPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/World/MapPinPlugin.cs @@ -1,9 +1,9 @@ using Arch.SystemGroups; using Cysharp.Threading.Tasks; using DCL.ECSComponents; +using DCL.FeatureFlags; using DCL.PluginSystem.World.Dependencies; using DCL.SDKComponents.MapPins.Systems; -using DCL.Utilities; using ECS.LifeCycle; using ECS.LifeCycle.Systems; using System.Collections.Generic; @@ -14,10 +14,12 @@ namespace DCL.PluginSystem.World public class MapPinPlugin : IDCLWorldPluginWithoutSettings { private readonly Arch.Core.World globalWorld; + private readonly FeatureFlagsCache featureFlagsCache; - public MapPinPlugin(Arch.Core.World globalWorld) + public MapPinPlugin(Arch.Core.World globalWorld, FeatureFlagsCache featureFlagsCache) { this.globalWorld = globalWorld; + this.featureFlagsCache = featureFlagsCache; } public UniTask Initialize(IPluginSettingsContainer container, CancellationToken ct) => @@ -25,9 +27,13 @@ public UniTask Initialize(IPluginSettingsContainer container, CancellationToken public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, in ECSWorldInstanceSharedDependencies sharedDependencies, in PersistentEntities persistentEntities, List<IFinalizeWorldSystem> finalizeWorldSystems, List<ISceneIsCurrentListener> sceneIsCurrentListeners) { - ResetDirtyFlagSystem<PBMapPin>.InjectToWorld(ref builder); - - MapPinLoaderSystem.InjectToWorld(ref builder, sharedDependencies.SceneData, globalWorld, sharedDependencies.ScenePartition); + //If the Map Pins feature is enabled or if it's a global PX we allow the Map Pins systems to run in them. + if (featureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.MAP_PINS) || + sharedDependencies.SceneData.SceneEntityDefinition.metadata.isPortableExperience) + { + ResetDirtyFlagSystem<PBMapPin>.InjectToWorld(ref builder); + MapPinLoaderSystem.InjectToWorld(ref builder, sharedDependencies.SceneData, globalWorld, sharedDependencies.ScenePartition, featureFlagsCache); + } } } } diff --git a/Explorer/Assets/DCL/PluginSystem/World/TransformsPlugin.cs b/Explorer/Assets/DCL/PluginSystem/World/TransformsPlugin.cs index f9f96a44fe..9fb02ec050 100644 --- a/Explorer/Assets/DCL/PluginSystem/World/TransformsPlugin.cs +++ b/Explorer/Assets/DCL/PluginSystem/World/TransformsPlugin.cs @@ -46,7 +46,7 @@ public void InjectToWorld(ref ArchSystemsWorldBuilder<Arch.Core.World> builder, UpdateTransformSystem.InjectToWorld(ref builder, sharedDependencies.EcsGroupThrottler, sharedDependencies.EcsSystemsGate); InstantiateTransformSystem.InjectToWorld(ref builder, componentPoolsRegistry); - ParentingTransformSystem.InjectToWorld(ref builder, sharedDependencies.EntitiesMap, persistentEntities.SceneRoot, sharedDependencies.SceneData.SceneShortInfo); + ParentingTransformSystem.InjectToWorld(ref builder, sharedDependencies.EntitiesMap, persistentEntities.SceneRoot); AssertDisconnectedTransformsSystem.InjectToWorld(ref builder); SyncGlobalTransformSystem.InjectToWorld(ref builder, in persistentEntities.Camera, in persistentEntities.Player, exposedPlayerTransform, exposedCameraData); diff --git a/Explorer/Assets/DCL/PluginSystem/World/World Plugins Container.asset b/Explorer/Assets/DCL/PluginSystem/World/World Plugins Container.asset index d696a0c237..eee31a28c1 100644 --- a/Explorer/Assets/DCL/PluginSystem/World/World Plugins Container.asset +++ b/Explorer/Assets/DCL/PluginSystem/World/World Plugins Container.asset @@ -27,6 +27,7 @@ MonoBehaviour: - rid: 892605770607624196 - rid: 7615904969758605314 - rid: 634089542387236867 + - rid: 1970080267461197826 references: version: 2 RefIds: @@ -143,6 +144,14 @@ MonoBehaviour: <RaycastFrameBudgetMs>k__BackingField: 3 <PlayerOriginRaycastMaxDistance>k__BackingField: 200 <GlobalInputPropagationBucketThreshold>k__BackingField: 3 + - rid: 1970080267461197826 + type: {class: MainCameraPlugin/Settings, ns: DCL.PluginSystem.World, asm: DCL.Plugins} + data: + VirtualCameraPrefab: + m_AssetGUID: 4f24a591312ba473ab5ac65d6658cb94 + m_SubObjectName: + m_SubObjectType: + m_EditorAssetChanged: 0 - rid: 4753057106328551424 type: {class: SceneUIPlugin/Settings, ns: DCL.PluginSystem.World, asm: DCL.Plugins} data: diff --git a/Explorer/Assets/DCL/Profiles/Components/Profile.cs b/Explorer/Assets/DCL/Profiles/Components/Profile.cs index 9aea30bf22..f42bcefa78 100644 --- a/Explorer/Assets/DCL/Profiles/Components/Profile.cs +++ b/Explorer/Assets/DCL/Profiles/Components/Profile.cs @@ -1,4 +1,4 @@ -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.ECSComponents; using DCL.Optimization.ThreadSafePool; diff --git a/Explorer/Assets/DCL/Profiles/DCL.Profiles.asmdef b/Explorer/Assets/DCL/Profiles/DCL.Profiles.asmdef index 5e92c2c3c9..b1531f1740 100644 --- a/Explorer/Assets/DCL/Profiles/DCL.Profiles.asmdef +++ b/Explorer/Assets/DCL/Profiles/DCL.Profiles.asmdef @@ -11,7 +11,6 @@ "GUID:fa7b3fdbb04d67549916da7bd2af58ab", "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", "GUID:275e22790c04e9b47a5085d7b0c4432a", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:5eabe9a3d4dd19d42a16208ea5411062", "GUID:56e8195b069a4dca9c4c4f313c65f526", "GUID:b46779583a009f04ba9f5f31d0e7e6ac", @@ -21,7 +20,8 @@ "GUID:9e24947de15b9834991c9d8411ea37cf", "GUID:166b65e6dfc848bb9fb075f53c293a38", "GUID:3c7b57a14671040bd8c549056adc04f5", - "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b" + "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b", + "GUID:543b8f091a5947a3880b7f2bca2358bd" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Profiles/DataModels/Avatar.cs b/Explorer/Assets/DCL/Profiles/DataModels/Avatar.cs index bfca769ab6..2fc86fca16 100644 --- a/Explorer/Assets/DCL/Profiles/DataModels/Avatar.cs +++ b/Explorer/Assets/DCL/Profiles/DataModels/Avatar.cs @@ -1,5 +1,5 @@ using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.Utilities.Extensions; using System.Collections.Generic; using UnityEngine; diff --git a/Explorer/Assets/DCL/Profiles/DataModels/ProfileJsonDto.cs b/Explorer/Assets/DCL/Profiles/DataModels/ProfileJsonDto.cs index 0d87211512..fdc1f8c9d5 100644 --- a/Explorer/Assets/DCL/Profiles/DataModels/ProfileJsonDto.cs +++ b/Explorer/Assets/DCL/Profiles/DataModels/ProfileJsonDto.cs @@ -1,7 +1,7 @@ #nullable enable using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.Optimization.ThreadSafePool; using System; using System.Collections.Generic; diff --git a/Explorer/Assets/DCL/Profiles/ProfileBuilder.cs b/Explorer/Assets/DCL/Profiles/ProfileBuilder.cs index 849b546927..08e5966782 100644 --- a/Explorer/Assets/DCL/Profiles/ProfileBuilder.cs +++ b/Explorer/Assets/DCL/Profiles/ProfileBuilder.cs @@ -1,5 +1,5 @@ using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using System; using System.Collections.Generic; using System.Linq; diff --git a/Explorer/Assets/DCL/Profiles/Repository/IProfileRepository.cs b/Explorer/Assets/DCL/Profiles/Repository/IProfileRepository.cs index e5526e6b9d..89e2e14473 100644 --- a/Explorer/Assets/DCL/Profiles/Repository/IProfileRepository.cs +++ b/Explorer/Assets/DCL/Profiles/Repository/IProfileRepository.cs @@ -1,6 +1,6 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.Utilities.Extensions; using System; using System.Collections.Generic; diff --git a/Explorer/Assets/DCL/Profiles/Repository/RealmProfileRepository.cs b/Explorer/Assets/DCL/Profiles/Repository/RealmProfileRepository.cs index d440fbc30a..fddd7796b9 100644 --- a/Explorer/Assets/DCL/Profiles/Repository/RealmProfileRepository.cs +++ b/Explorer/Assets/DCL/Profiles/Repository/RealmProfileRepository.cs @@ -1,5 +1,6 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using DCL.Ipfs; using DCL.WebRequests; using ECS; @@ -97,7 +98,7 @@ private static IpfsProfileEntity NewPublishProfileEntity(Profile profile, GetPro try { URLAddress url = Url(id, version); - var response = webRequestController.GetAsync(new CommonArguments(url), ct, ignoreErrorCodes: IWebRequestController.IGNORE_NOT_FOUND); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> response = webRequestController.GetAsync(new CommonArguments(url), ct, ReportCategory.REALM, ignoreErrorCodes: IWebRequestController.IGNORE_NOT_FOUND); using GetProfileJsonRootDto? root = await response.CreateFromNewtonsoftJsonAsync<GetProfileJsonRootDto>( createCustomExceptionOnFailure: (exception, text) => new ProfileParseException(id, version, text, exception), diff --git a/Explorer/Assets/DCL/Profiles/SDKProfile.cs b/Explorer/Assets/DCL/Profiles/SDKProfile.cs index eb27c25450..4a9b56f5d1 100644 --- a/Explorer/Assets/DCL/Profiles/SDKProfile.cs +++ b/Explorer/Assets/DCL/Profiles/SDKProfile.cs @@ -1,5 +1,5 @@ using CommunicationData.URLHelpers; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.ECSComponents; using System.Collections.Generic; using UnityEngine; diff --git a/Explorer/Assets/DCL/Profiles/Self/Playground/SelfProfilePlayground.cs b/Explorer/Assets/DCL/Profiles/Self/Playground/SelfProfilePlayground.cs index 33fc1371a7..a23c7670d7 100644 --- a/Explorer/Assets/DCL/Profiles/Self/Playground/SelfProfilePlayground.cs +++ b/Explorer/Assets/DCL/Profiles/Self/Playground/SelfProfilePlayground.cs @@ -50,8 +50,8 @@ private async UniTaskVoid ExecuteAsync(CancellationToken ct) ), web3IdentityCache, new EquippedWearables(), - new WearableCache(), - new MemoryEmotesCache(), + new WearableStorage(), + new MemoryEmotesStorage(), new EquippedEmotes(), new List<string>(), null diff --git a/Explorer/Assets/DCL/Profiles/Self/SelfProfile.cs b/Explorer/Assets/DCL/Profiles/Self/SelfProfile.cs index 7c26350d99..ec3bee5130 100644 --- a/Explorer/Assets/DCL/Profiles/Self/SelfProfile.cs +++ b/Explorer/Assets/DCL/Profiles/Self/SelfProfile.cs @@ -2,7 +2,7 @@ using Cysharp.Threading.Tasks; using DCL.AvatarRendering.Emotes; using DCL.AvatarRendering.Emotes.Equipped; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Equipped; using DCL.AvatarRendering.Wearables.Helpers; @@ -21,9 +21,9 @@ public class SelfProfile : ISelfProfile private readonly IProfileRepository profileRepository; private readonly IWeb3IdentityCache web3IdentityCache; private readonly IEquippedWearables equippedWearables; - private readonly IWearableCache wearableCache; + private readonly IWearableStorage wearableStorage; private readonly IEquippedEmotes equippedEmotes; - private readonly IEmoteCache emoteCache; + private readonly IEmoteStorage emoteStorage; private readonly IReadOnlyList<string> forceRender; private readonly IReadOnlyList<URN>? forcedEmotes; private readonly ProfileBuilder profileBuilder = new (); @@ -32,8 +32,8 @@ public SelfProfile( IProfileRepository profileRepository, IWeb3IdentityCache web3IdentityCache, IEquippedWearables equippedWearables, - IWearableCache wearableCache, - IEmoteCache emoteCache, + IWearableStorage wearableStorage, + IEmoteStorage emoteStorage, IEquippedEmotes equippedEmotes, IReadOnlyList<string> forceRender, IReadOnlyList<URN>? forcedEmotes) @@ -41,8 +41,8 @@ public SelfProfile( this.profileRepository = profileRepository; this.web3IdentityCache = web3IdentityCache; this.equippedWearables = equippedWearables; - this.wearableCache = wearableCache; - this.emoteCache = emoteCache; + this.wearableStorage = wearableStorage; + this.emoteStorage = emoteStorage; this.equippedEmotes = equippedEmotes; this.forceRender = forceRender; this.forcedEmotes = forcedEmotes; @@ -133,7 +133,7 @@ private void ConvertEquippedWearablesIntoUniqueUrns(Profile? profile, ISet<URN> URN uniqueUrn = w.GetUrn(); - if (wearableCache.TryGetOwnedNftRegistry(uniqueUrn, out IReadOnlyDictionary<URN, NftBlockchainOperationEntry>? registry)) + if (wearableStorage.TryGetOwnedNftRegistry(uniqueUrn, out IReadOnlyDictionary<URN, NftBlockchainOperationEntry>? registry)) uniqueUrn = registry.First().Value.Urn; else { @@ -156,7 +156,7 @@ private void ConvertEquippedEmotesIntoUniqueUrns(Profile? profile, IList<URN> un URN uniqueUrn = w.GetUrn(); - if (emoteCache.TryGetOwnedNftRegistry(uniqueUrn, out IReadOnlyDictionary<URN, NftBlockchainOperationEntry>? registry)) + if (emoteStorage.TryGetOwnedNftRegistry(uniqueUrn, out IReadOnlyDictionary<URN, NftBlockchainOperationEntry>? registry)) uniqueUrn = registry.First().Value.Urn; else { diff --git a/Explorer/Assets/DCL/Profiles/Systems/LoadProfileSystem.cs b/Explorer/Assets/DCL/Profiles/Systems/LoadProfileSystem.cs index c744bdcd9a..7971a2326b 100644 --- a/Explorer/Assets/DCL/Profiles/Systems/LoadProfileSystem.cs +++ b/Explorer/Assets/DCL/Profiles/Systems/LoadProfileSystem.cs @@ -64,7 +64,7 @@ private void ResolveProfilePromise(in Entity entity, ref AssetPromise<Profile, G else World.Add(entity, result.Asset); } - else ReportHub.LogException(result.Exception, GetReportCategory()); + else ReportHub.LogException(result.Exception, GetReportData()); World.Remove<AssetPromise<Profile, GetProfileIntention>>(entity); } diff --git a/Explorer/Assets/DCL/Rendering/Highlight/Highlight.asmdef b/Explorer/Assets/DCL/Rendering/Highlight/Highlight.asmdef index c50317ca22..645d4de025 100644 --- a/Explorer/Assets/DCL/Rendering/Highlight/Highlight.asmdef +++ b/Explorer/Assets/DCL/Rendering/Highlight/Highlight.asmdef @@ -2,9 +2,9 @@ "name": "Highlight", "rootNamespace": "", "references": [ - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:15fc0a57446b3144c949da3e2b9737a9", - "GUID:df380645f10b7bc4b97d4f5eb6303d95" + "GUID:df380645f10b7bc4b97d4f5eb6303d95", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/ResourcesUnloading/CacheCleaner.cs b/Explorer/Assets/DCL/ResourcesUnloading/CacheCleaner.cs index 2e5d7eface..5184940ce5 100644 --- a/Explorer/Assets/DCL/ResourcesUnloading/CacheCleaner.cs +++ b/Explorer/Assets/DCL/ResourcesUnloading/CacheCleaner.cs @@ -1,5 +1,6 @@ using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Assets; using DCL.AvatarRendering.Wearables.Helpers; using DCL.LOD; using DCL.Optimization.PerformanceBudgeting; @@ -12,7 +13,6 @@ using ECS.StreamableLoading.NFTShapes; using ECS.StreamableLoading.Textures; using ECS.Unity.GLTFContainer.Asset.Cache; -using ECS.Unity.GLTFContainer.Asset.Components; using System.Collections.Generic; using UnityEngine; @@ -39,13 +39,13 @@ public class CacheCleaner : ICacheCleaner private IStreamableCache<AudioClip, GetAudioClipIntention> audioClipsCache; private IStreamableCache<Texture2D, GetNFTShapeIntention> nftShapeCache = new IStreamableCache<Texture2D, GetNFTShapeIntention>.Fake(); - private IWearableAssetsCache wearableAssetsCache; - private IWearableCache wearableCache; + private IAttachmentsAssetsCache wearableAssetsCache; + private IWearableStorage wearableStorage; private IProfileCache? profileCache; private IStreamableCache<Profile, GetProfileIntention>? profileIntentionCache; private IRoadAssetPool roadCache; - private IEmoteCache? emoteCache; + private IEmoteStorage? emoteCache; public CacheCleaner(IPerformanceBudget fpsCapBudget) { @@ -62,7 +62,7 @@ public void UnloadCache() texturesCache.Unload(fpsCapBudget, TEXTURE_UNLOAD_CHUNK); audioClipsCache.Unload(fpsCapBudget, AUDIO_CLIP_UNLOAD_CHUNK); wearableAssetsCache.Unload(fpsCapBudget, WEARABLES_UNLOAD_CHUNK); - wearableCache.Unload(fpsCapBudget); + wearableStorage.Unload(fpsCapBudget); emoteCache?.Unload(fpsCapBudget); gltfContainerAssetsCache.Unload(fpsCapBudget, GLTF_UNLOAD_CHUNK); assetBundleCache.Unload(fpsCapBudget, AB_UNLOAD_CHUNK); @@ -95,7 +95,7 @@ public void Register(IStreamableCache<AssetBundleData, GetAssetBundleIntention> public void Register(IGltfContainerAssetsCache gltfContainerAssetsCache) => this.gltfContainerAssetsCache = gltfContainerAssetsCache; - public void Register(IWearableAssetsCache wearableAssetsCache) => + public void Register(IAttachmentsAssetsCache wearableAssetsCache) => this.wearableAssetsCache = wearableAssetsCache; public void Register(IStreamableCache<Texture2D, GetTextureIntention> texturesCache) => @@ -107,8 +107,8 @@ public void Register(IStreamableCache<Texture2D, GetNFTShapeIntention> nftShapeC public void Register(IStreamableCache<AudioClip, GetAudioClipIntention> audioClipsCache) => this.audioClipsCache = audioClipsCache; - public void Register(IWearableCache cache) => - wearableCache = cache; + public void Register(IWearableStorage storage) => + wearableStorage = storage; public void Register<T>(IExtendedObjectPool<T> extendedObjectPool) where T: class => avatarPools.Add(extendedObjectPool); @@ -119,14 +119,14 @@ public void Register(IProfileCache profileCache) => public void Register(IStreamableCache<Profile, GetProfileIntention> profileIntentionCache) => this.profileIntentionCache = profileIntentionCache; - public void Register(IEmoteCache emoteCache) => - this.emoteCache = emoteCache; + public void Register(IEmoteStorage emoteStorage) => + this.emoteCache = emoteStorage; public void UpdateProfilingCounters() { #if UNITY_EDITOR || DEVELOPMENT_BUILD - ProfilingCounters.WearablesAssetsInCatalogAmount.Value = ((WearableCache)wearableCache).WearableAssetsInCatalog; - ProfilingCounters.WearablesAssetsInCacheAmount.Value = wearableAssetsCache.WearablesAssesCount; + ProfilingCounters.WearablesAssetsInCatalogAmount.Value = ((WearableStorage)wearableStorage).WearableAssetsInCatalog; + ProfilingCounters.WearablesAssetsInCacheAmount.Value = wearableAssetsCache.AssetsCount; #endif } } diff --git a/Explorer/Assets/DCL/ResourcesUnloading/DCL.CacheCleaner.asmdef b/Explorer/Assets/DCL/ResourcesUnloading/DCL.CacheCleaner.asmdef index a81b772024..cfe30affce 100644 --- a/Explorer/Assets/DCL/ResourcesUnloading/DCL.CacheCleaner.asmdef +++ b/Explorer/Assets/DCL/ResourcesUnloading/DCL.CacheCleaner.asmdef @@ -12,7 +12,8 @@ "GUID:e56a0d6a94c144c784012e63b6043100", "GUID:a29f69b42fb1815409464ac7b05381d0", "GUID:800d01f252aedc243b320345c737f37c", - "GUID:46c2e553ecab9ff4784aee64075136c9" + "GUID:46c2e553ecab9ff4784aee64075136c9", + "GUID:543b8f091a5947a3880b7f2bca2358bd" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/ResourcesUnloading/Tests/CacheCleanerIntegrationTests.cs b/Explorer/Assets/DCL/ResourcesUnloading/Tests/CacheCleanerIntegrationTests.cs index eee7861eaa..00d9dadb06 100644 --- a/Explorer/Assets/DCL/ResourcesUnloading/Tests/CacheCleanerIntegrationTests.cs +++ b/Explorer/Assets/DCL/ResourcesUnloading/Tests/CacheCleanerIntegrationTests.cs @@ -1,4 +1,5 @@ using CommunicationData.URLHelpers; +using DCL.AvatarRendering.Loading.Assets; using DCL.AvatarRendering.Wearables.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.Optimization.PerformanceBudgeting; @@ -27,8 +28,8 @@ public class CacheCleanerIntegrationTests private IReleasablePerformanceBudget releasablePerformanceBudget; // Caches - private WearableCache wearableCache; - private WearableAssetsCache wearableAssetsCache; + private WearableStorage wearableStorage; + private AttachmentsAssetsCache attachmentsAssetsCache; private TexturesCache texturesCache; private AudioClipsCache audioClipsCache; private GltfContainerAssetsCache gltfContainerAssetsCache; @@ -49,8 +50,8 @@ public void SetUp() audioClipsCache = new AudioClipsCache(); assetBundleCache = new AssetBundleCache(); gltfContainerAssetsCache = new GltfContainerAssetsCache(); - wearableAssetsCache = new WearableAssetsCache(100); - wearableCache = new WearableCache(); + attachmentsAssetsCache = new AttachmentsAssetsCache(100); + wearableStorage = new WearableStorage(); lodAssets = new LODCache(new GameObjectPool<LODGroup>(new GameObject().transform)); roadAssets = new RoadAssetsPool(new List<GameObject>()); @@ -60,8 +61,8 @@ public void SetUp() cacheCleaner.Register(audioClipsCache); cacheCleaner.Register(gltfContainerAssetsCache); cacheCleaner.Register(assetBundleCache); - cacheCleaner.Register(wearableAssetsCache); - cacheCleaner.Register(wearableCache); + cacheCleaner.Register(attachmentsAssetsCache); + cacheCleaner.Register(wearableStorage); cacheCleaner.Register(lodAssets); cacheCleaner.Register(roadAssets); } @@ -75,8 +76,8 @@ public void TearDown() audioClipsCache.Dispose(); assetBundleCache.Dispose(); gltfContainerAssetsCache.Dispose(); - wearableAssetsCache.Dispose(); - wearableCache.Unload(releasablePerformanceBudget); + attachmentsAssetsCache.Dispose(); + wearableStorage.Unload(releasablePerformanceBudget); lodAssets.Unload(releasablePerformanceBudget, 3); roadAssets.Unload(releasablePerformanceBudget, 3); } @@ -115,10 +116,10 @@ public void DisposingShouldProperlyDereferenceDependencyChain() var gltfAsset = GltfContainerAsset.Create(new GameObject(), assetBundleData); assetBundleData.AddReference(); - var wearableAsset = new WearableRegularAsset(new GameObject(), new List<WearableRegularAsset.RendererInfo>(5), assetBundleData); + var wearableAsset = new AttachmentRegularAsset(new GameObject(), new List<AttachmentRegularAsset.RendererInfo>(5), assetBundleData); assetBundleData.AddReference(); - var cachedWearable = new CachedWearable(wearableAsset, new GameObject()); + var cachedWearable = new CachedAttachment(wearableAsset, new GameObject()); wearableAsset.AddReference(); // Act @@ -145,8 +146,8 @@ public void ShouldCleanCachesWithRespectToReferencing() // Assert Assert.That(texturesCache.cache.Count, Is.EqualTo(0)); Assert.That(audioClipsCache.cache.Count, Is.EqualTo(0)); - Assert.That(wearableCache.WearableAssetsInCatalog, Is.EqualTo(0)); - Assert.That(wearableAssetsCache.cache.Count, Is.EqualTo(0)); + Assert.That(wearableStorage.WearableAssetsInCatalog, Is.EqualTo(0)); + Assert.That(attachmentsAssetsCache.cache.Count, Is.EqualTo(0)); Assert.That(gltfContainerAssetsCache.cache.Count, Is.EqualTo(0)); Assert.That(assetBundleCache.cache.Count, Is.EqualTo(0)); } @@ -169,14 +170,14 @@ private void FillCachesWithElements(string hashID) assetBundleData.AddReference(); gltfContainerAssetsCache.Dereference(hashID, gltfContainerAsset); // add to cache - var wearableAsset = new WearableRegularAsset(new GameObject(), new List<WearableRegularAsset.RendererInfo>(10), assetBundleData); + var wearableAsset = new AttachmentRegularAsset(new GameObject(), new List<AttachmentRegularAsset.RendererInfo>(10), assetBundleData); assetBundleData.AddReference(); - var wearable = new Wearable { WearableAssetResults = { [0] = new StreamableLoadingResult<WearableAssetBase>(wearableAsset) } }; - wearableCache.AddWearable(hashID, wearable, true); // add to cache + var wearable = new Wearable { WearableAssetResults = { [0] = new StreamableLoadingResult<AttachmentAssetBase>(wearableAsset) } }; + wearableStorage.AddWearable(hashID, wearable, true); // add to cache - var cachedWearable = new CachedWearable(wearableAsset, new GameObject()); + var cachedWearable = new CachedAttachment(wearableAsset, new GameObject()); wearableAsset.AddReference(); - wearableAssetsCache.Release(cachedWearable); // add to cache + attachmentsAssetsCache.Release(cachedWearable); // add to cache } } } diff --git a/Explorer/Assets/DCL/ResourcesUnloading/Tests/CacheCleanerUnitTests.cs b/Explorer/Assets/DCL/ResourcesUnloading/Tests/CacheCleanerUnitTests.cs index d3808d5a82..239a9c8d1f 100644 --- a/Explorer/Assets/DCL/ResourcesUnloading/Tests/CacheCleanerUnitTests.cs +++ b/Explorer/Assets/DCL/ResourcesUnloading/Tests/CacheCleanerUnitTests.cs @@ -1,4 +1,5 @@ -using DCL.AvatarRendering.Wearables.Helpers; +using DCL.AvatarRendering.Loading.Assets; +using DCL.AvatarRendering.Wearables.Helpers; using DCL.LOD; using DCL.Optimization.PerformanceBudgeting; using DCL.Optimization.Pools; @@ -21,8 +22,8 @@ public class CacheCleanerUnitTests // Mocks private IReleasablePerformanceBudget releasablePerformanceBudget; - private IWearableCache wearableCache; - private IWearableAssetsCache wearableAssetsCache; + private IWearableStorage wearableStorage; + private IAttachmentsAssetsCache attachmentsAssetsCache; private IStreamableCache<Texture2D, GetTextureIntention> texturesCache; private IStreamableCache<AudioClip, GetAudioClipIntention> audioClipsCache; private IGltfContainerAssetsCache gltfContainerAssetsCache; @@ -41,8 +42,8 @@ public void SetUp() materialPool = Substitute.For<IExtendedObjectPool<Material>>(); - wearableCache = Substitute.For<IWearableCache>(); - wearableAssetsCache = Substitute.For<IWearableAssetsCache>(); + wearableStorage = Substitute.For<IWearableStorage>(); + attachmentsAssetsCache = Substitute.For<IAttachmentsAssetsCache>(); texturesCache = Substitute.For<IStreamableCache<Texture2D, GetTextureIntention>>(); audioClipsCache = Substitute.For<IStreamableCache<AudioClip, GetAudioClipIntention>>(); @@ -55,12 +56,12 @@ public void SetUp() cacheCleaner = new CacheCleaner(releasablePerformanceBudget); - cacheCleaner.Register(wearableCache); + cacheCleaner.Register(wearableStorage); cacheCleaner.Register(texturesCache); cacheCleaner.Register(audioClipsCache); cacheCleaner.Register(gltfContainerAssetsCache); cacheCleaner.Register(assetBundleCache); - cacheCleaner.Register(wearableAssetsCache); + cacheCleaner.Register(attachmentsAssetsCache); cacheCleaner.Register(materialPool); cacheCleaner.Register(profileCache); cacheCleaner.Register(lodAssetsPool); @@ -80,8 +81,8 @@ public void ShouldUnloadOnlyWhenHasFrameBudget(bool hasBudget, int callsAmount) // Assert texturesCache.Received(callsAmount).Unload(releasablePerformanceBudget, Arg.Any<int>()); audioClipsCache.Received(callsAmount).Unload(releasablePerformanceBudget, Arg.Any<int>()); - wearableAssetsCache.Received(callsAmount).Unload(releasablePerformanceBudget, Arg.Any<int>()); - wearableCache.Received(callsAmount).Unload(Arg.Any<IReleasablePerformanceBudget>()); + attachmentsAssetsCache.Received(callsAmount).Unload(releasablePerformanceBudget, Arg.Any<int>()); + wearableStorage.Received(callsAmount).Unload(Arg.Any<IReleasablePerformanceBudget>()); gltfContainerAssetsCache.Received(callsAmount).Unload(releasablePerformanceBudget, Arg.Any<int>()); assetBundleCache.Received(callsAmount).Unload(releasablePerformanceBudget, Arg.Any<int>()); materialPool.Received(callsAmount).ClearThrottled(Arg.Any<int>()); diff --git a/Explorer/Assets/DCL/RewardPanel/Assets/RewardPanel.prefab b/Explorer/Assets/DCL/RewardPanel/Assets/RewardPanel.prefab index 42a69f5de5..d6ba0a7e34 100644 --- a/Explorer/Assets/DCL/RewardPanel/Assets/RewardPanel.prefab +++ b/Explorer/Assets/DCL/RewardPanel/Assets/RewardPanel.prefab @@ -147,8 +147,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 714, y: 280} - m_SizeDelta: {x: 527, y: 34} + m_AnchoredPosition: {x: 808, y: 280} + m_SizeDelta: {x: 326.9437, y: 34} m_Pivot: {x: 0, y: 0} --- !u!222 &3552640640322158881 CanvasRenderer: @@ -178,8 +178,8 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: As your reward is an NFT, it may take a few minutes to be processed. Once - the transaction finishes you will receive a notification. + m_text: Processing may take a few minutes, but you'll be notified as soon as it's + in your Backpack! m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} m_sharedMaterial: {fileID: 1701868249614554837, guid: 35aa85d68d15435418848a03a2db81ec, type: 2} @@ -357,11 +357,11 @@ RectTransform: m_Children: [] m_Father: {fileID: 8756292157159461293} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 742, y: -174} - m_SizeDelta: {x: 444.75, y: 51} - m_Pivot: {x: 0, y: 1} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -174} + m_SizeDelta: {x: 700, y: 51} + m_Pivot: {x: 0.5, y: 1} --- !u!222 &5248122219716062805 CanvasRenderer: m_ObjectHideFlags: 0 @@ -390,7 +390,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: You got a reward! + m_text: New Item Unlocked! m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} @@ -424,8 +424,8 @@ MonoBehaviour: m_fontSizeMin: 18 m_fontSizeMax: 72 m_fontStyle: 16 - m_HorizontalAlignment: 1 - m_VerticalAlignment: 256 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 m_textAlignment: 65535 m_characterSpacing: 0 m_wordSpacing: 0 @@ -495,7 +495,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 674, y: 285} + m_AnchoredPosition: {x: 768, y: 285} m_SizeDelta: {x: 24, y: 24} m_Pivot: {x: 0, y: 0} --- !u!222 &1996821811382314218 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-49,-51.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-49,-51.prefab index 2b8024cba5..7de484ea34 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-49,-51.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-49,-51.prefab @@ -10291,7 +10291,7 @@ GameObject: - component: {fileID: 3050132076008021636} m_Layer: 0 m_Name: -49,-51 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-51,-49.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-51,-49.prefab index 0c9a94d05a..11dcb8a96f 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-51,-49.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-51,-49.prefab @@ -8019,7 +8019,7 @@ GameObject: - component: {fileID: 4147738518612072844} m_Layer: 0 m_Name: -51,-49 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-70,-1.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-70,-1.prefab index 220fd3048d..c378702595 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-70,-1.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/-70,-1.prefab @@ -10023,7 +10023,7 @@ GameObject: - component: {fileID: 6627585916494459200} m_Layer: 0 m_Name: -70,-1 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/0,-69.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/0,-69.prefab index 48e1c9cacb..b16c6c0421 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/0,-69.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/0,-69.prefab @@ -4540,7 +4540,7 @@ GameObject: - component: {fileID: 2233336176444780422} m_Layer: 0 m_Name: 0,-69 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/0,12.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/0,12.prefab index ce3cb66962..9aac381aec 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/0,12.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/0,12.prefab @@ -8696,7 +8696,7 @@ GameObject: - component: {fileID: 5681165076325503088} m_Layer: 0 m_Name: 0,12 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/13,0.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/13,0.prefab index 7ffef216e4..8e31036d02 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/13,0.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/13,0.prefab @@ -2532,7 +2532,7 @@ GameObject: - component: {fileID: 8918454710814458933} m_Layer: 0 m_Name: 13,0 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/2,-51.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/2,-51.prefab index fc610898c6..2ba5ca993a 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/2,-51.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/2,-51.prefab @@ -3437,7 +3437,7 @@ GameObject: - component: {fileID: 6935055516716160377} m_Layer: 0 m_Name: 2,-51 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/2,50.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/2,50.prefab index 7e39f53456..e938162d42 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/2,50.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/2,50.prefab @@ -1818,7 +1818,7 @@ GameObject: - component: {fileID: 3811092461617926061} m_Layer: 0 m_Name: 2,50 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/50,-49.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/50,-49.prefab index 6acc384950..c3283673d5 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/50,-49.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/50,-49.prefab @@ -8367,7 +8367,7 @@ GameObject: - component: {fileID: 4583215572633511121} m_Layer: 0 m_Name: 50,-49 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/50,2.prefab b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/50,2.prefab index 4a970be5bd..e7818367b8 100644 --- a/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/50,2.prefab +++ b/Explorer/Assets/DCL/Roads/Data/RoadAssets/LongRoad/50,2.prefab @@ -2733,7 +2733,7 @@ GameObject: - component: {fileID: 3034092438606035892} m_Layer: 0 m_Name: 50,2 - m_TagString: Untagged + m_TagString: LongRoad m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Explorer/Assets/DCL/Roads/Pools/RoadAssetsPool.cs b/Explorer/Assets/DCL/Roads/Pools/RoadAssetsPool.cs index 4c27a8353a..8036434059 100644 --- a/Explorer/Assets/DCL/Roads/Pools/RoadAssetsPool.cs +++ b/Explorer/Assets/DCL/Roads/Pools/RoadAssetsPool.cs @@ -1,7 +1,6 @@ -using System; +using System; using System.Collections.Generic; using DCL.Optimization.PerformanceBudgeting; -using DCL.Optimization.Pools; using UnityEngine; using UnityEngine.Pool; using Utility; @@ -12,6 +11,27 @@ namespace DCL.LOD public class RoadAssetsPool : IRoadAssetPool, IDisposable { private const string DEFAULT_ROAD_KEY = "OpenRoad_0"; + + /// <summary> + /// The amount of instances of each type of road asset that will be created from the beginning in the pools. + /// </summary> + private const int DEFAULT_POOL_CAPACITY = 20; + + /// <summary> + /// The amount of instances that will be created from the beginning in the pools for "long roads". Long roads are very heavy assets, in terms of memory, whose pools should be pre-warmed with just a few instances, as less as possible. + /// </summary> + private const int DEFAULT_LONGROAD_POOL_CAPACITY = 1; + + /// <summary> + /// When a pool is filled and more instances are required, this is the minimum amount to add to the pool. + /// </summary> + private const int POOLS_MIN_NEW_INSTANCES = 1; + + /// <summary> + /// When a pool is filled and more instances are required, this is the maximum amount to add to the pool. + /// </summary> + private const int POOLS_MAX_NEW_INSTANCES = 20; + private readonly Transform roadAssetParent; private readonly Dictionary<string, IObjectPool<Transform>> roadAssetPoolDictionary; @@ -21,11 +41,28 @@ public RoadAssetsPool(IReadOnlyList<GameObject> roadPrefabs) roadAssetParent = new GameObject("ROAD_ASSET_POOL").transform; roadAssetPoolDictionary = new Dictionary<string, IObjectPool<Transform>>(); + foreach (GameObject gameObject in roadPrefabs) { + int poolCapacity = gameObject.CompareTag("LongRoad") ? DEFAULT_LONGROAD_POOL_CAPACITY : DEFAULT_POOL_CAPACITY; + IObjectPool<Transform> roadAssetPool = new ObjectPool<Transform>(() => Object.Instantiate(gameObject, roadAssetParent).transform, - t => t.gameObject.SetActive(true), t => t.gameObject.SetActive(false), actionOnDestroy: UnityObjectUtils.SafeDestroyGameObject); + t => t.gameObject.SetActive(true), t => t.gameObject.SetActive(false), actionOnDestroy: UnityObjectUtils.SafeDestroyGameObject, + defaultCapacity: poolCapacity); + + // Pool pre-warming + Transform[] precachedInstances = new Transform[poolCapacity]; + + for (int i = 0; i < poolCapacity; ++i) + { + precachedInstances[i] = roadAssetPool.Get(); + } + + for (int i = 0; i < poolCapacity; ++i) + { + roadAssetPool.Release(precachedInstances[i]); + } roadAssetPoolDictionary.Add(gameObject.name, roadAssetPool); } @@ -43,7 +80,32 @@ public bool Get(string key, out Transform roadAsset) { if (roadAssetPoolDictionary.TryGetValue(key, out IObjectPool<Transform> roadAssetPool)) { + if (roadAssetPool.CountInactive == 0) + { + int extraInstances = Mathf.Clamp((roadAssetPool as ObjectPool<Transform>).CountAll / 2, POOLS_MIN_NEW_INSTANCES, POOLS_MAX_NEW_INSTANCES); + Transform[] precachedInstances = new Transform[extraInstances]; + + for (int i = 0; i < extraInstances; ++i) + { + precachedInstances[i] = roadAssetPool.Get(); + } + + for (int i = 0; i < extraInstances; ++i) + { + roadAssetPool.Release(precachedInstances[i]); + } + } + + // Debug: Uncomment this to know the content of the pools + //string log = "RoadAssetPoolDictionary\nTAKING: " + key + "\n"; + //foreach (KeyValuePair<string,IObjectPool<Transform>> keyValuePair in roadAssetPoolDictionary) + //{ + // log += keyValuePair.Key + ": " + (keyValuePair.Value as ObjectPool<Transform>).CountAll + " (" + (keyValuePair.Value as ObjectPool<Transform>).CountActive + ")\n"; + //} + //Debug.Log(log); + roadAsset = roadAssetPool.Get(); + return true; } diff --git a/Explorer/Assets/DCL/Roads/Systems/RoadInstantiatorSystem.cs b/Explorer/Assets/DCL/Roads/Systems/RoadInstantiatorSystem.cs index 94505803f0..bc8cb29960 100644 --- a/Explorer/Assets/DCL/Roads/Systems/RoadInstantiatorSystem.cs +++ b/Explorer/Assets/DCL/Roads/Systems/RoadInstantiatorSystem.cs @@ -13,6 +13,7 @@ using ECS.LifeCycle.Components; using ECS.Prioritization.Components; using ECS.SceneLifeCycle; +using ECS.SceneLifeCycle.Components; using ECS.SceneLifeCycle.Reporting; using ECS.SceneLifeCycle.SceneDefinition; using UnityEngine; @@ -31,7 +32,8 @@ public partial class RoadInstantiatorSystem : BaseUnityLoopSystem private readonly ISceneReadinessReportQueue sceneReadinessReportQueue; private readonly IScenesCache scenesCache; - internal RoadInstantiatorSystem(World world, IPerformanceBudget frameCapBudget, IPerformanceBudget memoryBudget, IReadOnlyDictionary<Vector2Int, RoadDescription> roadDescriptions, IRoadAssetPool roadAssetPool, ISceneReadinessReportQueue sceneReadinessReportQueue, IScenesCache scenesCache) : base(world) + internal RoadInstantiatorSystem(World world, IPerformanceBudget frameCapBudget, IPerformanceBudget memoryBudget, IReadOnlyDictionary<Vector2Int, RoadDescription> roadDescriptions, IRoadAssetPool roadAssetPool, + ISceneReadinessReportQueue sceneReadinessReportQueue, IScenesCache scenesCache) : base(world) { this.frameCapBudget = frameCapBudget; this.memoryBudget = memoryBudget; @@ -47,20 +49,21 @@ protected override void Update(float t) } [Query] - [None(typeof(DeleteEntityIntention))] + [None(typeof(DeleteEntityIntention), typeof(PortableExperienceComponent))] private void InstantiateRoad(ref RoadInfo roadInfo, ref SceneDefinitionComponent sceneDefinitionComponent, ref PartitionComponent partitionComponent) { + // Helpful info: RoadInfos are added in ResolveSceneStateByIncreasingRadiusSystem.CreatePromisesFromOrderedData if (!roadInfo.IsDirty) return; if (partitionComponent.IsBehind) return; if (!(frameCapBudget.TrySpendBudget() && memoryBudget.TrySpendBudget())) return; - if (roadDescriptions.TryGetValue(sceneDefinitionComponent.Definition.metadata.scene.DecodedBase, out var roadDescription)) + if (roadDescriptions.TryGetValue(sceneDefinitionComponent.Definition.metadata.scene.DecodedBase, out RoadDescription roadDescription)) { - if (!roadAssetPool.Get(roadDescription.RoadModel, out var roadAsset)) + if (!roadAssetPool.Get(roadDescription.RoadModel, out Transform? roadAsset)) { - ReportHub.LogWarning(GetReportCategory(), + ReportHub.LogWarning(GetReportData(), $"Road with model for {roadDescription.RoadModel} at {sceneDefinitionComponent.Definition.metadata.scene.DecodedBase.ToString()} does not exist, loading default"); } @@ -74,16 +77,15 @@ private void InstantiateRoad(ref RoadInfo roadInfo, ref SceneDefinitionComponent } else { - ReportHub.LogWarning(GetReportCategory(), + ReportHub.LogWarning(GetReportData(), $"Road with coords for {sceneDefinitionComponent.Definition.metadata.scene.DecodedBase} do not have a description"); } + roadInfo.IsDirty = false; - + //In case this is a road teleport destination, we need to release the loading screen LODUtils.ReportSDK6SceneLoaded(sceneDefinitionComponent, sceneReadinessReportQueue, scenesCache); } - - } } diff --git a/Explorer/Assets/DCL/Roads/Systems/UnloadRoadSystem.cs b/Explorer/Assets/DCL/Roads/Systems/UnloadRoadSystem.cs index 5506ee014e..991128d273 100644 --- a/Explorer/Assets/DCL/Roads/Systems/UnloadRoadSystem.cs +++ b/Explorer/Assets/DCL/Roads/Systems/UnloadRoadSystem.cs @@ -37,6 +37,7 @@ protected override void Update(float t) [All(typeof(DeleteEntityIntention), typeof(VisualSceneState))] private void UnloadRoad(ref RoadInfo roadInfo, ref SceneDefinitionComponent sceneDefinitionComponent) { + // Helpful info: DeleteEntityIntention is added as component in ResolveSceneStateByIncreasingRadiusSystem.StartUnloading roadInfo.Dispose(roadAssetPool); scenesCache.RemoveNonRealScene(sceneDefinitionComponent.Parcels); } diff --git a/Explorer/Assets/DCL/Roads/Tests/EditMode/RoadInstantiatorSystemShould.cs b/Explorer/Assets/DCL/Roads/Tests/EditMode/RoadInstantiatorSystemShould.cs index b380138727..9889640a07 100644 --- a/Explorer/Assets/DCL/Roads/Tests/EditMode/RoadInstantiatorSystemShould.cs +++ b/Explorer/Assets/DCL/Roads/Tests/EditMode/RoadInstantiatorSystemShould.cs @@ -23,21 +23,20 @@ public class RoadInstantiatorSystemShould : UnitySystemTestBase<RoadInstantiatorSystem> { - private Transform existingInstantiatedRoad; private static readonly string EXISTING_ROAD_KEY = "EXISTING_ROAD"; private static readonly string NON_EXISTING_ROAD_KEY = "NON_EXISTING_ROAD"; private static readonly Quaternion EXISTING_ROTATION = Quaternion.Euler(90, 0, 0); private static readonly Vector2Int EXISTING_COORD = new (0, 0); private static readonly Vector2Int NON_EXISTING_COORD = new (1, 1); - + private Transform existingInstantiatedRoad; [SetUp] public void Setup() { - var frameCapBudget = Substitute.For<IPerformanceBudget>(); + IPerformanceBudget frameCapBudget = Substitute.For<IPerformanceBudget>(); frameCapBudget.TrySpendBudget().Returns(true); - var memoryBudget = Substitute.For<IPerformanceBudget>(); + IPerformanceBudget memoryBudget = Substitute.For<IPerformanceBudget>(); memoryBudget.TrySpendBudget().Returns(true); IReadOnlyDictionary<Vector2Int, RoadDescription> roadDescriptions @@ -46,33 +45,36 @@ IReadOnlyDictionary<Vector2Int, RoadDescription> roadDescriptions { EXISTING_COORD, new RoadDescription { - RoadCoordinate = EXISTING_COORD, RoadModel = EXISTING_ROAD_KEY, Rotation = EXISTING_ROTATION + RoadCoordinate = EXISTING_COORD, RoadModel = EXISTING_ROAD_KEY, Rotation = EXISTING_ROTATION, } }, { NON_EXISTING_COORD, new RoadDescription { - RoadCoordinate = NON_EXISTING_COORD, RoadModel = NON_EXISTING_ROAD_KEY, Rotation = EXISTING_ROTATION + RoadCoordinate = NON_EXISTING_COORD, RoadModel = NON_EXISTING_ROAD_KEY, Rotation = EXISTING_ROTATION, } - } + }, }; - var roadAssetPool = Substitute.For<IRoadAssetPool>(); + IRoadAssetPool roadAssetPool = Substitute.For<IRoadAssetPool>(); existingInstantiatedRoad = new GameObject(EXISTING_ROAD_KEY).transform; - roadAssetPool.Get(EXISTING_ROAD_KEY, out Arg.Any<Transform>()).Returns(x => - { - x[1] = existingInstantiatedRoad; - return true; - }); - roadAssetPool.Get(NON_EXISTING_ROAD_KEY, out Arg.Any<Transform>()).Returns(x => - { - x[1] = existingInstantiatedRoad; - return false; - }); + roadAssetPool.Get(EXISTING_ROAD_KEY, out Arg.Any<Transform>()) + .Returns(x => + { + x[1] = existingInstantiatedRoad; + return true; + }); + + roadAssetPool.Get(NON_EXISTING_ROAD_KEY, out Arg.Any<Transform>()) + .Returns(x => + { + x[1] = existingInstantiatedRoad; + return false; + }); - var scenesCache = Substitute.For<IScenesCache>(); - var sceneReadinessReportQueue = Substitute.For<ISceneReadinessReportQueue>(); + IScenesCache scenesCache = Substitute.For<IScenesCache>(); + ISceneReadinessReportQueue sceneReadinessReportQueue = Substitute.For<ISceneReadinessReportQueue>(); system = new RoadInstantiatorSystem(world, frameCapBudget, memoryBudget, roadDescriptions, roadAssetPool, sceneReadinessReportQueue, scenesCache); } @@ -83,27 +85,31 @@ public void InstantiateRoad() // Arrange var roadInfo = new RoadInfo { - IsDirty = true + IsDirty = true, }; + var sceneEntityDefinition = new SceneEntityDefinition { id = "fakeHash", metadata = new SceneMetadata { scene = new SceneMetadataScene { - DecodedBase = EXISTING_COORD, DecodedParcels = new [] + DecodedBase = EXISTING_COORD, DecodedParcels = new[] { - EXISTING_COORD - } - } - } + EXISTING_COORD, + }, + }, + }, }; - var sceneDefinitionComponent = new SceneDefinitionComponent(sceneEntityDefinition, new IpfsPath()); + + SceneDefinitionComponent sceneDefinitionComponent = SceneDefinitionComponentFactory.CreateFromDefinition(sceneEntityDefinition, new IpfsPath()); + var partitionComponent = new PartitionComponent { - IsBehind = false + IsBehind = false, }; - var roadEntity + + Entity roadEntity = world.Create(roadInfo, partitionComponent, sceneDefinitionComponent); // Act @@ -126,27 +132,31 @@ public void InstantiateDefaultRoad() // Arrange var roadInfo = new RoadInfo { - IsDirty = true + IsDirty = true, }; + var sceneEntityDefinition = new SceneEntityDefinition { id = "fakeHash", metadata = new SceneMetadata { scene = new SceneMetadataScene { - DecodedBase = NON_EXISTING_COORD, DecodedParcels = new [] + DecodedBase = NON_EXISTING_COORD, DecodedParcels = new[] { - NON_EXISTING_COORD - } - } - } + NON_EXISTING_COORD, + }, + }, + }, }; - var sceneDefinitionComponent = new SceneDefinitionComponent(sceneEntityDefinition, new IpfsPath()); + + SceneDefinitionComponent sceneDefinitionComponent = SceneDefinitionComponentFactory.CreateFromDefinition(sceneEntityDefinition, new IpfsPath()); + var partitionComponent = new PartitionComponent { - IsBehind = false + IsBehind = false, }; - var roadEntity + + Entity roadEntity = world.Create(roadInfo, partitionComponent, sceneDefinitionComponent); // Act @@ -160,7 +170,8 @@ var roadEntity //We check against its moved pivot position Assert.AreEqual(existingInstantiatedRoad.localPosition.magnitude, (ParcelMathHelper.GetPositionByParcelPosition(NON_EXISTING_COORD) + new Vector3(8, 0, 8)).magnitude); + Assert.AreEqual(Quaternion.Angle(existingInstantiatedRoad.localRotation, EXISTING_ROTATION), 0); Assert.IsTrue(existingInstantiatedRoad.gameObject.activeSelf); } -} \ No newline at end of file +} diff --git a/Explorer/Assets/DCL/SDKComponents/Animator/Systems/AnimationPlayerSystem.cs b/Explorer/Assets/DCL/SDKComponents/Animator/Systems/AnimationPlayerSystem.cs index 5428dc05b3..7e4aecf2fe 100644 --- a/Explorer/Assets/DCL/SDKComponents/Animator/Systems/AnimationPlayerSystem.cs +++ b/Explorer/Assets/DCL/SDKComponents/Animator/Systems/AnimationPlayerSystem.cs @@ -113,7 +113,7 @@ private void SetAnimationState(ICollection<SDKAnimationState> sdkAnimationStates if (layerIndex == -1) { - ReportHub.LogWarning(new ReportData(GetReportCategory()), $"Cannot find animator layer for clip {name}"); + ReportHub.LogWarning(GetReportData(), $"Cannot find animator layer for clip {name}"); continue; } diff --git a/Explorer/Assets/DCL/SDKComponents/AudioSources/Components/AudioSourceComponent.cs b/Explorer/Assets/DCL/SDKComponents/AudioSources/Components/AudioSourceComponent.cs index dffc3d6fd1..ddc6f09647 100644 --- a/Explorer/Assets/DCL/SDKComponents/AudioSources/Components/AudioSourceComponent.cs +++ b/Explorer/Assets/DCL/SDKComponents/AudioSources/Components/AudioSourceComponent.cs @@ -36,6 +36,18 @@ public void SetAudioSource(AudioSource audioSource, AudioMixerGroup audioMixerGr AudioSourceAssigned = true; } + /// <summary> + /// Sets the mute property of the Unity's AudioSource, if it was loaded. + /// </summary> + /// <param name="mute">The value to replace AudioSource's.</param> + public void Mute(bool mute) + { + if (AudioSource != null) + { + AudioSource.mute = mute; + } + } + public void Dispose() { if (AudioSource != null) diff --git a/Explorer/Assets/DCL/SDKComponents/AudioSources/Systems/UpdateAudioSourceSystem.cs b/Explorer/Assets/DCL/SDKComponents/AudioSources/Systems/UpdateAudioSourceSystem.cs index 035d89ff14..6d46fee350 100644 --- a/Explorer/Assets/DCL/SDKComponents/AudioSources/Systems/UpdateAudioSourceSystem.cs +++ b/Explorer/Assets/DCL/SDKComponents/AudioSources/Systems/UpdateAudioSourceSystem.cs @@ -33,16 +33,18 @@ public partial class UpdateAudioSourceSystem : BaseUnityLoopSystem, ISceneIsCurr private readonly ISceneData sceneData; private readonly IStreamableCache<AudioClip, GetAudioClipIntention> cache; private readonly AudioMixerGroup[] worldGroup; + private readonly ISceneStateProvider sceneStateProvider; internal UpdateAudioSourceSystem(World world, ISceneData sceneData, IStreamableCache<AudioClip, GetAudioClipIntention> cache, IComponentPoolsRegistry poolsRegistry, IPerformanceBudget frameTimeBudgetProvider, - IPerformanceBudget memoryBudgetProvider, AudioMixer audioMixer) : base(world) + IPerformanceBudget memoryBudgetProvider, AudioMixer audioMixer, ISceneStateProvider sceneStateProvider) : base(world) { this.world = world; this.sceneData = sceneData; this.frameTimeBudgetProvider = frameTimeBudgetProvider; this.memoryBudgetProvider = memoryBudgetProvider; this.cache = cache; + this.sceneStateProvider = sceneStateProvider; audioSourcesPool = poolsRegistry.GetReferenceTypePool<AudioSource>().EnsureNotNull(); @@ -54,6 +56,8 @@ protected override void Update(float t) { CreateAudioSourceQuery(World); UpdateAudioSourceQuery(World); + + MuteAudioSourceQuery(World, !sceneStateProvider.IsCurrent); } [Query] @@ -122,5 +126,16 @@ private void HandleSDKChanges(PBAudioSource sdkComponent, ref AudioSourceCompone sdkComponent.IsDirty = false; } + + /// <summary> + /// Mutes an AudioSource. + /// </summary> + /// <param name="component">The AudioSource component.</param> + /// <param name="mute">Whether the AudioSource has to be muted or not.</param> + [Query] + private void MuteAudioSource(ref AudioSourceComponent component, [Data] bool mute) + { + component.Mute(mute); + } } } diff --git a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode.meta b/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode.meta deleted file mode 100644 index ef627ae63f..0000000000 --- a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 06f8da97cf224e29ba595120e2aaa05a -timeCreated: 1703031174 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSources.PlayMode.Tests.asmref b/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSources.PlayMode.Tests.asmref deleted file mode 100644 index a92db790d7..0000000000 --- a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSources.PlayMode.Tests.asmref +++ /dev/null @@ -1,3 +0,0 @@ -{ - "reference": "GUID:7213a1d35667f9b40be6aca8cbfcee23" -} \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSourcesAutomatedTests.cs b/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSourcesAutomatedTests.cs deleted file mode 100644 index 010cdd416d..0000000000 --- a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSourcesAutomatedTests.cs +++ /dev/null @@ -1,165 +0,0 @@ -using Arch.Core; -using Cysharp.Threading.Tasks; -using DCL.AssetsProvision; -using DCL.AssetsProvision.Provisions; -using DCL.Browser.DecentralandUrls; -using DCL.DebugUtilities; -using DCL.Diagnostics; -using DCL.Multiplayer.Connections.DecentralandUrls; -using DCL.Multiplayer.Connections.Messaging.Hubs; -using DCL.Multiplayer.Connections.RoomHubs; -using DCL.PluginSystem; -using DCL.PluginSystem.World; -using DCL.Profiles; -using DCL.Web3; -using DCL.Web3.Accounts.Factory; -using DCL.Web3.Authenticators; -using DCL.Web3.Identities; -using DCL.WebRequests; -using ECS; -using ECS.Prioritization.Components; -using ECS.StreamableLoading.AudioClips; -using Global; -using Global.AppArgs; -using Global.Dynamic; -using MVC; -using NSubstitute; -using NUnit.Framework; -using SceneRunner; -using SceneRunner.Scene; -using System; -using System.Collections; -using System.Linq; -using System.Threading; -using UnityEditor; -using UnityEngine; -using UnityEngine.TestTools; -using Object = UnityEngine.Object; - -namespace DCL.SDKComponents.AudioSources.Tests.PlayMode -{ - public class SDKAudioSourcesAutomatedTests - { - private const string TEST_SCENE = "Dance-floor"; - private const int TARGET_FPS = 60; - - private readonly CancellationTokenSource tearDownCts = new (); - - private readonly PluginSettingsContainer globalPluginSettings = - AssetDatabase.LoadAssetAtPath<PluginSettingsContainer>("Assets/DCL/PluginSystem/Global/Global Plugins Settings.asset"); - private readonly PluginSettingsContainer scenePluginSettings = - AssetDatabase.LoadAssetAtPath<PluginSettingsContainer>("Assets/DCL/PluginSystem/World/World Plugins Container.asset"); - - private StaticContainer? staticContainer; - private ISceneFacade? currentScene; - - [UnityTearDown] - public IEnumerator TearDown() - { - yield return currentScene?.DisposeAsync().ToCoroutine(); - - tearDownCts.Cancel(); - tearDownCts.Dispose(); - - staticContainer?.Dispose(); - } - - //[UnityTest] - [Retry(5)] - public IEnumerator ShouldCreateAudioSourcesForSDKDanceFloorScene() - { - InitializationFlowAsync(tearDownCts.Token).Forget(); - - yield return new WaitUntil(() => staticContainer != null); - yield return new WaitUntil(() => currentScene != null); - - var scene = currentScene as SceneFacade; - yield return new WaitUntil(() => scene!.SceneStateProvider.State == SceneState.Running); - - AudioClipsCache clipsCache = staticContainer.ECSWorldPlugins.OfType<AudioSourcesPlugin>().FirstOrDefault().audioClipsCache; - - yield return new WaitUntil(() => clipsCache.cache.Count > 0); - yield return new WaitUntil(() => clipsCache.OngoingRequests.Count == 0); - Assert.That(clipsCache.cache.Count, Is.EqualTo(1)); - - AudioSource[]? audioSources = Object.FindObjectsOfType<AudioSource>(); - Assert.That(audioSources.Length, Is.EqualTo(1)); - Assert.That(audioSources[0].isPlaying); - } - - private async UniTask InitializationFlowAsync(CancellationToken ct) - { - try - { - var identityCache = new MemoryWeb3IdentityCache(); - var web3AccountFactory = new Web3AccountFactory(); - - var web3Authenticator = new ProxyWeb3Authenticator(new RandomGeneratedWeb3Authenticator(web3AccountFactory), identityCache); - await web3Authenticator.LoginAsync(ct); - - SceneSharedContainer sceneSharedContainer; - - (staticContainer, sceneSharedContainer) = await InstallAsync(globalPluginSettings, scenePluginSettings, identityCache, - Substitute.For<IEthereumApi>(), Substitute.For<IProfileRepository>(), ct); - - currentScene = await sceneSharedContainer - .SceneFactory - .CreateSceneFromStreamableDirectoryAsync(TEST_SCENE, new PartitionComponent(), ct); - - await currentScene.StartUpdateLoopAsync(TARGET_FPS, ct); - } - catch (OperationCanceledException) { } - catch (Exception) // unhandled exception - { - GameReports.PrintIsDead(); - throw; - } - } - - private static async UniTask<(StaticContainer staticContainer, SceneSharedContainer sceneSharedContainer)> InstallAsync(IPluginSettingsContainer globalSettingsContainer, - IPluginSettingsContainer sceneSettingsContainer, - IWeb3IdentityCache web3IdentityCache, - IEthereumApi ethereumApi, - IProfileRepository profileRepository, - CancellationToken ct) - { - ErrorTraceAssetsProvisioner assetProvisioner = new AddressablesProvisioner().WithErrorTrace(); - - ProvidedAsset<ReportsHandlingSettings> reportHandlingSettings = await BootstrapContainer.ProvideReportHandlingSettingsAsync(assetProvisioner, - sceneSettingsContainer.GetSettings<BootstrapSettings>(), ct); - - // First load the common global plugin - (StaticContainer? staticContainer, bool isLoaded) - = await StaticContainer.CreateAsync( - new DecentralandUrlsSource(DecentralandEnvironment.Org), - assetProvisioner, - reportHandlingSettings.Value, - new ApplicationParametersParser(), - new DebugViewsCatalog(), - globalSettingsContainer, - web3IdentityCache, - ethereumApi, - World.Create(), - ct - ); - - if (!isLoaded) - GameReports.PrintIsDead(); - - await UniTask.WhenAll(staticContainer.ECSWorldPlugins.Select(gp => sceneSettingsContainer.InitializePluginAsync(gp, ct))); - - var sceneSharedContainer = SceneSharedContainer.Create( - in staticContainer, - Substitute.For<IDecentralandUrlsSource>(), - Substitute.For<IMVCManager>(), - web3IdentityCache, profileRepository, - IWebRequestController.DEFAULT, - new IRoomHub.Fake(), - Substitute.For<IRealmData>(), - new IMessagePipesHub.Fake() - ); - - return (staticContainer, sceneSharedContainer); - } - } -} diff --git a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSourcesAutomatedTests.cs.meta b/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSourcesAutomatedTests.cs.meta deleted file mode 100644 index f0fb454abb..0000000000 --- a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/PlayMode/SDKAudioSourcesAutomatedTests.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: cd0c71fde1114a169f7333b6912773a9 -timeCreated: 1703031228 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/UpdateAudioSourceSystemShould.cs b/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/UpdateAudioSourceSystemShould.cs index 1a12a5142c..79e8eba275 100644 --- a/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/UpdateAudioSourceSystemShould.cs +++ b/Explorer/Assets/DCL/SDKComponents/AudioSources/Tests/UpdateAudioSourceSystemShould.cs @@ -54,7 +54,11 @@ public static UpdateAudioSourceSystem CreateSystem(World world) budgetProvider.TrySpendBudget().Returns(true); IStreamableCache<AudioClip, GetAudioClipIntention> cache = Substitute.For<IStreamableCache<AudioClip, GetAudioClipIntention>>(); - return new UpdateAudioSourceSystem(world, ECSTestUtils.SceneDataSub(), cache, poolsRegistry, budgetProvider, budgetProvider, null); + + ISceneStateProvider sceneStateProvider = Substitute.For<ISceneStateProvider>(); + sceneStateProvider.IsCurrent.Returns(true); + + return new UpdateAudioSourceSystem(world, ECSTestUtils.SceneDataSub(), cache, poolsRegistry, budgetProvider, budgetProvider, null, sceneStateProvider); } [Test] diff --git a/Explorer/Assets/DCL/SDKComponents/AvatarModifierArea/Systems/AvatarModifierAreaHandlerSystem.cs b/Explorer/Assets/DCL/SDKComponents/AvatarModifierArea/Systems/AvatarModifierAreaHandlerSystem.cs index 9c9e489513..7fe41c51fb 100644 --- a/Explorer/Assets/DCL/SDKComponents/AvatarModifierArea/Systems/AvatarModifierAreaHandlerSystem.cs +++ b/Explorer/Assets/DCL/SDKComponents/AvatarModifierArea/Systems/AvatarModifierAreaHandlerSystem.cs @@ -1,16 +1,15 @@ using Arch.Core; using Arch.System; using Arch.SystemGroups; -using Arch.SystemGroups.DefaultSystemGroups; using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.AvatarShape.UnityInterface; using DCL.CharacterTriggerArea.Components; using DCL.CharacterTriggerArea.Systems; using DCL.Diagnostics; using DCL.ECSComponents; +using DCL.Multiplayer.Connections.Typing; using DCL.Profiles; using DCL.SDKComponents.AvatarModifierArea.Components; -using DCL.Utilities; using ECS.Abstract; using ECS.Groups; using ECS.LifeCycle; @@ -22,25 +21,26 @@ namespace DCL.SDKComponents.AvatarModifierArea.Systems { [UpdateInGroup(typeof(SyncedInitializationFixedUpdateThrottledGroup))] - [UpdateBefore(typeof(CharacterTriggerAreaCleanUpRegisteredCollisionsSystem))] - [LogCategory(ReportCategory.CAMERA_MODE_AREA)] + [LogCategory(ReportCategory.CHARACTER_TRIGGER_AREA)] public partial class AvatarModifierAreaHandlerSystem : BaseUnityLoopSystem, IFinalizeWorldSystem { private static readonly QueryDescription AVATAR_BASE_QUERY = new QueryDescription().WithAll<AvatarBase>(); private readonly World globalWorld; + private readonly FindAvatarQuery findAvatarQuery; public AvatarModifierAreaHandlerSystem(World world, World globalWorld) : base(world) { this.globalWorld = globalWorld; + findAvatarQuery = new FindAvatarQuery(globalWorld); } protected override void Update(float t) { - UpdateAvatarModifierAreaQuery(World); - SetupAvatarModifierAreaQuery(World); + UpdateAvatarModifierAreaQuery(World!); + SetupAvatarModifierAreaQuery(World!); - HandleEntityDestructionQuery(World); - HandleComponentRemovalQuery(World); + HandleEntityDestructionQuery(World!); + HandleComponentRemovalQuery(World!); } [Query] @@ -48,9 +48,10 @@ protected override void Update(float t) [All(typeof(TransformComponent))] private void SetupAvatarModifierArea(in Entity entity, ref PBAvatarModifierArea pbAvatarModifierArea) { - World.Add(entity, + World!.Add(entity, new CharacterTriggerAreaComponent(areaSize: pbAvatarModifierArea.Area, targetOnlyMainPlayer: false), - new AvatarModifierAreaComponent(pbAvatarModifierArea.ExcludeIds)); + new AvatarModifierAreaComponent(pbAvatarModifierArea.ExcludeIds!) + ); } [Query] @@ -60,19 +61,18 @@ private void UpdateAvatarModifierArea(ref PBAvatarModifierArea pbAvatarModifierA if (pbAvatarModifierArea.IsDirty) { pbAvatarModifierArea.IsDirty = false; - - triggerAreaComponent.AreaSize = pbAvatarModifierArea.Area; - triggerAreaComponent.IsDirty = true; - - modifierAreaComponent.SetExcludedIds(pbAvatarModifierArea.ExcludeIds); + triggerAreaComponent.UpdateAreaSize(pbAvatarModifierArea.Area); + modifierAreaComponent.SetExcludedIds(pbAvatarModifierArea.ExcludeIds!); // Update effect on now excluded/non-excluded avatars foreach (Transform avatarTransform in triggerAreaComponent.CurrentAvatarsInside) { CorrectAvatarHidingState(avatarTransform, modifierAreaComponent.ExcludedIds); } } - foreach (Transform avatarTransform in triggerAreaComponent.ExitedThisFrame) { ToggleAvatarHiding(avatarTransform, false, modifierAreaComponent.ExcludedIds); } + foreach (Transform avatarTransform in triggerAreaComponent.ExitedAvatarsToBeProcessed) { ToggleAvatarHiding(avatarTransform, false, modifierAreaComponent.ExcludedIds); } + triggerAreaComponent.TryClearExitedAvatarsToBeProcessed(); - foreach (Transform avatarTransform in triggerAreaComponent.EnteredThisFrame) { ToggleAvatarHiding(avatarTransform, true, modifierAreaComponent.ExcludedIds); } + foreach (Transform avatarTransform in triggerAreaComponent.EnteredAvatarsToBeProcessed) { ToggleAvatarHiding(avatarTransform, true, modifierAreaComponent.ExcludedIds); } + triggerAreaComponent.TryClearEnteredAvatarsToBeProcessed(); } [Query] @@ -80,10 +80,7 @@ private void UpdateAvatarModifierArea(ref PBAvatarModifierArea pbAvatarModifierA private void HandleEntityDestruction(ref CharacterTriggerAreaComponent triggerAreaComponent, ref AvatarModifierAreaComponent modifierComponent) { // Reset state of affected entities - foreach (Transform avatarTransform in triggerAreaComponent.CurrentAvatarsInside) - { - ToggleAvatarHiding(avatarTransform, false, modifierComponent.ExcludedIds); - } + foreach (Transform avatarTransform in triggerAreaComponent.CurrentAvatarsInside) { ToggleAvatarHiding(avatarTransform, false, modifierComponent.ExcludedIds); } modifierComponent.Dispose(); } @@ -94,56 +91,33 @@ private void HandleComponentRemoval(Entity e, ref CharacterTriggerAreaComponent { // Reset state of affected entities foreach (Transform avatarTransform in triggerAreaComponent.CurrentAvatarsInside) - { ToggleAvatarHiding(avatarTransform, false, modifierComponent.ExcludedIds); - } modifierComponent.Dispose(); - World.Remove<AvatarModifierAreaComponent>(e); + World!.Remove<AvatarModifierAreaComponent>(e); } internal void ToggleAvatarHiding(Transform avatarTransform, bool shouldHide, HashSet<string> excludedIds) { - var found = false; - - // There's no way to do a Query/InlineQuery getting both entity and TransformComponent... - globalWorld.Query(in AVATAR_BASE_QUERY, - entity => - { - if (found) return; - - Transform entityTransform = globalWorld.Get<AvatarBase>(entity).transform.parent; - if (avatarTransform != entityTransform) return; - - found = true; + var result = findAvatarQuery.AvatarWithTransform(avatarTransform); + if (!result.Success) return; - if (globalWorld.TryGet(entity, out Profile profile) && excludedIds.Contains(profile.UserId)) - return; + var entity = result.Result; - globalWorld.Get<AvatarShapeComponent>(entity).HiddenByModifierArea = shouldHide; - }); + if (globalWorld.TryGet(entity, out Profile? profile) && excludedIds.Contains(profile!.UserId)) return; + globalWorld.Get<AvatarShapeComponent>(entity).UpdateHiddenStatus(shouldHide); } internal void CorrectAvatarHidingState(Transform avatarTransform, HashSet<string> excludedIds) { - var found = false; - - globalWorld.Query(in AVATAR_BASE_QUERY, - entity => - { - if (found) return; - - Transform entityTransform = globalWorld.Get<AvatarBase>(entity).transform.parent; - if (avatarTransform != entityTransform) return; - - found = true; + var result = findAvatarQuery.AvatarWithTransform(avatarTransform); + if (!result.Success) return; - if (!globalWorld.TryGet(entity, out Profile profile)) - return; + var entity = result.Result; - globalWorld.Get<AvatarShapeComponent>(entity).HiddenByModifierArea = !excludedIds.Contains(profile.UserId); - }); + if (globalWorld.TryGet(entity, out Profile? profile)) + globalWorld.Get<AvatarShapeComponent>(entity).UpdateHiddenStatus(excludedIds.Contains(profile!.UserId) == false); } [Query] @@ -153,12 +127,44 @@ private void FinalizeComponents(in Entity entity, ref CharacterTriggerAreaCompon foreach (Transform avatarTransform in triggerAreaComponent.CurrentAvatarsInside) ToggleAvatarHiding(avatarTransform, false, modifierComponent.ExcludedIds); - World.Remove<AvatarModifierAreaComponent>(entity); + World!.Remove<AvatarModifierAreaComponent>(entity); } public void FinalizeComponents(in Query query) { - FinalizeComponentsQuery(World); + FinalizeComponentsQuery(World!); + } + + private class FindAvatarQuery + { + private readonly World globalWorld; + private readonly ForEach cachedFindEntity; + + private Entity foundedEntityOrNull = Entity.Null; + private Transform? requiredTransform; + + public FindAvatarQuery(World globalWorld) + { + this.globalWorld = globalWorld; + cachedFindEntity = this.FindEntity; + } + + public LightResult<Entity> AvatarWithTransform(Transform avatarTransform) + { + foundedEntityOrNull = Entity.Null; + requiredTransform = avatarTransform; + globalWorld.Query(in AVATAR_BASE_QUERY, cachedFindEntity); + + return foundedEntityOrNull == Entity.Null + ? LightResult<Entity>.FAILURE + : new LightResult<Entity>(foundedEntityOrNull); + } + + private void FindEntity(Entity entity) + { + if (foundedEntityOrNull != Entity.Null) return; + if (globalWorld.Get<AvatarBase>(entity).transform.parent == requiredTransform) foundedEntityOrNull = entity; + } } } } diff --git a/Explorer/Assets/DCL/SDKComponents/AvatarModifierArea/Tests/AvatarModifierAreaHandlerSystemShould.cs b/Explorer/Assets/DCL/SDKComponents/AvatarModifierArea/Tests/AvatarModifierAreaHandlerSystemShould.cs index 1ec834aa00..bb3a05c17c 100644 --- a/Explorer/Assets/DCL/SDKComponents/AvatarModifierArea/Tests/AvatarModifierAreaHandlerSystemShould.cs +++ b/Explorer/Assets/DCL/SDKComponents/AvatarModifierArea/Tests/AvatarModifierAreaHandlerSystemShould.cs @@ -1,7 +1,7 @@ using Arch.Core; using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.AvatarShape.UnityInterface; -using DCL.AvatarRendering.Wearables; +using DCL.AvatarRendering.Loading.Components; using DCL.AvatarRendering.Wearables.Helpers; using DCL.CharacterTriggerArea.Components; using DCL.ECSComponents; @@ -43,7 +43,6 @@ public void Setup() fakeTriggerAreaGO = new GameObject("fake character area trigger"); characterTriggerArea = fakeTriggerAreaGO.AddComponent<CharacterTriggerArea.CharacterTriggerArea>(); - fakeAvatarEntity = globalWorld.Create(); fakeAvatarGO = new GameObject("fake avatar"); fakeAvatarShapeTransform = fakeAvatarGO.transform; fakeAvatarShapeCollider = fakeAvatarGO.AddComponent<BoxCollider>(); @@ -51,12 +50,7 @@ public void Setup() AvatarBase fakeAvatarBase = fakeAvatarBaseGO.AddComponent<AvatarBase>(); fakeAvatarBaseGO.transform.SetParent(fakeAvatarShapeTransform); - globalWorld.Add(fakeAvatarEntity, fakeAvatarBase, new AvatarShapeComponent(), - new TransformComponent - { - Transform = fakeAvatarShapeTransform, - }); - + fakeAvatarEntity = globalWorld.Create(fakeAvatarBase, new AvatarShapeComponent(), new TransformComponent { Transform = fakeAvatarShapeTransform }); triggerAreaEntity = world.Create(PartitionComponent.TOP_PRIORITY); AddTransformToEntity(triggerAreaEntity); } @@ -204,13 +198,15 @@ public void ToggleHidingFlagCorrectly() { var excludedIds = new HashSet<string>(); + world.Add(fakeAvatarEntity, new AvatarShapeComponent()); + system.ToggleAvatarHiding(fakeAvatarShapeTransform, true, excludedIds); - Assert.IsTrue(globalWorld.Get<AvatarShapeComponent>(triggerAreaEntity).HiddenByModifierArea); + Assert.IsTrue(globalWorld.Get<AvatarShapeComponent>(fakeAvatarEntity).HiddenByModifierArea); system.ToggleAvatarHiding(fakeAvatarShapeTransform, false, excludedIds); - Assert.IsFalse(globalWorld.Get<AvatarShapeComponent>(triggerAreaEntity).HiddenByModifierArea); + Assert.IsFalse(globalWorld.Get<AvatarShapeComponent>(fakeAvatarEntity).HiddenByModifierArea); } [Test] @@ -223,14 +219,14 @@ public void FilterByExcludedIds() WearablesConstants.DefaultWearables.GetDefaultWearablesForBodyShape(BodyShape.MALE), WearablesConstants.DefaultColors.GetRandomEyesColor(), WearablesConstants.DefaultColors.GetRandomHairColor(), - WearablesConstants.DefaultColors.GetRandomSkinColor()))); + WearablesConstants.DefaultColors.GetRandomSkinColor())), new AvatarShapeComponent()); var excludedIds = new HashSet<string>(); excludedIds.Add(FAKE_USER_ID); system.ToggleAvatarHiding(fakeAvatarShapeTransform, true, excludedIds); - Assert.IsFalse(globalWorld.Get<AvatarShapeComponent>(triggerAreaEntity).HiddenByModifierArea); + Assert.IsFalse(globalWorld.Get<AvatarShapeComponent>(fakeAvatarEntity).HiddenByModifierArea); } [Test] diff --git a/Explorer/Assets/DCL/SDKComponents/Billboard/Billboard.asmdef b/Explorer/Assets/DCL/SDKComponents/Billboard/Billboard.asmdef index 9282424ce0..782a62132b 100644 --- a/Explorer/Assets/DCL/SDKComponents/Billboard/Billboard.asmdef +++ b/Explorer/Assets/DCL/SDKComponents/Billboard/Billboard.asmdef @@ -12,7 +12,8 @@ "GUID:d414ef88f3b15f746a4b97636b50dfb4", "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:fd2b275602de4d638e01adafe118d5ea", - "GUID:166b65e6dfc848bb9fb075f53c293a38" + "GUID:166b65e6dfc848bb9fb075f53c293a38", + "GUID:4307f53044263cf4b835bd812fc161a4" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/SDKComponents/Billboard/Demo/CameraData/FromTransformExposedCameraData.cs b/Explorer/Assets/DCL/SDKComponents/Billboard/Demo/CameraData/FromTransformExposedCameraData.cs index fccad227dc..9dbcdcd048 100644 --- a/Explorer/Assets/DCL/SDKComponents/Billboard/Demo/CameraData/FromTransformExposedCameraData.cs +++ b/Explorer/Assets/DCL/SDKComponents/Billboard/Demo/CameraData/FromTransformExposedCameraData.cs @@ -1,4 +1,5 @@ using Arch.Core; +using Cinemachine; using DCL.CharacterCamera; using DCL.Utilities; using System; @@ -17,6 +18,8 @@ public class FromTransformExposedCameraData : IExposedCameraData public CanBeDirty<CameraType> CameraType { get; } public CanBeDirty<bool> PointerIsLocked { get; } public ObjectProxy<Entity> CameraEntityProxy { get; } = new (); + public CinemachineBrain? CinemachineBrain { get; set; } + public CameraMode CameraMode { get; set; } public FromTransformExposedCameraData() : this((Camera.main ? Camera.main : throw new NullReferenceException("Camera not found"))!) { } diff --git a/Explorer/Assets/DCL/SDKComponents/Billboard/System/BillboardSystem.cs b/Explorer/Assets/DCL/SDKComponents/Billboard/System/BillboardSystem.cs index 2581430f02..6ef386f476 100644 --- a/Explorer/Assets/DCL/SDKComponents/Billboard/System/BillboardSystem.cs +++ b/Explorer/Assets/DCL/SDKComponents/Billboard/System/BillboardSystem.cs @@ -16,6 +16,7 @@ namespace DCL.Billboard.System [UpdateAfter(typeof(UpdateTransformSystem))] public partial class BillboardSystem : BaseUnityLoopSystem { + private const float MINIMUM_DISTANCE_TO_ROTATE_SQR = 0.25f * 0.25f; private readonly IExposedCameraData exposedCameraData; public BillboardSystem(World world, IExposedCameraData exposedCameraData) : base(world) @@ -44,32 +45,30 @@ in PBBillboard billboard const uint BILLBOARD_Z = (uint)BillboardMode.BmZ; const uint BILLBOARD_XY = BILLBOARD_X | BILLBOARD_Y; - Vector3 cameraPos = cameraPosition; - var billboardMode = (uint)billboard.GetBillboardMode(); if (billboardMode == BILLBOARD_NONE) return; Transform billboardT = transform.Transform; - Vector3 billboardForward = billboardT.forward; Vector3 billboardPos = billboardT.position; - Vector3 forward = billboardForward; + if ((cameraPosition - billboardPos).sqrMagnitude < MINIMUM_DISTANCE_TO_ROTATE_SQR) + return; // either or both X and Y are set if ((billboardMode & BILLBOARD_XY) != 0) { - forward = billboardPos - cameraPos; + billboardForward = billboardPos - cameraPosition; - if ((billboardMode & BILLBOARD_Y) == 0) forward.x = 0; - if ((billboardMode & BILLBOARD_X) == 0) forward.y = 0; + if ((billboardMode & BILLBOARD_Y) == 0) billboardForward.x = 0; + if ((billboardMode & BILLBOARD_X) == 0) billboardForward.y = 0; - forward.Normalize(); + billboardForward.Normalize(); } - Quaternion rotation = forward != Vector3.zero ? Quaternion.LookRotation(forward) : Quaternion.identity; + Quaternion rotation = billboardForward != Vector3.zero ? Quaternion.LookRotation(billboardForward) : Quaternion.identity; // apply Z axis rotation if ((billboardMode & BILLBOARD_Z) != 0) diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl.meta new file mode 100644 index 0000000000..695f9cf577 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: eae65fc3fd784596b2de57d22c62e6e7 +timeCreated: 1723564622 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea.meta similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea.meta rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea.meta diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Components.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Components.meta similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Components.meta rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Components.meta diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Components/CameraModeAreaComponent.cs b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Components/CameraModeAreaComponent.cs similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Components/CameraModeAreaComponent.cs rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Components/CameraModeAreaComponent.cs diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Components/CameraModeAreaComponent.cs.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Components/CameraModeAreaComponent.cs.meta similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Components/CameraModeAreaComponent.cs.meta rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Components/CameraModeAreaComponent.cs.meta diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems.meta similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems.meta rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems.meta diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems/AssemblyInfo.cs b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems/AssemblyInfo.cs similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems/AssemblyInfo.cs rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems/AssemblyInfo.cs diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems/AssemblyInfo.cs.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems/AssemblyInfo.cs.meta similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems/AssemblyInfo.cs.meta rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems/AssemblyInfo.cs.meta diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs similarity index 59% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs index 2196093737..a538f7e151 100644 --- a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs @@ -1,10 +1,8 @@ using Arch.Core; using Arch.System; using Arch.SystemGroups; -using Arch.SystemGroups.DefaultSystemGroups; using DCL.CharacterCamera; using DCL.CharacterTriggerArea.Components; -using DCL.CharacterTriggerArea.Systems; using DCL.Diagnostics; using DCL.ECSComponents; using DCL.SDKComponents.CameraModeArea.Components; @@ -14,23 +12,32 @@ using ECS.LifeCycle; using ECS.LifeCycle.Components; using ECS.Unity.Transforms.Components; +using System.Collections.Generic; namespace DCL.SDKComponents.CameraModeArea.Systems { [UpdateInGroup(typeof(SyncedInitializationFixedUpdateThrottledGroup))] - [UpdateBefore(typeof(CharacterTriggerAreaCleanUpRegisteredCollisionsSystem))] - [LogCategory(ReportCategory.CAMERA_MODE_AREA)] + [LogCategory(ReportCategory.CHARACTER_TRIGGER_AREA)] public partial class CameraModeAreaHandlerSystem : BaseUnityLoopSystem, IFinalizeWorldSystem { - private static CameraMode cameraModeBeforeLastAreaEnter; // There's only 1 camera at a time + // There's only 1 camera at a time, only 1 camera mode area effect at a time + // and that area is only activated by the main player ('targetOnlyMainPlayer' property) + // that's why we have these fields as static. + private static CameraMode cameraModeBeforeLastAreaEnter; + + // Main player can enter an area while being already inside another one, but the last one + // entered is the one in effect. + private static readonly HashSet<Entity> activeAreas = new HashSet<Entity>(); private readonly World globalWorld; private readonly ObjectProxy<Entity> cameraEntityProxy; + private readonly IExposedCameraData cameraData; - public CameraModeAreaHandlerSystem(World world, World globalWorld, ObjectProxy<Entity> cameraEntityProxy) : base(world) + public CameraModeAreaHandlerSystem(World world, World globalWorld, ObjectProxy<Entity> cameraEntityProxy, IExposedCameraData cameraData) : base(world) { this.globalWorld = globalWorld; this.cameraEntityProxy = cameraEntityProxy; + this.cameraData = cameraData; } protected override void Update(float t) @@ -54,37 +61,55 @@ private void SetupCameraModeArea(in Entity entity, ref PBCameraModeArea pbCamera [Query] [All(typeof(TransformComponent))] - private void UpdateCameraModeArea(ref PBCameraModeArea pbCameraModeArea, ref CharacterTriggerAreaComponent characterTriggerAreaComponent) + private void UpdateCameraModeArea(Entity entity, ref PBCameraModeArea pbCameraModeArea, ref CharacterTriggerAreaComponent characterTriggerAreaComponent) { - if (characterTriggerAreaComponent.EnteredThisFrame!.Count > 0) { OnEnteredCameraModeArea((CameraMode)pbCameraModeArea.Mode); } - else if (characterTriggerAreaComponent.ExitedThisFrame!.Count > 0) { OnExitedCameraModeArea(); } - if (pbCameraModeArea.IsDirty) + characterTriggerAreaComponent.UpdateAreaSize(pbCameraModeArea.Area); + + if (cameraData.CameraMode == CameraMode.SDKCamera) return; + + if (characterTriggerAreaComponent.EnteredAvatarsToBeProcessed.Count > 0) { - characterTriggerAreaComponent.AreaSize = pbCameraModeArea.Area; - characterTriggerAreaComponent.IsDirty = true; + if (!activeAreas.Contains(entity)) + { + OnEnteredCameraModeArea((CameraMode)pbCameraModeArea.Mode); + activeAreas.Add(entity); + } + characterTriggerAreaComponent.TryClearEnteredAvatarsToBeProcessed(); + } + else if (characterTriggerAreaComponent.ExitedAvatarsToBeProcessed.Count > 0) + { + if (activeAreas.Contains(entity)) + { + OnExitedCameraModeArea(); + activeAreas.Remove(entity); + } + characterTriggerAreaComponent.TryClearExitedAvatarsToBeProcessed(); } } [Query] [All(typeof(DeleteEntityIntention), typeof(PBCameraModeArea), typeof(CameraModeAreaComponent))] - private void HandleEntityDestruction() + private void HandleEntityDestruction(Entity entity) { OnExitedCameraModeArea(); + activeAreas.Remove(entity); } [Query] [None(typeof(DeleteEntityIntention), typeof(PBCameraModeArea))] [All(typeof(CameraModeAreaComponent))] - private void HandleComponentRemoval(Entity e) + private void HandleComponentRemoval(Entity entity) { OnExitedCameraModeArea(); - World.Remove<CameraModeAreaComponent>(e); + activeAreas.Remove(entity); + World.Remove<CameraModeAreaComponent>(entity); } internal void OnEnteredCameraModeArea(CameraMode targetCameraMode) { ref CameraComponent camera = ref globalWorld.Get<CameraComponent>(cameraEntityProxy.Object!); + cameraModeBeforeLastAreaEnter = camera.Mode; camera.Mode = targetCameraMode; camera.AddCameraInputLock(); @@ -103,15 +128,16 @@ internal void OnExitedCameraModeArea() [Query] [All(typeof(CameraModeAreaComponent))] - private void FinalizeComponents() + private void FinalizeComponents(Entity entity) { OnExitedCameraModeArea(); + activeAreas.Remove(entity); + World.Remove<CameraModeAreaComponent>(entity); } public void FinalizeComponents(in Query query) { FinalizeComponentsQuery(World); - World.Remove<CameraModeAreaComponent>(FinalizeComponents_QueryDescription); } } } diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs.meta similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs.meta rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Systems/CameraModeAreaHandlerSystem.cs.meta diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests.meta similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests.meta rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests.meta diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests/CameraModeArea.Tests.asmref b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests/CameraModeArea.Tests.asmref similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests/CameraModeArea.Tests.asmref rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests/CameraModeArea.Tests.asmref diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests/CameraModeArea.Tests.asmref.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests/CameraModeArea.Tests.asmref.meta similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests/CameraModeArea.Tests.asmref.meta rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests/CameraModeArea.Tests.asmref.meta diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs similarity index 99% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs index fae7d5e24a..af60b53951 100644 --- a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs @@ -10,6 +10,7 @@ using ECS.LifeCycle.Components; using ECS.Prioritization.Components; using ECS.TestSuite; +using NSubstitute; using NUnit.Framework; using Vector3 = Decentraland.Common.Vector3; @@ -34,7 +35,7 @@ public void Setup() var cameraEntityProxy = new ObjectProxy<Entity>(); cameraEntityProxy.SetObject(cameraEntity); - system = new CameraModeAreaHandlerSystem(world, globalWorld, cameraEntityProxy); + system = new CameraModeAreaHandlerSystem(world, globalWorld, cameraEntityProxy, Substitute.For<IExposedCameraData>()); entity = world.Create(PartitionComponent.TOP_PRIORITY); AddTransformToEntity(entity); diff --git a/Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs.meta similarity index 100% rename from Explorer/Assets/DCL/SDKComponents/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs.meta rename to Explorer/Assets/DCL/SDKComponents/CameraControl/CameraModeArea/Tests/CameraModeAreaHandlerSystemShould.cs.meta diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera.meta new file mode 100644 index 0000000000..d4fb0c5693 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fb0f274408964008a8ebbdc40908fc00 +timeCreated: 1723564673 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components.meta new file mode 100644 index 0000000000..9d9655104d --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cb082870a423429db0acb9420b608581 +timeCreated: 1723564683 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/MainCameraComponent.cs b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/MainCameraComponent.cs new file mode 100644 index 0000000000..cf3491ebe9 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/MainCameraComponent.cs @@ -0,0 +1,11 @@ +using Cinemachine; +using CRDT; + +namespace DCL.SDKComponents.CameraControl.MainCamera.Components +{ + public struct MainCameraComponent + { + internal CinemachineFreeLook? virtualCameraInstance; + internal CRDTEntity? virtualCameraCRDTEntity; + } +} diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/MainCameraComponent.cs.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/MainCameraComponent.cs.meta new file mode 100644 index 0000000000..bce6837911 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/MainCameraComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2ddfb587bf78457892ef8fb6b11849fb +timeCreated: 1723572960 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/VirtualCameraComponent.cs b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/VirtualCameraComponent.cs new file mode 100644 index 0000000000..f4f5b611ea --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/VirtualCameraComponent.cs @@ -0,0 +1,17 @@ +using Cinemachine; +using CRDT; + +namespace DCL.SDKComponents.CameraControl.MainCamera.Components +{ + public struct VirtualCameraComponent + { + internal readonly CinemachineFreeLook virtualCameraInstance; + internal CRDTEntity? lookAtCRDTEntity; + + public VirtualCameraComponent(CinemachineFreeLook virtualCameraInstance, CRDTEntity? lookAtCRDTEntity) + { + this.virtualCameraInstance = virtualCameraInstance; + this.lookAtCRDTEntity = lookAtCRDTEntity; + } + } +} diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/VirtualCameraComponent.cs.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/VirtualCameraComponent.cs.meta new file mode 100644 index 0000000000..725e481abb --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Components/VirtualCameraComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0cebe89c4a954257a28726e1f8d63fa9 +timeCreated: 1723572936 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/DCL.MainCamera.asmref b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/DCL.MainCamera.asmref new file mode 100644 index 0000000000..b24e4ef9e3 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/DCL.MainCamera.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:fc4fd35fb877e904d8cedee73b2256f6" +} \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/DCL.MainCamera.asmref.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/DCL.MainCamera.asmref.meta new file mode 100644 index 0000000000..2d225f10d8 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/DCL.MainCamera.asmref.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 650bcc1acf71412aa223d0474766a5f1 +timeCreated: 1723840367 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Prefab.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Prefab.meta new file mode 100644 index 0000000000..b4357068a2 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 63c9f5300c70e4926acd599350fe7485 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Prefab/SDKVirtualCamera.prefab b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Prefab/SDKVirtualCamera.prefab new file mode 100644 index 0000000000..0e0c362693 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Prefab/SDKVirtualCamera.prefab @@ -0,0 +1,840 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &618923738586178968 +GameObject: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4395691840113929712} + - component: {fileID: 5039505735535168572} + m_Layer: 0 + m_Name: MiddleRig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4395691840113929712 +Transform: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 618923738586178968} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8468339473951427322} + m_Father: {fileID: 5837039344891174189} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5039505735535168572 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 618923738586178968} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ExcludedPropertiesInInspector: + - m_Script + - Header + - Extensions + - m_Priority + - m_Transitions + - m_Follow + - m_StandbyUpdate + - m_Lens + m_LockStageInInspector: 00000000 + m_StreamingVersion: 20170927 + m_Priority: 10 + m_StandbyUpdate: 2 + m_LookAt: {fileID: 0} + m_Follow: {fileID: 0} + m_Lens: + FieldOfView: 60 + OrthographicSize: 10 + NearClipPlane: 0.1 + FarClipPlane: 5000 + Dutch: 0 + ModeOverride: 0 + LensShift: {x: 0, y: 0} + GateFit: 2 + FocusDistance: 10 + m_SensorSize: {x: 1, y: 1} + m_Transitions: + m_BlendHint: 0 + m_InheritPosition: 0 + m_OnCameraLive: + m_PersistentCalls: + m_Calls: [] + m_LegacyBlendHint: 0 + m_ComponentOwner: {fileID: 8468339473951427322} +--- !u!1 &1746142671282217821 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4803486008367974319} + - component: {fileID: 6410584058966597428} + m_Layer: 0 + m_Name: cm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4803486008367974319 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1746142671282217821} + serializedVersion: 2 + m_LocalRotation: {x: -0.50157475, y: 0.47938675, z: 0.52060527, w: 0.49757552} + m_LocalPosition: {x: -25.389223, y: -5.2360706, z: 71.997925} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5837039344891174189} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6410584058966597428 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1746142671282217821} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &2233138343575318307 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5837039344891174189} + - component: {fileID: 9032850463666660317} + m_Layer: 0 + m_Name: SDKVirtualCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5837039344891174189 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2233138343575318307} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4803486008367974319} + - {fileID: 4021239780412572009} + - {fileID: 4395691840113929712} + - {fileID: 8357676558453037950} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &9032850463666660317 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2233138343575318307} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 319d2fe34a804e245819465c9505ea59, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ExcludedPropertiesInInspector: + - m_Script + m_LockStageInInspector: + m_StreamingVersion: 20170927 + m_Priority: 99 + m_StandbyUpdate: 2 + m_LookAt: {fileID: 0} + m_Follow: {fileID: 0} + m_CommonLens: 1 + m_Lens: + FieldOfView: 60 + OrthographicSize: 10 + NearClipPlane: 0.1 + FarClipPlane: 5000 + Dutch: 0 + ModeOverride: 0 + LensShift: {x: 0, y: 0} + GateFit: 2 + FocusDistance: 10 + m_SensorSize: {x: 1, y: 1} + m_Transitions: + m_BlendHint: 0 + m_InheritPosition: 0 + m_OnCameraLive: + m_PersistentCalls: + m_Calls: [] + m_LegacyBlendHint: 0 + m_YAxis: + Value: 0.5 + m_SpeedMode: 1 + m_MaxSpeed: 0 + m_AccelTime: 0 + m_DecelTime: 0.066 + m_InputAxisName: + m_InputAxisValue: 0 + m_InvertInput: 1 + m_MinValue: 0 + m_MaxValue: 1 + m_Wrap: 0 + m_Recentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_YAxisRecentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_XAxis: + Value: 0 + m_SpeedMode: 1 + m_MaxSpeed: 0 + m_AccelTime: 0.1 + m_DecelTime: 0.15 + m_InputAxisName: + m_InputAxisValue: 0 + m_InvertInput: 0 + m_MinValue: -180 + m_MaxValue: 180 + m_Wrap: 1 + m_Recentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_Heading: + m_Definition: 2 + m_VelocityFilterStrength: 4 + m_Bias: 0 + m_RecenterToTargetHeading: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_BindingMode: 4 + m_SplineCurvature: 1 + m_Orbits: + - m_Height: 4.5 + m_Radius: 1.2 + - m_Height: 1 + m_Radius: 4.5 + - m_Height: -0.75 + m_Radius: 0.7 + m_LegacyHeadingBias: 3.4028235e+38 + m_Rigs: + - {fileID: -5968228240938601720} + - {fileID: 5039505735535168572} + - {fileID: 63572736302508003} +--- !u!1 &3414530217209372573 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8742126451388047955} + - component: {fileID: 3248680957067929302} + - component: {fileID: 2099012956959521356} + - component: {fileID: 3151963885314853936} + m_Layer: 0 + m_Name: cm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8742126451388047955 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3414530217209372573} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8357676558453037950} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3248680957067929302 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3414530217209372573} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &2099012956959521356 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3414530217209372573} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3} + m_Name: + m_EditorClassIdentifier: + m_BindingMode: 4 + m_FollowOffset: {x: 0, y: 1, z: -4.5} + m_XDamping: 1 + m_YDamping: 1 + m_ZDamping: 1 + m_AngularDampingMode: 0 + m_PitchDamping: 0 + m_YawDamping: 0 + m_RollDamping: 0 + m_AngularDamping: 0 + m_Heading: + m_Definition: 2 + m_VelocityFilterStrength: 4 + m_Bias: 0 + m_RecenterToTargetHeading: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_XAxis: + Value: 0 + m_SpeedMode: 0 + m_MaxSpeed: 300 + m_AccelTime: 0.1 + m_DecelTime: 0.1 + m_InputAxisName: + m_InputAxisValue: 0 + m_InvertInput: 1 + m_MinValue: -180 + m_MaxValue: 180 + m_Wrap: 1 + m_Recentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_LegacyRadius: 3.4028235e+38 + m_LegacyHeightOffset: 3.4028235e+38 + m_LegacyHeadingBias: 3.4028235e+38 + m_HeadingIsSlave: 1 +--- !u!114 &3151963885314853936 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3414530217209372573} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_TrackedObjectOffset: {x: 0, y: 0, z: 0} + m_LookaheadTime: 0 + m_LookaheadSmoothing: 0 + m_LookaheadIgnoreY: 0 + m_HorizontalDamping: 0 + m_VerticalDamping: 0 + m_ScreenX: 0.5 + m_ScreenY: 0.6 + m_DeadZoneWidth: 0 + m_DeadZoneHeight: 0 + m_SoftZoneWidth: 0.8 + m_SoftZoneHeight: 0.8 + m_BiasX: 0 + m_BiasY: 0 + m_CenterOnActivate: 1 +--- !u!1 &5097183580263081666 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1676441876830573709} + - component: {fileID: 1955751804835558071} + - component: {fileID: -8768991287495437718} + - component: {fileID: -2343323204154248159} + m_Layer: 0 + m_Name: cm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1676441876830573709 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5097183580263081666} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4021239780412572009} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1955751804835558071 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5097183580263081666} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &-8768991287495437718 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5097183580263081666} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3} + m_Name: + m_EditorClassIdentifier: + m_BindingMode: 4 + m_FollowOffset: {x: 0, y: 1, z: -4.5} + m_XDamping: 1 + m_YDamping: 1 + m_ZDamping: 1 + m_AngularDampingMode: 0 + m_PitchDamping: 0 + m_YawDamping: 0 + m_RollDamping: 0 + m_AngularDamping: 0 + m_Heading: + m_Definition: 2 + m_VelocityFilterStrength: 4 + m_Bias: 0 + m_RecenterToTargetHeading: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_XAxis: + Value: 0 + m_SpeedMode: 0 + m_MaxSpeed: 300 + m_AccelTime: 0.1 + m_DecelTime: 0.1 + m_InputAxisName: + m_InputAxisValue: 0 + m_InvertInput: 1 + m_MinValue: -180 + m_MaxValue: 180 + m_Wrap: 1 + m_Recentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_LegacyRadius: 3.4028235e+38 + m_LegacyHeightOffset: 3.4028235e+38 + m_LegacyHeadingBias: 3.4028235e+38 + m_HeadingIsSlave: 1 +--- !u!114 &-2343323204154248159 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5097183580263081666} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_TrackedObjectOffset: {x: 0, y: 0, z: 0} + m_LookaheadTime: 0 + m_LookaheadSmoothing: 0 + m_LookaheadIgnoreY: 0 + m_HorizontalDamping: 0 + m_VerticalDamping: 0 + m_ScreenX: 0.5 + m_ScreenY: 0.5 + m_DeadZoneWidth: 0 + m_DeadZoneHeight: 0 + m_SoftZoneWidth: 0.8 + m_SoftZoneHeight: 0.8 + m_BiasX: 0 + m_BiasY: 0 + m_CenterOnActivate: 1 +--- !u!1 &5284562793441101219 +GameObject: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8357676558453037950} + - component: {fileID: 63572736302508003} + m_Layer: 0 + m_Name: BottomRig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8357676558453037950 +Transform: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5284562793441101219} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8742126451388047955} + m_Father: {fileID: 5837039344891174189} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &63572736302508003 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5284562793441101219} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ExcludedPropertiesInInspector: + - m_Script + - Header + - Extensions + - m_Priority + - m_Transitions + - m_Follow + - m_StandbyUpdate + - m_Lens + m_LockStageInInspector: 00000000 + m_StreamingVersion: 20170927 + m_Priority: 10 + m_StandbyUpdate: 2 + m_LookAt: {fileID: 0} + m_Follow: {fileID: 0} + m_Lens: + FieldOfView: 60 + OrthographicSize: 10 + NearClipPlane: 0.1 + FarClipPlane: 5000 + Dutch: 0 + ModeOverride: 0 + LensShift: {x: 0, y: 0} + GateFit: 2 + FocusDistance: 10 + m_SensorSize: {x: 1, y: 1} + m_Transitions: + m_BlendHint: 0 + m_InheritPosition: 0 + m_OnCameraLive: + m_PersistentCalls: + m_Calls: [] + m_LegacyBlendHint: 0 + m_ComponentOwner: {fileID: 8742126451388047955} +--- !u!1 &6219325597999185339 +GameObject: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4021239780412572009} + - component: {fileID: -5968228240938601720} + m_Layer: 0 + m_Name: TopRig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4021239780412572009 +Transform: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6219325597999185339} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1676441876830573709} + m_Father: {fileID: 5837039344891174189} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-5968228240938601720 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6219325597999185339} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ExcludedPropertiesInInspector: + - m_Script + - Header + - Extensions + - m_Priority + - m_Transitions + - m_Follow + - m_StandbyUpdate + - m_Lens + m_LockStageInInspector: 00000000 + m_StreamingVersion: 20170927 + m_Priority: 10 + m_StandbyUpdate: 2 + m_LookAt: {fileID: 0} + m_Follow: {fileID: 0} + m_Lens: + FieldOfView: 60 + OrthographicSize: 10 + NearClipPlane: 0.1 + FarClipPlane: 5000 + Dutch: 0 + ModeOverride: 0 + LensShift: {x: 0, y: 0} + GateFit: 2 + FocusDistance: 10 + m_SensorSize: {x: 1, y: 1} + m_Transitions: + m_BlendHint: 0 + m_InheritPosition: 0 + m_OnCameraLive: + m_PersistentCalls: + m_Calls: [] + m_LegacyBlendHint: 0 + m_ComponentOwner: {fileID: 1676441876830573709} +--- !u!1 &8687801714487282222 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8468339473951427322} + - component: {fileID: 1478860591179928923} + - component: {fileID: -1228172242783831341} + - component: {fileID: 2926901025206369967} + m_Layer: 0 + m_Name: cm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8468339473951427322 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8687801714487282222} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4395691840113929712} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1478860591179928923 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8687801714487282222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &-1228172242783831341 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8687801714487282222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3} + m_Name: + m_EditorClassIdentifier: + m_BindingMode: 4 + m_FollowOffset: {x: 0, y: 1, z: -4.5} + m_XDamping: 1 + m_YDamping: 1 + m_ZDamping: 1 + m_AngularDampingMode: 0 + m_PitchDamping: 0 + m_YawDamping: 0 + m_RollDamping: 0 + m_AngularDamping: 0 + m_Heading: + m_Definition: 2 + m_VelocityFilterStrength: 4 + m_Bias: 0 + m_RecenterToTargetHeading: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_XAxis: + Value: 0 + m_SpeedMode: 0 + m_MaxSpeed: 300 + m_AccelTime: 0.1 + m_DecelTime: 0.1 + m_InputAxisName: + m_InputAxisValue: 0 + m_InvertInput: 1 + m_MinValue: -180 + m_MaxValue: 180 + m_Wrap: 1 + m_Recentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_LegacyRadius: 3.4028235e+38 + m_LegacyHeightOffset: 3.4028235e+38 + m_LegacyHeadingBias: 3.4028235e+38 + m_HeadingIsSlave: 1 +--- !u!114 &2926901025206369967 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8687801714487282222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3c9beda531928fc40968802117a5d256, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RecenterTarget: 0 + m_VerticalAxis: + Value: 0 + m_SpeedMode: 0 + m_MaxSpeed: 300 + m_AccelTime: 0.1 + m_DecelTime: 0.1 + m_InputAxisName: Mouse Y + m_InputAxisValue: 0 + m_InvertInput: 1 + m_MinValue: -70 + m_MaxValue: 70 + m_Wrap: 0 + m_Recentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_VerticalRecentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_HorizontalAxis: + Value: 0 + m_SpeedMode: 0 + m_MaxSpeed: 300 + m_AccelTime: 0.1 + m_DecelTime: 0.1 + m_InputAxisName: Mouse X + m_InputAxisValue: 0 + m_InvertInput: 0 + m_MinValue: -180 + m_MaxValue: 180 + m_Wrap: 1 + m_Recentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_HorizontalRecentering: + m_enabled: 0 + m_WaitTime: 1 + m_RecenteringTime: 2 + m_LegacyHeadingDefinition: -1 + m_LegacyVelocityFilterStrength: -1 + m_ApplyBeforeBody: 0 diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Prefab/SDKVirtualCamera.prefab.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Prefab/SDKVirtualCamera.prefab.meta new file mode 100644 index 0000000000..7bad4fcc61 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Prefab/SDKVirtualCamera.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4f24a591312ba473ab5ac65d6658cb94 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems.meta new file mode 100644 index 0000000000..460118e057 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: af59fbf18369462ab808765ececd4baa +timeCreated: 1723564689 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/MainCameraSystem.cs b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/MainCameraSystem.cs new file mode 100644 index 0000000000..9460bea3d7 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/MainCameraSystem.cs @@ -0,0 +1,201 @@ +using Arch.Core; +using Arch.System; +using Arch.SystemGroups; +using DCL.Diagnostics; +using Cinemachine; +using CRDT; +using DCL.CharacterCamera; +using DCL.ECSComponents; +using DCL.SDKComponents.CameraControl.MainCamera.Components; +using DCL.SDKComponents.CameraModeArea.Systems; +using ECS.Abstract; +using ECS.Groups; +using ECS.LifeCycle; +using ECS.LifeCycle.Components; +using SceneRunner.Scene; +using System.Collections.Generic; +using UnityEngine; + +namespace DCL.SDKComponents.CameraControl.MainCamera.Systems +{ + [UpdateInGroup(typeof(SyncedInitializationFixedUpdateThrottledGroup))] + [UpdateBefore(typeof(CameraModeAreaHandlerSystem))] + [LogCategory(ReportCategory.SDK_CAMERA)] + public partial class MainCameraSystem : BaseUnityLoopSystem, IFinalizeWorldSystem + { + private readonly IReadOnlyDictionary<CRDTEntity,Entity> entitiesMap; + private readonly Entity cameraEntity; + private readonly ISceneStateProvider sceneStateProvider; + private readonly IExposedCameraData cameraData; + private readonly World globalWorld; + private CameraMode lastNonSDKCameraMode; + + public MainCameraSystem( + World world, + Entity cameraEntity, + Dictionary<CRDTEntity,Entity> entitiesMap, + ISceneStateProvider sceneStateProvider, + IExposedCameraData cameraData, + World globalWorld) : base(world) + { + this.cameraEntity = cameraEntity; + this.entitiesMap = entitiesMap; + this.sceneStateProvider = sceneStateProvider; + this.cameraData = cameraData; + this.globalWorld = globalWorld; + } + + protected override void Update(float t) + { + SetupMainCameraQuery(World); + + HandleActiveVirtualCameraLookAtChangeQuery(World); + HandleVirtualCameraChangeQuery(World); + DisableVirtualCameraOnSceneLeaveQuery(World); + + HandleMainCameraRemovalQuery(World); + HandleMainCameraEntityDestructionQuery(World); + } + + [Query] + [None(typeof(DeleteEntityIntention))] + private void HandleVirtualCameraChange(Entity entity, ref MainCameraComponent mainCameraComponent, in PBMainCamera pbMainCamera) + { + if (entity != cameraEntity || !sceneStateProvider.IsCurrent) return; + + // The 'uint' pbMainCamera.VirtualCameraEntity at 0 represents the empty field + CRDTEntity? virtualCameraCRDTEntity = pbMainCamera.VirtualCameraEntity > 0 ? new CRDTEntity((int)pbMainCamera.VirtualCameraEntity) : null; + + // Cannot rely on pbComponent.IsDirty since the VirtualCamera may not yet be on the target CRDTEntity + // when the pbComponent is dirty and may have to be re-checked on subsequent updates. This can happen + // if the target entity/component hasn't been loaded/detected from CRDT yet. + if (mainCameraComponent.virtualCameraCRDTEntity.HasValue && virtualCameraCRDTEntity.HasValue && + mainCameraComponent.virtualCameraCRDTEntity.Value.Id == virtualCameraCRDTEntity.Value.Id && + (mainCameraComponent.virtualCameraInstance == null || mainCameraComponent.virtualCameraInstance.enabled)) + return; + + mainCameraComponent.virtualCameraCRDTEntity = virtualCameraCRDTEntity; + + CinemachineFreeLook? previousVirtualCamera = mainCameraComponent.virtualCameraInstance; + bool hasPreviousVirtualCamera = previousVirtualCamera != null && previousVirtualCamera.enabled; + if (virtualCameraCRDTEntity.HasValue) + { + Vector3 cinemachineCurrentActiveCamPos = cameraData.CinemachineBrain!.ActiveVirtualCamera.VirtualCameraGameObject.transform.position; + ApplyVirtualCamera( + ref mainCameraComponent, + virtualCameraCRDTEntity.Value, + hasPreviousVirtualCamera ? previousVirtualCamera!.transform.position : cinemachineCurrentActiveCamPos + ); + } + else + { + mainCameraComponent.virtualCameraInstance = null; + } + + if (hasPreviousVirtualCamera) + previousVirtualCamera!.enabled = false; + + UpdateGlobalWorldCameraMode(mainCameraComponent.virtualCameraInstance != null); + } + + [Query] + [None(typeof(DeleteEntityIntention))] + private void HandleActiveVirtualCameraLookAtChange(CRDTEntity crdtEntity, in PBVirtualCamera pbVirtualCamera, ref VirtualCameraComponent virtualCameraComponent) + { + if (!sceneStateProvider.IsCurrent || cameraData.CinemachineBrain!.ActiveVirtualCamera.VirtualCameraGameObject != virtualCameraComponent.virtualCameraInstance.gameObject) return; + + CRDTEntity? pbVirtualCameraLookAtEntity = VirtualCameraUtils.GetPBVirtualCameraLookAtCRDTEntity(pbVirtualCamera, crdtEntity); + + if (pbVirtualCameraLookAtEntity.Equals(virtualCameraComponent.lookAtCRDTEntity)) return; + + virtualCameraComponent.lookAtCRDTEntity = pbVirtualCameraLookAtEntity; + VirtualCameraUtils.ConfigureCameraLookAt(World, entitiesMap, virtualCameraComponent); + } + + [Query] + private void DisableVirtualCameraOnSceneLeave(in MainCameraComponent mainCameraComponent) + { + if (sceneStateProvider.IsCurrent) return; + + DisableActiveVirtualCamera(mainCameraComponent); + } + + [Query] + [All(typeof(PBMainCamera))] + [None(typeof(MainCameraComponent), typeof(DeleteEntityIntention))] + private void SetupMainCamera(Entity entity) + { + if (!sceneStateProvider.IsCurrent || entity != cameraEntity) return; + + World.Add(entity, new MainCameraComponent()); + } + + [Query] + [None(typeof(DeleteEntityIntention), typeof(PBMainCamera))] + private void HandleMainCameraRemoval(Entity entity, in MainCameraComponent component) + { + DisableActiveVirtualCamera(component); + World.Remove<MainCameraComponent>(entity); + } + + [Query] + [All(typeof(DeleteEntityIntention))] + private void HandleMainCameraEntityDestruction(in MainCameraComponent component) + { + DisableActiveVirtualCamera(component); + } + + [Query] + private void FinalizeMainCameraComponent(in MainCameraComponent mainCameraComponent) + { + DisableActiveVirtualCamera(mainCameraComponent); + } + + public void FinalizeComponents(in Query query) + { + FinalizeMainCameraComponentQuery(World); + } + + private void ApplyVirtualCamera(ref MainCameraComponent mainCameraComponent, CRDTEntity virtualCamCRDTEntity, Vector3? previousCameraPosition) + { + if (!VirtualCameraUtils.TryGetVirtualCameraComponent(World, entitiesMap, virtualCamCRDTEntity, out var virtualCameraComponent)) return; + + var virtualCameraInstance = virtualCameraComponent!.Value.virtualCameraInstance; + + VirtualCameraUtils.ConfigureVirtualCameraTransition(World, entitiesMap, cameraData, virtualCamCRDTEntity, + previousCameraPosition.HasValue ? Vector3.Distance(virtualCameraInstance.transform.position, previousCameraPosition.Value) : 0f); + + VirtualCameraUtils.ConfigureCameraLookAt(World, entitiesMap, virtualCameraComponent.Value); + + mainCameraComponent.virtualCameraCRDTEntity = virtualCamCRDTEntity; + mainCameraComponent.virtualCameraInstance = virtualCameraInstance; + virtualCameraInstance.enabled = true; + } + + private void UpdateGlobalWorldCameraMode(bool isAnyVirtualCameraActive) + { + var cameraComponent = globalWorld.Get<CameraComponent>(cameraData.CameraEntityProxy.Object); + if (isAnyVirtualCameraActive) + { + if (cameraComponent.Mode != CameraMode.SDKCamera) + { + lastNonSDKCameraMode = cameraComponent.Mode; + cameraComponent.Mode = CameraMode.SDKCamera; + } + } + else if (cameraComponent.Mode == CameraMode.SDKCamera) + { + cameraComponent.Mode = lastNonSDKCameraMode; + } + globalWorld.Set(cameraData.CameraEntityProxy.Object, cameraComponent); + } + + private void DisableActiveVirtualCamera(in MainCameraComponent mainCameraComponent) + { + if (mainCameraComponent.virtualCameraInstance != null && mainCameraComponent.virtualCameraInstance.enabled) + mainCameraComponent.virtualCameraInstance.enabled = false; + + UpdateGlobalWorldCameraMode(false); + } + } +} diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/MainCameraSystem.cs.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/MainCameraSystem.cs.meta new file mode 100644 index 0000000000..e89c2e0bd0 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/MainCameraSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fdabd2ddfc434dda81722a669a054474 +timeCreated: 1723572990 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/VirtualCameraSystem.cs b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/VirtualCameraSystem.cs new file mode 100644 index 0000000000..20ebead099 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/VirtualCameraSystem.cs @@ -0,0 +1,86 @@ +using Arch.Core; +using Arch.System; +using Arch.SystemGroups; +using DCL.Diagnostics; +using Cinemachine; +using CRDT; +using DCL.ECSComponents; +using DCL.Optimization.Pools; +using DCL.SDKComponents.CameraControl.MainCamera.Components; +using ECS.Abstract; +using ECS.Groups; +using ECS.LifeCycle; +using ECS.LifeCycle.Components; +using ECS.Unity.Transforms.Components; +using SceneRunner.Scene; +using UnityEngine; + +namespace DCL.SDKComponents.CameraControl.MainCamera.Systems +{ + [UpdateInGroup(typeof(SyncedInitializationFixedUpdateThrottledGroup))] + [UpdateBefore(typeof(MainCameraSystem))] + [LogCategory(ReportCategory.SDK_CAMERA)] + public partial class VirtualCameraSystem : BaseUnityLoopSystem, IFinalizeWorldSystem + { + private readonly IComponentPool<CinemachineFreeLook> poolRegistry; + private readonly ISceneStateProvider sceneStateProvider; + + public VirtualCameraSystem( + World world, + IComponentPool<CinemachineFreeLook> poolRegistry, + ISceneStateProvider sceneStateProvider) : base(world) + { + this.poolRegistry = poolRegistry; + this.sceneStateProvider = sceneStateProvider; + } + + protected override void Update(float t) + { + SetupVirtualCameraQuery(World); + + HandleVirtualCameraRemovalQuery(World); + HandleVirtualCameraEntityDestructionQuery(World); + } + + [Query] + [None(typeof(VirtualCameraComponent), typeof(DeleteEntityIntention))] + private void SetupVirtualCamera(Entity entity, CRDTEntity crdtEntity, in PBVirtualCamera pbVirtualCamera, in TransformComponent transform) + { + if (!sceneStateProvider.IsCurrent) return; + + var virtualCameraInstance = poolRegistry.Get(); + virtualCameraInstance.transform.SetParent(transform.Transform); + virtualCameraInstance.transform.localPosition = Vector3.zero; + virtualCameraInstance.transform.localRotation = Quaternion.identity; + World.Add(entity, new VirtualCameraComponent(virtualCameraInstance, VirtualCameraUtils.GetPBVirtualCameraLookAtCRDTEntity(pbVirtualCamera, crdtEntity))); + } + + [Query] + [None(typeof(DeleteEntityIntention), typeof(PBVirtualCamera))] + private void HandleVirtualCameraRemoval(Entity entity, in VirtualCameraComponent component) + { + component.virtualCameraInstance.enabled = false; + poolRegistry.Release(component.virtualCameraInstance); + World.Remove<VirtualCameraComponent>(entity); + } + + [Query] + [All(typeof(DeleteEntityIntention))] + private void HandleVirtualCameraEntityDestruction(in VirtualCameraComponent component) + { + component.virtualCameraInstance.enabled = false; + poolRegistry.Release(component.virtualCameraInstance); + } + + [Query] + private void FinalizeVirtualCameraComponents(in VirtualCameraComponent virtualCameraComponent) + { + poolRegistry.Release(virtualCameraComponent.virtualCameraInstance); + } + + public void FinalizeComponents(in Query query) + { + FinalizeVirtualCameraComponentsQuery(World); + } + } +} diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/VirtualCameraSystem.cs.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/VirtualCameraSystem.cs.meta new file mode 100644 index 0000000000..43b8387692 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Systems/VirtualCameraSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2cb2c565d64944ebb6875fbc76752b49 +timeCreated: 1725401522 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Tests.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Tests.meta new file mode 100644 index 0000000000..831288aea7 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Tests.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 43c7ff12faf040efb81b8f52ac30f8a4 +timeCreated: 1723564693 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Tests/MainCamera.Tests.asmref b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Tests/MainCamera.Tests.asmref new file mode 100644 index 0000000000..f940d4589d --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Tests/MainCamera.Tests.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:da80994a355e49d5b84f91c0a84a721f" +} \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Tests/MainCamera.Tests.asmref.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Tests/MainCamera.Tests.asmref.meta new file mode 100644 index 0000000000..e49458e4d0 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/Tests/MainCamera.Tests.asmref.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d4621a2f88e0491bbf080f682e814d8b +timeCreated: 1723572875 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/VirtualCameraUtils.cs b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/VirtualCameraUtils.cs new file mode 100644 index 0000000000..024b82a1db --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/VirtualCameraUtils.cs @@ -0,0 +1,85 @@ +using Arch.Core; +using Cinemachine; +using CRDT; +using CrdtEcsBridge.Components; +using DCL.CharacterCamera; +using DCL.ECSComponents; +using DCL.SDKComponents.CameraControl.MainCamera.Components; +using ECS.Unity.Transforms.Components; +using System.Collections.Generic; + +namespace DCL.SDKComponents.CameraControl.MainCamera +{ + public static class VirtualCameraUtils + { + private const float MINIMUM_LOOK_AT_DISTANCE_SQR = 0.25f * 0.25f; + + public static bool TryGetVirtualCameraComponent(in World world, IReadOnlyDictionary<CRDTEntity,Entity> entitiesMap, CRDTEntity targetCRDTEntity, out VirtualCameraComponent? returnComponent) + { + returnComponent = null; + if (!entitiesMap.TryGetValue(targetCRDTEntity, out Entity virtualCameraEntity) + || !world.TryGet(virtualCameraEntity, out VirtualCameraComponent virtualCameraComponent)) + return false; + + returnComponent = virtualCameraComponent; + + return true; + } + + public static CRDTEntity? GetPBVirtualCameraLookAtCRDTEntity(in PBVirtualCamera pbVirtualCamera, CRDTEntity virtualCameraCRDTEntity) + { + if (pbVirtualCamera.HasLookAtEntity) + { + int targetEntity = (int)pbVirtualCamera.LookAtEntity; + if (targetEntity != SpecialEntitiesID.CAMERA_ENTITY && targetEntity != virtualCameraCRDTEntity.Id) + return new CRDTEntity(targetEntity); + } + + return null; + } + + public static void ConfigureVirtualCameraTransition(in World world, IReadOnlyDictionary<CRDTEntity,Entity> entitiesMap, IExposedCameraData cameraData, CRDTEntity virtualCamCRDTEntity, float distanceBetweenCameras) + { + var pbVirtualCamera = world.Get<PBVirtualCamera>(entitiesMap[virtualCamCRDTEntity]); + + // Using custom blends array doesn't work because there's no direct way of getting the custom blend index, + // and we would have to hardcode it... + if (pbVirtualCamera.DefaultTransition.TransitionModeCase == CameraTransition.TransitionModeOneofCase.Time) + { + float timeValue = pbVirtualCamera.DefaultTransition.Time; + cameraData.CinemachineBrain!.m_DefaultBlend.m_Time = timeValue; + cameraData.CinemachineBrain!.m_DefaultBlend.m_Style = timeValue <= 0 ? CinemachineBlendDefinition.Style.Cut : CinemachineBlendDefinition.Style.EaseInOut; + } + else + { + float speedValue = pbVirtualCamera.DefaultTransition.Speed; + cameraData.CinemachineBrain!.m_DefaultBlend.m_Style = speedValue <= 0 ? CinemachineBlendDefinition.Style.Cut : CinemachineBlendDefinition.Style.EaseInOut; + + // SPEED = 1 -> 1 meter per second + float blendTime = distanceBetweenCameras / speedValue; + if (blendTime == 0) + cameraData.CinemachineBrain!.m_DefaultBlend.m_Style = CinemachineBlendDefinition.Style.Cut; + else + cameraData.CinemachineBrain!.m_DefaultBlend.m_Time = blendTime; + } + } + + public static void ConfigureCameraLookAt(in World world, IReadOnlyDictionary<CRDTEntity,Entity> entitiesMap, in VirtualCameraComponent virtualCameraComponent) + { + var rig = virtualCameraComponent.virtualCameraInstance.GetRig(1); // Middle (Aiming) Rig + if (virtualCameraComponent.lookAtCRDTEntity.HasValue && + entitiesMap.TryGetValue(virtualCameraComponent.lookAtCRDTEntity.Value, out Entity lookAtEntity) + && world.TryGet(lookAtEntity, out TransformComponent transformComponent) + && (virtualCameraComponent.virtualCameraInstance.transform.position - transformComponent.Transform.position).sqrMagnitude >= MINIMUM_LOOK_AT_DISTANCE_SQR) + { + virtualCameraComponent.virtualCameraInstance.m_LookAt = transformComponent.Transform; + rig.AddCinemachineComponent<CinemachineHardLookAt>(); + } + else + { + rig.AddCinemachineComponent<CinemachinePOV>(); + virtualCameraComponent.virtualCameraInstance.m_LookAt = null; + } + } + } +} diff --git a/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/VirtualCameraUtils.cs.meta b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/VirtualCameraUtils.cs.meta new file mode 100644 index 0000000000..72a01bf88b --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/CameraControl/MainCamera/VirtualCameraUtils.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7074e895655e41f292ad8831b6c64ba7 +timeCreated: 1725402336 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/DCL.SDKComponents.asmdef b/Explorer/Assets/DCL/SDKComponents/DCL.SDKComponents.asmdef index 38122814b6..02734397e7 100644 --- a/Explorer/Assets/DCL/SDKComponents/DCL.SDKComponents.asmdef +++ b/Explorer/Assets/DCL/SDKComponents/DCL.SDKComponents.asmdef @@ -6,7 +6,6 @@ "GUID:275e22790c04e9b47a5085d7b0c4432a", "GUID:4794e238ed0f65142a4aea5848b513e5", "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", "GUID:d0ec51c740809fd4680d3ea27279dca7", "GUID:166b65e6dfc848bb9fb075f53c293a38", diff --git a/Explorer/Assets/DCL/SDKComponents/InputModifier.meta b/Explorer/Assets/DCL/SDKComponents/InputModifier.meta new file mode 100644 index 0000000000..df0e8ef9b5 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/InputModifier.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 88c8c6c1e4bc48918bc2d549d78e3490 +timeCreated: 1724087973 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Character/MovementBlocker/Components.meta b/Explorer/Assets/DCL/SDKComponents/InputModifier/Components.meta similarity index 100% rename from Explorer/Assets/DCL/Character/MovementBlocker/Components.meta rename to Explorer/Assets/DCL/SDKComponents/InputModifier/Components.meta diff --git a/Explorer/Assets/DCL/SDKComponents/InputModifier/Components/InputModifierComponent.cs b/Explorer/Assets/DCL/SDKComponents/InputModifier/Components/InputModifierComponent.cs new file mode 100644 index 0000000000..b4a562fea7 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/InputModifier/Components/InputModifierComponent.cs @@ -0,0 +1,89 @@ +namespace DCL.SDKComponents.InputModifier.Components +{ + /// <summary> + /// Allows systems to modify different aspects of the player input. + /// </summary> + public struct InputModifierComponent + { + private bool disableAll; + private bool disableWalk; + private bool disableJog; + private bool disableRun; + private bool disableJump; + private bool disableEmote; + + /// <summary> + /// When set to true, disables all related properties (Walk, Jog, Run, Jump, Emote). + /// When set to false, only this property is affected. + /// </summary> + public bool DisableAll + { + get => disableAll; + + set + { + disableAll = value; + disableWalk = value; + disableJog = value; + disableRun = value; + disableJump = value; + disableEmote = value; + } + } + + /// <summary> + /// Gets or sets the DisableWalk property. + /// <para>Get: Returns true if DisableAll is true or if DisableWalk is explicitly set to true.</para> + /// <para>Set: Explicitly sets the DisableWalk property to the given value.</para> + /// </summary> + public bool DisableWalk + { + get => disableAll || disableWalk; + set => disableWalk = value; + } + + /// <summary> + /// Gets or sets the DisableJog property. + /// <para>Get: Returns true if DisableAll is true or if DisableJog is explicitly set to true.</para> + /// <para>Set: Explicitly sets the DisableJog property to the given value.</para> + /// </summary> + public bool DisableJog + { + get => disableAll || disableJog; + set => disableJog = value; + } + + /// <summary> + /// Gets or sets the DisableRun property. + /// <para>Get: Returns true if DisableAll is true or if DisableRun is explicitly set to true.</para> + /// <para>Set: Explicitly sets the DisableRun property to the given value.</para> + /// </summary> + public bool DisableRun + { + get => disableAll || disableRun; + set => disableRun = value; + } + + /// <summary> + /// Gets or sets the DisableJump property. + /// <para>Get: Returns true if DisableAll is true or if DisableJump is explicitly set to true.</para> + /// <para>Set: Explicitly sets the DisableJump property to the given value.</para> + /// </summary> + public bool DisableJump + { + get => disableAll || disableJump; + set => disableJump = value; + } + + /// <summary> + /// Gets or sets the DisableEmote property. + /// <para>Get: Returns true if DisableAll is true or if DisableEmote is explicitly set to true.</para> + /// <para>Set: Explicitly sets the DisableEmote property to the given value.</para> + /// </summary> + public bool DisableEmote + { + get => disableAll || disableEmote; + set => disableEmote = value; + } + } +} diff --git a/Explorer/Assets/DCL/SDKComponents/InputModifier/Components/InputModifierComponent.cs.meta b/Explorer/Assets/DCL/SDKComponents/InputModifier/Components/InputModifierComponent.cs.meta new file mode 100644 index 0000000000..e7377371ba --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/InputModifier/Components/InputModifierComponent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 215191b01ccd45609b32c1438a7ec435 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems.meta b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems.meta new file mode 100644 index 0000000000..6ab84507d6 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cb4187a0ea124382a84173bc6cc2a98d +timeCreated: 1724183367 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/DCL.InputModifier.Systems.asmref b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/DCL.InputModifier.Systems.asmref new file mode 100644 index 0000000000..b24e4ef9e3 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/DCL.InputModifier.Systems.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:fc4fd35fb877e904d8cedee73b2256f6" +} \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/DCL.InputModifier.Systems.asmref.meta b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/DCL.InputModifier.Systems.asmref.meta new file mode 100644 index 0000000000..80ed6be598 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/DCL.InputModifier.Systems.asmref.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5879ce12a2ad11c429794b78710df165 +AssemblyDefinitionReferenceImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/InputModifierHandlerSystem.cs b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/InputModifierHandlerSystem.cs new file mode 100644 index 0000000000..a1e8b8c7b2 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/InputModifierHandlerSystem.cs @@ -0,0 +1,71 @@ +using Arch.Core; +using Arch.System; +using Arch.SystemGroups; +using DCL.ECSComponents; +using DCL.SDKComponents.InputModifier.Components; +using ECS.Abstract; +using ECS.Groups; +using ECS.LifeCycle; +using SceneRunner.Scene; + +namespace DCL.SDKComponents.PlayerInputMovement.Systems +{ + [UpdateInGroup(typeof(SyncedInitializationSystemGroup))] + public partial class InputModifierHandlerSystem : BaseUnityLoopSystem, ISceneIsCurrentListener + { + private readonly Entity playerEntity; + private readonly World globalWorld; + private readonly ISceneStateProvider sceneStateProvider; + + public InputModifierHandlerSystem(World world, World globalWorld, Entity playerEntity, ISceneStateProvider sceneStateProvider) : base(world) + { + this.playerEntity = playerEntity; + this.sceneStateProvider = sceneStateProvider; + this.globalWorld = globalWorld; + } + + protected override void Update(float t) + { + ApplyModifiersQuery(World); + } + + private void ResetModifiersOnLeave() + { + ref InputModifierComponent inputModifier = ref globalWorld.Get<InputModifierComponent>(playerEntity); + inputModifier.DisableAll = false; + inputModifier.DisableWalk = false; + inputModifier.DisableJog = false; + inputModifier.DisableRun = false; + inputModifier.DisableJump = false; + inputModifier.DisableEmote = false; + } + + [Query] + private void ApplyModifiers(in PBInputModifier pbInputModifier) + { + if (!sceneStateProvider.IsCurrent) return; + if(pbInputModifier.ModeCase == PBInputModifier.ModeOneofCase.None) return; + + ref var inputModifier = ref globalWorld.Get<InputModifierComponent>(playerEntity); + PBInputModifier.Types.StandardInput? pb = pbInputModifier.Standard; + + bool disableAll = pb.DisableAll; + inputModifier.DisableAll = disableAll; + + if (!disableAll) + { + inputModifier.DisableWalk = pb.DisableWalk; + inputModifier.DisableJog = pb.DisableJog; + inputModifier.DisableRun = pb.DisableRun; + inputModifier.DisableJump = pb.DisableJump; + inputModifier.DisableEmote = pb.DisableEmote; + } + } + + public void OnSceneIsCurrentChanged(bool value) + { + if (!value) + ResetModifiersOnLeave(); + } + } +} diff --git a/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/InputModifierHandlerSystem.cs.meta b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/InputModifierHandlerSystem.cs.meta new file mode 100644 index 0000000000..5770fe3e22 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/InputModifierHandlerSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e172872c3486441ea4f461f8ee2ce478 +timeCreated: 1724183388 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/MediaStream/DCL.MediaPlayer.asmdef b/Explorer/Assets/DCL/SDKComponents/MediaStream/DCL.MediaPlayer.asmdef index d476b6d963..3679c16263 100644 --- a/Explorer/Assets/DCL/SDKComponents/MediaStream/DCL.MediaPlayer.asmdef +++ b/Explorer/Assets/DCL/SDKComponents/MediaStream/DCL.MediaPlayer.asmdef @@ -16,7 +16,6 @@ "GUID:d414ef88f3b15f746a4b97636b50dfb4", "GUID:3c7b57a14671040bd8c549056adc04f5", "GUID:0f4c0f120707fb74497f5d581b9858f8", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:166b65e6dfc848bb9fb075f53c293a38", "GUID:8322ea9340a544c59ddc56d4793eac74", "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", diff --git a/Explorer/Assets/DCL/SDKComponents/MediaStream/OpenMediaPromise.cs b/Explorer/Assets/DCL/SDKComponents/MediaStream/OpenMediaPromise.cs index 3788e79ced..b20c8384f5 100644 --- a/Explorer/Assets/DCL/SDKComponents/MediaStream/OpenMediaPromise.cs +++ b/Explorer/Assets/DCL/SDKComponents/MediaStream/OpenMediaPromise.cs @@ -21,13 +21,13 @@ internal enum Status public bool IsResolved => status == Status.Resolved; - public async UniTask UrlReachabilityResolveAsync(IWebRequestController webRequestController, string url, CancellationToken ct) + public async UniTask UrlReachabilityResolveAsync(IWebRequestController webRequestController, string url, ReportData reportData, CancellationToken ct) { status = Status.Pending; isReachable = false; this.url = url; - isReachable = await webRequestController.IsReachableAsync(URLAddress.FromString(this.url), ct); + isReachable = await webRequestController.IsReachableAsync(reportData, URLAddress.FromString(this.url), ct); ReportHub.Log(ReportCategory.MEDIA_STREAM, $"Resource <{url}> isReachable = <{isReachable}>"); status = Status.Resolved; diff --git a/Explorer/Assets/DCL/SDKComponents/MediaStream/Systems/CreateMediaPlayerSystem.cs b/Explorer/Assets/DCL/SDKComponents/MediaStream/Systems/CreateMediaPlayerSystem.cs index 337f328072..89239e7764 100644 --- a/Explorer/Assets/DCL/SDKComponents/MediaStream/Systems/CreateMediaPlayerSystem.cs +++ b/Explorer/Assets/DCL/SDKComponents/MediaStream/Systems/CreateMediaPlayerSystem.cs @@ -68,7 +68,7 @@ private void CreateMediaPlayer(Entity entity, string url, bool hasVolume, float MediaPlayerComponent component = CreateMediaPlayerComponent(entity, url, hasVolume, volume); if (component.State != VideoState.VsError) - component.OpenMediaPromise.UrlReachabilityResolveAsync(webRequestController, component.URL, component.Cts.Token).SuppressCancellationThrow().Forget(); + component.OpenMediaPromise.UrlReachabilityResolveAsync(webRequestController, component.URL, GetReportData(), component.Cts.Token).SuppressCancellationThrow().Forget(); World.Add(entity, component); } diff --git a/Explorer/Assets/DCL/SDKComponents/MediaStream/Systems/UpdateMediaPlayerSystem.cs b/Explorer/Assets/DCL/SDKComponents/MediaStream/Systems/UpdateMediaPlayerSystem.cs index 1d44609f91..d8fa6bdfb4 100644 --- a/Explorer/Assets/DCL/SDKComponents/MediaStream/Systems/UpdateMediaPlayerSystem.cs +++ b/Explorer/Assets/DCL/SDKComponents/MediaStream/Systems/UpdateMediaPlayerSystem.cs @@ -106,7 +106,7 @@ private void HandleComponentChange(ref MediaPlayerComponent component, IDirtyMar if (component.State != VideoState.VsError) { component.Cts = component.Cts.SafeRestart(); - component.OpenMediaPromise.UrlReachabilityResolveAsync(webRequestController, component.URL, component.Cts.Token).Forget(); + component.OpenMediaPromise.UrlReachabilityResolveAsync(webRequestController, component.URL, GetReportData(), component.Cts.Token).Forget(); } } else if (component.State != VideoState.VsError) diff --git a/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/DCL.MediaPlayer.PluginWrapper.asmdef b/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/DCL.MediaPlayer.PluginWrapper.asmdef index d2bf10c924..1c045db21e 100644 --- a/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/DCL.MediaPlayer.PluginWrapper.asmdef +++ b/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/DCL.MediaPlayer.PluginWrapper.asmdef @@ -16,7 +16,8 @@ "GUID:3c7b57a14671040bd8c549056adc04f5", "GUID:3ca842002c51d0a43b73e45298809a13", "GUID:46c2e553ecab9ff4784aee64075136c9", - "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3" + "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", + "GUID:543b8f091a5947a3880b7f2bca2358bd" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/csc.rsp b/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/csc.rsp.meta b/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/csc.rsp.meta new file mode 100644 index 0000000000..f150fcf955 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/MediaStream/Wrapper/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a7b08ccaba7f40c6a2446311e718acee +timeCreated: 1724257021 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/MediaStream/csc.rsp b/Explorer/Assets/DCL/SDKComponents/MediaStream/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/MediaStream/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/MediaStream/csc.rsp.meta b/Explorer/Assets/DCL/SDKComponents/MediaStream/csc.rsp.meta new file mode 100644 index 0000000000..3d74c16192 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/MediaStream/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6925ffbef08541b9ba2ff30a0c374310 +timeCreated: 1724256939 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/NFTShape/System/InstantiateNftShapeSystem.cs b/Explorer/Assets/DCL/SDKComponents/NFTShape/System/InstantiateNftShapeSystem.cs index b8890219e4..2cab7b0748 100644 --- a/Explorer/Assets/DCL/SDKComponents/NFTShape/System/InstantiateNftShapeSystem.cs +++ b/Explorer/Assets/DCL/SDKComponents/NFTShape/System/InstantiateNftShapeSystem.cs @@ -73,6 +73,7 @@ private void ReconfigureNftShape(Entity entity, PBNftShape pbNftShape, ref NftSh changedNftShapes.Add(entity, nftShapeRendererComponent); loadingComponent.Promise.ForgetLoading(World); World.Remove<NFTLoadingComponent>(entity); + } private NftShapeRendererComponent NewNftShapeRendererComponent(in TransformComponent transform, in PBNftShape nftShape) diff --git a/Explorer/Assets/DCL/SDKComponents/SceneUI/Systems/UITransform/UITransformParentingSystem.cs b/Explorer/Assets/DCL/SDKComponents/SceneUI/Systems/UITransform/UITransformParentingSystem.cs index 6144ffff2f..210241a21d 100644 --- a/Explorer/Assets/DCL/SDKComponents/SceneUI/Systems/UITransform/UITransformParentingSystem.cs +++ b/Explorer/Assets/DCL/SDKComponents/SceneUI/Systems/UITransform/UITransformParentingSystem.cs @@ -54,7 +54,7 @@ private void OrphanChildrenOfDeletedEntity(CRDTEntity sdkEntity, ref UITransform if (!exists) { - ReportHub.LogError(GetReportCategory(), $"Trying to unparent an ${nameof(UITransformComponent)}'s child but no component has been found on entity {current.EntityId}"); + ReportHub.LogError(GetReportData(), $"Trying to unparent an ${nameof(UITransformComponent)}'s child but no component has been found on entity {current.EntityId}"); continue; } @@ -90,7 +90,7 @@ private void SetNewChild(ref UITransformComponent childComponent, CRDTEntity chi if (!World.IsAlive(parentEntity)) { - ReportHub.LogError(GetReportCategory(), $"Trying to parent entity {childEntity} to a dead entity parent"); + ReportHub.LogError(GetReportData(), $"Trying to parent entity {childEntity} to a dead entity parent"); return; } @@ -98,7 +98,7 @@ private void SetNewChild(ref UITransformComponent childComponent, CRDTEntity chi if (!exists) { - ReportHub.LogError(GetReportCategory(), $"Trying to parent entity {childEntity} to a parent {parentEntity} that do not have ${nameof(UITransformComponent)} component"); + ReportHub.LogError(GetReportData(), $"Trying to parent entity {childEntity} to a parent {parentEntity} that do not have ${nameof(UITransformComponent)} component"); return; } @@ -116,7 +116,7 @@ private void RemoveFromParent(UITransformComponent childComponent, CRDTEntity ch if (!exists) { - ReportHub.LogError(GetReportCategory(), $"Trying to remove a child from a parent {childComponent.RelationData.parent.Entity} that do not have ${nameof(UITransformComponent)} component"); + ReportHub.LogError(GetReportData(), $"Trying to remove a child from a parent {childComponent.RelationData.parent.Entity} that do not have ${nameof(UITransformComponent)} component"); return; } diff --git a/Explorer/Assets/DCL/SDKComponents/SceneUI/Utils/Extensions.cs b/Explorer/Assets/DCL/SDKComponents/SceneUI/Utils/Extensions.cs index 26e98d0f6e..77ee46003c 100644 --- a/Explorer/Assets/DCL/SDKComponents/SceneUI/Utils/Extensions.cs +++ b/Explorer/Assets/DCL/SDKComponents/SceneUI/Utils/Extensions.cs @@ -4,7 +4,6 @@ using DCL.SDKComponents.SceneUI.Classes; using DCL.SDKComponents.SceneUI.Components; using Google.Protobuf.Collections; -using JetBrains.Annotations; using UnityEngine; using UnityEngine.UIElements; @@ -100,13 +99,13 @@ public static void RegisterInputCallbacks(this UIInputComponent uiInputComponent EventCallback<FocusInEvent> newOnFocusInCallback = evt => { evt.StopPropagation(); - inputBlock.Disable(InputMapComponent.Kind.Camera , InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Player); + inputBlock.Disable(InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.PLAYER); }; EventCallback<FocusOutEvent> newOnFocusOutCallback = evt => { evt.StopPropagation(); - inputBlock.Enable(InputMapComponent.Kind.Camera , InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Player); + inputBlock.Enable(InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.PLAYER); }; uiInputComponent.UnregisterInputCallbacks(); diff --git a/Explorer/Assets/DCL/SDKComponents/TextShape/TMPProSdkExtensions.cs b/Explorer/Assets/DCL/SDKComponents/TextShape/TMPProSdkExtensions.cs index 1f7f6b18b6..8798d6fd88 100644 --- a/Explorer/Assets/DCL/SDKComponents/TextShape/TMPProSdkExtensions.cs +++ b/Explorer/Assets/DCL/SDKComponents/TextShape/TMPProSdkExtensions.cs @@ -15,6 +15,8 @@ public static class TMPProSdkExtensions private static readonly int ID_UNDERLAY_SOFTNESS = Shader.PropertyToID("_UnderlaySoftness"); private static readonly int ID_UNDERLAY_OFFSET_Y = Shader.PropertyToID("_UnderlayOffsetY"); private static readonly int ID_UNDERLAY_OFFSET_X = Shader.PropertyToID("_UnderlayOffsetX"); + private const string OUTLINE_ON_KEYWORD = "OUTLINE_ON"; + private const string UNDERLAY_ON_KEYWORD = "UNDERLAY_ON"; public static void Apply(this TextMeshPro tmpText, PBTextShape textShape, IFontsStorage fontsStorage, MaterialPropertyBlock materialPropertyBlock) { @@ -54,25 +56,29 @@ public static void Apply(this TextMeshPro tmpText, PBTextShape textShape, IFonts tmpText.maxVisibleLines = textShape.HasLineCount && textShape.LineCount != 0 ? Mathf.Max(textShape.LineCount, 1) : int.MaxValue; tmpText.enableWordWrapping = textShape is { HasTextWrapping: true, TextWrapping: true } && !tmpText.enableAutoSizing; - tmpText.renderer.SetPropertyBlock( - materialPropertyBlock.Prepare(textShape)); - } - - private static MaterialPropertyBlock Prepare(this MaterialPropertyBlock materialPropertyBlock, PBTextShape textShape) - { - materialPropertyBlock.Clear(); - - // TODO (Vit) : Disable outline when if (textShape.OutlineWidth <= 0) - materialPropertyBlock.SetColor(ID_OUTLINE_COLOR, textShape.OutlineColor?.ToUnityColor() ?? Color.white); - materialPropertyBlock.SetFloat(ID_OUTLINE_WIDTH, textShape.OutlineWidth); + tmpText.renderer.GetPropertyBlock(materialPropertyBlock); - // TODO (Vit ): disable shadow when if (textShape.ShadowOffsetX == 0 || textShape.ShadowOffsetY == 0) - materialPropertyBlock.SetColor(ID_UNDERLAY_COLOR, textShape.ShadowColor?.ToUnityColor() ?? Color.white); - materialPropertyBlock.SetFloat(ID_UNDERLAY_SOFTNESS, textShape.ShadowBlur); - materialPropertyBlock.SetFloat(ID_UNDERLAY_OFFSET_X, textShape.ShadowOffsetX); - materialPropertyBlock.SetFloat(ID_UNDERLAY_OFFSET_Y, textShape.ShadowOffsetY); - - return materialPropertyBlock; + if (textShape.OutlineWidth > 0f) + { + tmpText.fontMaterial.EnableKeyword(OUTLINE_ON_KEYWORD); + materialPropertyBlock.SetColor(ID_OUTLINE_COLOR, textShape.OutlineColor?.ToUnityColor() ?? Color.white); + materialPropertyBlock.SetFloat(ID_OUTLINE_WIDTH, textShape.OutlineWidth); + } + else if (tmpText.fontMaterial.IsKeywordEnabled(OUTLINE_ON_KEYWORD)) + tmpText.fontMaterial.DisableKeyword(OUTLINE_ON_KEYWORD); + + if (textShape.ShadowOffsetX != 0 || textShape.ShadowOffsetY != 0) + { + tmpText.fontMaterial.EnableKeyword(UNDERLAY_ON_KEYWORD); + materialPropertyBlock.SetColor(ID_UNDERLAY_COLOR, textShape.ShadowColor?.ToUnityColor() ?? Color.white); + materialPropertyBlock.SetFloat(ID_UNDERLAY_SOFTNESS, textShape.ShadowBlur); + materialPropertyBlock.SetFloat(ID_UNDERLAY_OFFSET_X, textShape.ShadowOffsetX); + materialPropertyBlock.SetFloat(ID_UNDERLAY_OFFSET_Y, textShape.ShadowOffsetY); + } + else if (tmpText.fontMaterial.IsKeywordEnabled(UNDERLAY_ON_KEYWORD)) + tmpText.fontMaterial.DisableKeyword(UNDERLAY_ON_KEYWORD); + + tmpText.renderer.SetPropertyBlock(materialPropertyBlock); } private static TextAlignmentOptions TextAlignmentOptions(TextAlignMode mode) => diff --git a/Explorer/Assets/DCL/SDKComponents/csc.rsp b/Explorer/Assets/DCL/SDKComponents/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/SDKComponents/csc.rsp.meta b/Explorer/Assets/DCL/SDKComponents/csc.rsp.meta new file mode 100644 index 0000000000..180ab37407 --- /dev/null +++ b/Explorer/Assets/DCL/SDKComponents/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 47465fc7c2894b69a616a9340673ace0 +timeCreated: 1725955418 \ No newline at end of file diff --git a/Explorer/Assets/DCL/SceneLoadingScreens/DCL.SceneLoadingScreens.asmdef b/Explorer/Assets/DCL/SceneLoadingScreens/DCL.SceneLoadingScreens.asmdef index 6f294e4f45..bc60e6c5aa 100644 --- a/Explorer/Assets/DCL/SceneLoadingScreens/DCL.SceneLoadingScreens.asmdef +++ b/Explorer/Assets/DCL/SceneLoadingScreens/DCL.SceneLoadingScreens.asmdef @@ -20,7 +20,8 @@ "GUID:029c1c1b674aaae47a6841a0b89ad80e", "GUID:e7751264a6735a942a64770d71eb49e0", "GUID:d832748739a186646b8656bdbd447ad0", - "GUID:ac3295688c7c22745a96e6ac34718181" + "GUID:ac3295688c7c22745a96e6ac34718181", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/SceneLoadingScreens/SceneLoadingScreenController.cs b/Explorer/Assets/DCL/SceneLoadingScreens/SceneLoadingScreenController.cs index cc08c1e773..d812186536 100644 --- a/Explorer/Assets/DCL/SceneLoadingScreens/SceneLoadingScreenController.cs +++ b/Explorer/Assets/DCL/SceneLoadingScreens/SceneLoadingScreenController.cs @@ -262,12 +262,12 @@ private async UniTaskVoid RotateTipsOverTimeAsync(TimeSpan frequency, Cancellati private void BlockUnwantedInputs() { - inputBlock.Disable(InputMapComponent.Kind.Camera , InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Player); + inputBlock.Disable(InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.PLAYER); } private void UnblockUnwantedInputs() { - inputBlock.Enable(InputMapComponent.Kind.Camera , InputMapComponent.Kind.Shortcuts , InputMapComponent.Kind.Player); + inputBlock.Enable(InputMapComponent.Kind.CAMERA , InputMapComponent.Kind.SHORTCUTS , InputMapComponent.Kind.PLAYER); } } diff --git a/Explorer/Assets/DCL/ScenesDebug/ScenesDebug.asmdef b/Explorer/Assets/DCL/ScenesDebug/ScenesDebug.asmdef index fd5a60b5ff..424c17a495 100644 --- a/Explorer/Assets/DCL/ScenesDebug/ScenesDebug.asmdef +++ b/Explorer/Assets/DCL/ScenesDebug/ScenesDebug.asmdef @@ -22,7 +22,8 @@ "GUID:e25ef972de004615a22937e739de2def", "GUID:766b242fb43af451aaa331f39872177d", "GUID:166b65e6dfc848bb9fb075f53c293a38", - "GUID:6055be8ebefd69e48b49212b09b47b2f" + "GUID:6055be8ebefd69e48b49212b09b47b2f", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Settings/Configuration/SettingsMenuConfiguration.asset b/Explorer/Assets/DCL/Settings/Configuration/SettingsMenuConfiguration.asset index c6087a9675..5f7807c8a2 100644 --- a/Explorer/Assets/DCL/Settings/Configuration/SettingsMenuConfiguration.asset +++ b/Explorer/Assets/DCL/Settings/Configuration/SettingsMenuConfiguration.asset @@ -33,8 +33,8 @@ MonoBehaviour: <Modules>k__BackingField: - rid: 5242998342527483917 - rid: 5242998342527483918 - - rid: 5242998342527483919 - rid: 5242998342527483920 + - rid: 5242998342527483919 - rid: 5242998342527483921 - <GroupTitle>k__BackingField: Chat <Modules>k__BackingField: @@ -117,7 +117,7 @@ MonoBehaviour: data: <View>k__BackingField: {fileID: 4706452128062998708, guid: 27c8bedb89b5739458399a3bd3d255ac, type: 3} <Config>k__BackingField: - <ModuleName>k__BackingField: Avatar SFX + <ModuleName>k__BackingField: Avatar & Emotes SFX <Description>k__BackingField: <IsEnabled>k__BackingField: 1 sliderType: 1 @@ -159,7 +159,7 @@ MonoBehaviour: data: <View>k__BackingField: {fileID: 1404863613082391807, guid: 39458b71e0ed84549b1b280c4fb1f105, type: 3} <Config>k__BackingField: - <ModuleName>k__BackingField: Chat Sounds + <ModuleName>k__BackingField: Sounds <Description>k__BackingField: <IsEnabled>k__BackingField: 1 defaultIsOn: 1 diff --git a/Explorer/Assets/DCL/Settings/Settings.asmdef b/Explorer/Assets/DCL/Settings/Settings.asmdef index d7b26bdccc..5fea4efadd 100644 --- a/Explorer/Assets/DCL/Settings/Settings.asmdef +++ b/Explorer/Assets/DCL/Settings/Settings.asmdef @@ -10,7 +10,8 @@ "GUID:4794e238ed0f65142a4aea5848b513e5", "GUID:21c2e77c042a2d34d8cfbf58f8217053", "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:ba2f4073aea205344b1f48bb5111ff3b" + "GUID:ba2f4073aea205344b1f48bb5111ff3b", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/SkyBox/DCL.SkyBox.asmdef b/Explorer/Assets/DCL/SkyBox/DCL.SkyBox.asmdef index e249a69e66..17138a8028 100644 --- a/Explorer/Assets/DCL/SkyBox/DCL.SkyBox.asmdef +++ b/Explorer/Assets/DCL/SkyBox/DCL.SkyBox.asmdef @@ -8,7 +8,8 @@ "GUID:15fc0a57446b3144c949da3e2b9737a9", "GUID:d8b63aba1907145bea998dd612889d6b", "GUID:2665a8d13d1b3f18800f46e256720795", - "GUID:e0cd26848372d4e5c891c569017e11f1" + "GUID:e0cd26848372d4e5c891c569017e11f1", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/StylizedSkybox/StylizedSkybox.asmdef b/Explorer/Assets/DCL/StylizedSkybox/StylizedSkybox.asmdef index 523942f713..7bd87ebee9 100644 --- a/Explorer/Assets/DCL/StylizedSkybox/StylizedSkybox.asmdef +++ b/Explorer/Assets/DCL/StylizedSkybox/StylizedSkybox.asmdef @@ -5,7 +5,8 @@ "GUID:6055be8ebefd69e48b49212b09b47b2f", "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:15fc0a57446b3144c949da3e2b9737a9", - "GUID:df380645f10b7bc4b97d4f5eb6303d95" + "GUID:df380645f10b7bc4b97d4f5eb6303d95", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/TeleportPrompt/TeleportPrompt.asmdef b/Explorer/Assets/DCL/TeleportPrompt/TeleportPrompt.asmdef index ae8b19a3e2..2fe8f7bb78 100644 --- a/Explorer/Assets/DCL/TeleportPrompt/TeleportPrompt.asmdef +++ b/Explorer/Assets/DCL/TeleportPrompt/TeleportPrompt.asmdef @@ -15,7 +15,8 @@ "GUID:fa7b3fdbb04d67549916da7bd2af58ab", "GUID:1d2c76eb8b48e0b40940e8b31a679ce1", "GUID:e0eedfa2deb9406daf86fd8368728e39", - "GUID:101b8b6ebaf64668909b49c4b7a1420d" + "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Tests/Editor/DCL.EditMode.Tests.asmdef b/Explorer/Assets/DCL/Tests/Editor/DCL.EditMode.Tests.asmdef index 9912ad322d..4608072627 100644 --- a/Explorer/Assets/DCL/Tests/Editor/DCL.EditMode.Tests.asmdef +++ b/Explorer/Assets/DCL/Tests/Editor/DCL.EditMode.Tests.asmdef @@ -33,7 +33,6 @@ "GUID:4794e238ed0f65142a4aea5848b513e5", "GUID:e37c129839591a044b0819431bee5cb5", "GUID:78e0b5197588c4841a6544409324031c", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:6055be8ebefd69e48b49212b09b47b2f", "GUID:eec0964c48f6f4e40bc3ec2257ccf8c5", "GUID:45f6fff651a0a514f8edfdaf9cce45af", @@ -53,9 +52,7 @@ "GUID:a29f69b42fb1815409464ac7b05381d0", "GUID:166b65e6dfc848bb9fb075f53c293a38", "GUID:fec46e56100e46ae9c5197becac63d00", - "GUID:42ea518da3d63f24583d366c85bdef95", "GUID:d832748739a186646b8656bdbd447ad0", - "GUID:800d01f252aedc243b320345c737f37c", "GUID:46c2e553ecab9ff4784aee64075136c9", "GUID:875a5d5129614170bd769ed012c2eb3d", "GUID:9f890bfbf13e43c481227c49a4e6cb11", @@ -66,8 +63,11 @@ "GUID:ace653ac543d483ba8abee112a3ba2a6", "GUID:c54a193e9535e43d8a25007ab5ee28b1", "GUID:91cf8206af184dac8e30eb46747e9939", - "GUID:7175400a68914a45acecc9fb068de3b8", + "GUID:f1eaef1b40a68e74cb90cbedebf57bbf", "GUID:8baf705856414dad9a73b3f382f1bc8b", + "GUID:7175400a68914a45acecc9fb068de3b8", + "GUID:543b8f091a5947a3880b7f2bca2358bd", + "GUID:e5a23cdae0ef4d86aafc237a73280975", "GUID:78cc93eb55f63084db95d7a9b7cc3c57", "GUID:21c2e77c042a2d34d8cfbf58f8217053" ], diff --git a/Explorer/Assets/DCL/Tests/Editor/ValidationTests.cs b/Explorer/Assets/DCL/Tests/Editor/ValidationTests.cs index 5c7b582d7c..63b7d071b2 100644 --- a/Explorer/Assets/DCL/Tests/Editor/ValidationTests.cs +++ b/Explorer/Assets/DCL/Tests/Editor/ValidationTests.cs @@ -34,6 +34,7 @@ public class ValidationTests private readonly IReadOnlyCollection<string> pathIgnores = new List<string> { "node_modules", + "dist", "sign-server" }; diff --git a/Explorer/Assets/DCL/Tests/Editor/csc.rsp b/Explorer/Assets/DCL/Tests/Editor/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/DCL/Tests/Editor/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/DCL/Tests/Editor/csc.rsp.meta b/Explorer/Assets/DCL/Tests/Editor/csc.rsp.meta new file mode 100644 index 0000000000..df935b2150 --- /dev/null +++ b/Explorer/Assets/DCL/Tests/Editor/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b7e15817d9c1421baa91f268aaf643bb +timeCreated: 1724831146 \ No newline at end of file diff --git a/Explorer/Assets/DCL/Tests/PlayMode/DCL.PlayMode.Tests.asmdef b/Explorer/Assets/DCL/Tests/PlayMode/DCL.PlayMode.Tests.asmdef index 8cb5576f0a..ab1622773f 100644 --- a/Explorer/Assets/DCL/Tests/PlayMode/DCL.PlayMode.Tests.asmdef +++ b/Explorer/Assets/DCL/Tests/PlayMode/DCL.PlayMode.Tests.asmdef @@ -62,6 +62,7 @@ "GUID:7175400a68914a45acecc9fb068de3b8", "GUID:8baf705856414dad9a73b3f382f1bc8b", "GUID:a0d83a4df040477894e767d4333169ec", + "GUID:543b8f091a5947a3880b7f2bca2358bd", "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b" ], "includePlatforms": [], diff --git a/Explorer/Assets/DCL/UI/Assets/Slider.prefab b/Explorer/Assets/DCL/UI/Assets/Slider.prefab index 53500c83d9..01efcf801f 100644 --- a/Explorer/Assets/DCL/UI/Assets/Slider.prefab +++ b/Explorer/Assets/DCL/UI/Assets/Slider.prefab @@ -470,7 +470,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0.29803923} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 diff --git a/Explorer/Assets/DCL/UI/DestinationInfoElement.cs b/Explorer/Assets/DCL/UI/DestinationInfoElement.cs index eba60bf169..132cba3002 100644 --- a/Explorer/Assets/DCL/UI/DestinationInfoElement.cs +++ b/Explorer/Assets/DCL/UI/DestinationInfoElement.cs @@ -1,4 +1,3 @@ -using JetBrains.Annotations; using TMPro; using UnityEngine; using UnityEngine.UI; @@ -8,18 +7,18 @@ namespace DCL.UI public class DestinationInfoElement : MonoBehaviour { [field: SerializeField] public Button QuitButton { get; private set; } - [field: SerializeField] private Image pinImage { get; set; } - [field: SerializeField] private GameObject pinIcon { get; set; } - [field: SerializeField] private GameObject placeIcon { get; set; } - [field: SerializeField] private TMP_Text title { get; set; } + [field: SerializeField] private Image PinImage { get; set; } + [field: SerializeField] private GameObject PinIcon { get; set; } + [field: SerializeField] private GameObject PlaceIcon { get; set; } + [field: SerializeField] private TMP_Text Title { get; set; } - public void Setup(string title, bool isMapPin, [CanBeNull] Sprite sprite) + public void Setup(string title, bool isMapPin, Sprite? sprite) { - placeIcon.SetActive(!isMapPin); - pinIcon.SetActive(isMapPin); - this.title.text = title; + PlaceIcon.SetActive(!isMapPin); + PinIcon.SetActive(isMapPin); + Title.text = title; - if (isMapPin && sprite != null) { pinImage.sprite = sprite; } + if (isMapPin && sprite != null) { PinImage.sprite = sprite; } } } } diff --git a/Explorer/Assets/DCL/UI/ImageController.cs b/Explorer/Assets/DCL/UI/ImageController.cs index 618e758f59..479ea26102 100644 --- a/Explorer/Assets/DCL/UI/ImageController.cs +++ b/Explorer/Assets/DCL/UI/ImageController.cs @@ -1,6 +1,9 @@ using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.Diagnostics; +using DCL.Diagnostics; using DCL.WebRequests; +using System; using Utility; using System.Threading; using UnityEngine; @@ -20,11 +23,14 @@ public ImageController(ImageView view, IWebRequestController webRequestControlle this.webRequestController = webRequestController; } - public void RequestImage(string uri, bool removePrevious = false) + public void RequestImage(string uri, bool removePrevious = false, bool hideImageWhileLoading = false) { if(removePrevious) view.Image.sprite = null; + if (hideImageWhileLoading) + view.Image.enabled = false; + cts.SafeCancelAndDispose(); cts = new CancellationTokenSource(); RequestImageAsync(uri, cts.Token).Forget(); @@ -37,10 +43,21 @@ public void SetVisible(bool isVisible) public async UniTask RequestImageAsync(string uri, CancellationToken ct) { - view.LoadingObject.SetActive(true); - Texture2D texture = await webRequestController.GetTextureAsync(new CommonArguments(URLAddress.FromString(uri)), new GetTextureArguments(false), GetTextureWebRequest.CreateTexture(TextureWrapMode.Clamp), ct); - view.Image.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), VectorUtilities.OneHalf, PIXELS_PER_UNIT, 0, SpriteMeshType.FullRect, Vector4.one, false); - view.LoadingObject.SetActive(false); + try + { + view.LoadingObject.SetActive(true); + Texture2D texture = await webRequestController.GetTextureAsync(new CommonArguments(URLAddress.FromString(uri)), new GetTextureArguments(false), GetTextureWebRequest.CreateTexture(TextureWrapMode.Clamp), ct, ReportCategory.UI); + texture.filterMode = FilterMode.Bilinear; + view.Image.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), VectorUtilities.OneHalf, PIXELS_PER_UNIT, 0, SpriteMeshType.FullRect, Vector4.one, false); + view.LoadingObject.SetActive(false); + view.Image.enabled = true; + } + catch (Exception e) + { + view.LoadingObject.SetActive(false); + view.Image.enabled = true; + throw; + } } public void SetImage(Sprite sprite) diff --git a/Explorer/Assets/DCL/UI/ImageView.cs b/Explorer/Assets/DCL/UI/ImageView.cs index c764e82783..65688dc294 100644 --- a/Explorer/Assets/DCL/UI/ImageView.cs +++ b/Explorer/Assets/DCL/UI/ImageView.cs @@ -16,5 +16,8 @@ public void SetImage(Sprite sprite) Image.sprite = sprite; LoadingObject.SetActive(false); } + + public void SetColor(Color color) => + Image.color = color; } } diff --git a/Explorer/Assets/DCL/UI/MainUIContainer/MainUIContainer.prefab b/Explorer/Assets/DCL/UI/MainUIContainer/MainUIContainer.prefab index f0073b0532..9a648f47b4 100644 --- a/Explorer/Assets/DCL/UI/MainUIContainer/MainUIContainer.prefab +++ b/Explorer/Assets/DCL/UI/MainUIContainer/MainUIContainer.prefab @@ -103,8 +103,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 23, y: -599.61664} - m_SizeDelta: {x: 46, y: 1199.2333} + m_AnchoredPosition: {x: 23, y: -540.0556} + m_SizeDelta: {x: 46, y: 1080.1112} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &3900643109725378707 MonoBehaviour: @@ -369,8 +369,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 988, y: -599.61664} - m_SizeDelta: {x: 1864, y: 1199.2333} + m_AnchoredPosition: {x: 988, y: -540.0556} + m_SizeDelta: {x: 1864, y: 1080.1112} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &4978858503849552995 MonoBehaviour: @@ -596,6 +596,14 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 822488252307644781, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} + propertyPath: <canvas>k__BackingField + value: + objectReference: {fileID: 3928979656746108799} + - target: {fileID: 822488252307644781, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} + propertyPath: <raycaster>k__BackingField + value: + objectReference: {fileID: 2958791553259585229} - target: {fileID: 835415575200949320, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} propertyPath: m_AnchorMax.y value: 1 @@ -680,6 +688,22 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 18 objectReference: {fileID: 0} + - target: {fileID: 1959621558750892143, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1959621558750892143, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1959621558750892143, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} + propertyPath: m_AnchoredPosition.x + value: 23 + objectReference: {fileID: 0} + - target: {fileID: 1959621558750892143, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} + propertyPath: m_AnchoredPosition.y + value: -262 + objectReference: {fileID: 0} - target: {fileID: 2345943681759489479, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} propertyPath: m_AnchorMax.y value: 1 @@ -856,6 +880,10 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -20.785 objectReference: {fileID: 0} + - target: {fileID: 4196453176324919297, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} + propertyPath: m_AnchoredPosition.x + value: 34 + objectReference: {fileID: 0} - target: {fileID: 4222197372863658601, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} propertyPath: m_PixelsPerUnitMultiplier value: 2.5 @@ -1484,6 +1512,22 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ae3abdd171fe49a387f7472fddfb3ece, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &2958791553259585229 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 275996492151265606, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} + m_PrefabInstance: {fileID: 3088119578452600715} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!223 &3928979656746108799 stripped +Canvas: + m_CorrespondingSourceObject: {fileID: 2043999036361285876, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} + m_PrefabInstance: {fileID: 3088119578452600715} + m_PrefabAsset: {fileID: 0} --- !u!224 &6191178829782708942 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 9164904624699036997, guid: e495fc295bd1f3e44aeda4cbccc5f767, type: 3} diff --git a/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionController.cs b/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionController.cs index 4331a378f4..37acf6a73b 100644 --- a/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionController.cs +++ b/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionController.cs @@ -3,60 +3,74 @@ using DCL.Profiles; using DCL.Web3.Identities; using DCL.WebRequests; -using System; +using MVC; using System.Threading; -using UnityEngine.UI; +using Utility; namespace DCL.UI.ProfileElements { - public class ProfileSectionController : IDisposable + public class ProfileSectionController : ControllerBase<ProfileSectionView> { private readonly IWeb3IdentityCache identityCache; private readonly IProfileRepository profileRepository; - private readonly ImageController profileImageController; - private readonly UserNameElementController nameElementController; - private readonly UserWalletAddressElementController walletAddressElementController; - private readonly ProfileSectionElement element; private readonly ChatEntryConfigurationSO chatEntryConfiguration; + private readonly IWebRequestController webRequestController; + + private ImageController profileImageController; + private UserNameElementController nameElementController; + private UserWalletAddressElementController walletAddressElementController; + private CancellationTokenSource cts; public ProfileSectionController( - ProfileSectionElement element, + ViewFactoryMethod viewFactory, IWeb3IdentityCache identityCache, IProfileRepository profileRepository, IWebRequestController webRequestController, - ChatEntryConfigurationSO chatEntryConfiguration) + ChatEntryConfigurationSO chatEntryConfiguration) : base(viewFactory) { this.identityCache = identityCache; this.profileRepository = profileRepository; - this.element = element; this.chatEntryConfiguration = chatEntryConfiguration; + this.webRequestController = webRequestController; + } - nameElementController = new UserNameElementController(element.UserNameElement, chatEntryConfiguration); - walletAddressElementController = new UserWalletAddressElementController(element.UserWalletAddressElement); - profileImageController = new ImageController(element.FaceSnapshotImage, webRequestController); + protected override void OnViewInstantiated() + { + base.OnViewInstantiated(); + nameElementController = new UserNameElementController(viewInstance!.UserNameElement, chatEntryConfiguration); + walletAddressElementController = new UserWalletAddressElementController(viewInstance.UserWalletAddressElement); + profileImageController = new ImageController(viewInstance.FaceSnapshotImage, webRequestController); } - public async UniTask LoadElementsAsync(CancellationToken ct) + protected override void OnBeforeViewShow() { - await LoadAsync(ct); + base.OnBeforeViewShow(); + cts = cts.SafeRestart(); + SetupAsync(cts.Token).Forget(); } - private async UniTask LoadAsync(CancellationToken ct) + private async UniTaskVoid SetupAsync(CancellationToken ct) { Profile? profile = await profileRepository.GetAsync(identityCache.Identity!.Address, 0, ct); + if (profile == null) return; + nameElementController.Setup(profile); walletAddressElementController.Setup(profile); - element.FaceFrame.color = chatEntryConfiguration.GetNameColor(profile?.Name); + viewInstance!.FaceFrame.color = chatEntryConfiguration.GetNameColor(profile.Name); profileImageController!.StopLoading(); - //temporarily disabled the profile image request untill we have the correct + //temporarily disabled the profile image request until we have the correct //picture deployment //await profileImageController!.RequestImageAsync(profile.Avatar.FaceSnapshotUrl, ct); } - public void Dispose() + public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup; + + protected override UniTask WaitForCloseIntentAsync(CancellationToken ct) => UniTask.Never(ct); + public new void Dispose() { + cts.SafeCancelAndDispose(); profileImageController.StopLoading(); nameElementController.Dispose(); walletAddressElementController.Dispose(); diff --git a/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionElement.cs b/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionView.cs similarity index 82% rename from Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionElement.cs rename to Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionView.cs index 27f70bf7ba..232a061830 100644 --- a/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionElement.cs +++ b/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionView.cs @@ -1,11 +1,10 @@ -using DCL.UI; -using DCL.UI.ProfileElements; +using MVC; using UnityEngine; using UnityEngine.UI; namespace DCL.UI.ProfileElements { - public class ProfileSectionElement : MonoBehaviour + public class ProfileSectionView : ViewBase, IView { [field: SerializeField] public ImageView FaceSnapshotImage { get; private set; } = null!; [field: SerializeField] public Image FaceFrame { get; private set; } diff --git a/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionElement.cs.meta b/Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionView.cs.meta similarity index 100% rename from Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionElement.cs.meta rename to Explorer/Assets/DCL/UI/Profile/ProfileElements/ProfileSectionView.cs.meta diff --git a/Explorer/Assets/DCL/UI/Profile/ProfileMenuController.cs b/Explorer/Assets/DCL/UI/Profile/ProfileMenuController.cs index 2122165027..fa9c80d42c 100644 --- a/Explorer/Assets/DCL/UI/Profile/ProfileMenuController.cs +++ b/Explorer/Assets/DCL/UI/Profile/ProfileMenuController.cs @@ -20,11 +20,10 @@ public class ProfileMenuController : ControllerBase<ProfileMenuView> private readonly ProfileSectionController profileSectionController; private readonly SystemMenuController systemSectionController; - private CancellationTokenSource profileWidgetCts = new (); + private CancellationTokenSource profileMenuCts = new (); public ProfileMenuController( ViewFactoryMethod viewFactory, - ProfileSectionElement profileSectionElement, IWeb3IdentityCache identityCache, IProfileRepository profileRepository, IWebRequestController webRequestController, @@ -38,32 +37,45 @@ public ProfileMenuController( ChatEntryConfigurationSO chatEntryConfiguration ) : base(viewFactory) { - profileSectionController = new ProfileSectionController(profileSectionElement, identityCache, profileRepository, webRequestController, chatEntryConfiguration); - systemSectionController = new SystemMenuController(() => viewInstance.SystemMenuView, world, playerEntity, webBrowser, web3Authenticator, userInAppInitializationFlow, profileCache, identityCache, mvcManager); + profileSectionController = new ProfileSectionController(() => viewInstance!.ProfileMenu, identityCache, profileRepository, webRequestController, chatEntryConfiguration); + systemSectionController = new SystemMenuController(() => viewInstance!.SystemMenuView, world, playerEntity, webBrowser, web3Authenticator, userInAppInitializationFlow, profileCache, identityCache, mvcManager); + systemSectionController.OnClosed += OnClose; } - public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Persistent; + public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup; protected override UniTask WaitForCloseIntentAsync(CancellationToken ct) => UniTask.Never(ct); + protected override void OnViewInstantiated() + { + base.OnViewInstantiated(); + viewInstance!.CloseButton.onClick.AddListener(OnClose); + } + protected override void OnBeforeViewShow() { base.OnBeforeViewShow(); - profileWidgetCts = profileWidgetCts.SafeRestart(); - LaunchChildViewsAsync().Forget(); + profileMenuCts = profileMenuCts.SafeRestart(); + profileSectionController.LaunchViewLifeCycleAsync(new CanvasOrdering(CanvasOrdering.SortingLayer.Persistent, 0), new ControllerNoData(), profileMenuCts.Token).Forget(); + systemSectionController.LaunchViewLifeCycleAsync(new CanvasOrdering(CanvasOrdering.SortingLayer.Persistent, 0), new ControllerNoData(), profileMenuCts.Token).Forget(); } + private void OnClose() + { + CloseAsync().Forget(); + } - private async UniTaskVoid LaunchChildViewsAsync() + private async UniTaskVoid CloseAsync() { - await profileSectionController.LoadElementsAsync(profileWidgetCts.Token); - await systemSectionController.LaunchViewLifeCycleAsync(new CanvasOrdering(CanvasOrdering.SortingLayer.Persistent, 0), new ControllerNoData(), profileWidgetCts.Token); - await HideViewAsync(profileWidgetCts.Token); + await systemSectionController.HideViewAsync(profileMenuCts.Token); + await profileSectionController.HideViewAsync(profileMenuCts.Token); + await HideViewAsync(profileMenuCts.Token); } public override void Dispose() { base.Dispose(); + profileMenuCts.SafeCancelAndDispose(); profileSectionController.Dispose(); systemSectionController.Dispose(); } diff --git a/Explorer/Assets/DCL/UI/Profile/ProfileMenuView.cs b/Explorer/Assets/DCL/UI/Profile/ProfileMenuView.cs index 025d0c064e..555359506f 100644 --- a/Explorer/Assets/DCL/UI/Profile/ProfileMenuView.cs +++ b/Explorer/Assets/DCL/UI/Profile/ProfileMenuView.cs @@ -1,12 +1,14 @@ using DCL.UI.SystemMenu; using MVC; using UnityEngine; +using UnityEngine.UI; namespace DCL.UI.ProfileElements { public class ProfileMenuView : ViewBaseWithAnimationElement, IView { - [field: SerializeField] public ProfileSectionElement ProfileMenu { get; private set; } - [field: SerializeField] public SystemMenuView SystemMenuView { get; private set; } + [field: SerializeField] public ProfileSectionView ProfileMenu { get; private set; } = null!; + [field: SerializeField] public SystemMenuView SystemMenuView { get; private set; } = null!; + [field: SerializeField] public Button CloseButton { get; private set; } = null!; } } diff --git a/Explorer/Assets/DCL/UI/SearchBar/SearchBarView.cs b/Explorer/Assets/DCL/UI/SearchBar/SearchBarView.cs index 9240217997..f1b614e02d 100644 --- a/Explorer/Assets/DCL/UI/SearchBar/SearchBarView.cs +++ b/Explorer/Assets/DCL/UI/SearchBar/SearchBarView.cs @@ -24,8 +24,6 @@ public class SearchBarView : MonoBehaviour [field: SerializeField] public AudioClipConfig SelectAudio { get; private set; } - public event Action Disabled; - private void OnEnable() { inputField.onValueChanged.AddListener(OnValueChanged); @@ -39,8 +37,6 @@ private void OnDisable() inputField.onValueChanged.RemoveListener(OnValueChanged); clearSearchButton.onClick.RemoveListener(OnClearText); inputField.onSubmit.RemoveListener(OnSubmit); - - Disabled?.Invoke(); } private void OnSelect(string text) diff --git a/Explorer/Assets/DCL/UI/Shaders/PassportBackground.mat b/Explorer/Assets/DCL/UI/Shaders/PassportBackground.mat index eb9c90d67c..290bc954ee 100644 --- a/Explorer/Assets/DCL/UI/Shaders/PassportBackground.mat +++ b/Explorer/Assets/DCL/UI/Shaders/PassportBackground.mat @@ -117,7 +117,7 @@ Material: m_Colors: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1} - - _Color1: {r: 0.6194137, g: 0.9607843, b: 0.121568605, a: 1} + - _Color1: {r: 0.858401, g: 1, b: 0.5613208, a: 1} - _Color2: {r: 0.24313726, g: 0.047058824, b: 0.39607844, a: 1} - _Color3: {r: 0.29401788, g: 0.030081892, b: 0.49056602, a: 1} - _Color4: {r: 0.18431373, g: 0.015686275, b: 0.24705882, a: 1} diff --git a/Explorer/Assets/DCL/UI/Sidebar/ProfileMenuView.prefab b/Explorer/Assets/DCL/UI/Sidebar/ProfileMenuView.prefab index cdc78e09df..55e63c55e9 100644 --- a/Explorer/Assets/DCL/UI/Sidebar/ProfileMenuView.prefab +++ b/Explorer/Assets/DCL/UI/Sidebar/ProfileMenuView.prefab @@ -246,6 +246,7 @@ GameObject: - component: {fileID: 1705550250461608253} - component: {fileID: 7741166473012986143} - component: {fileID: 3380469708162111100} + - component: {fileID: 6753001066559121779} m_Layer: 5 m_Name: ProfileSection m_TagString: Untagged @@ -380,10 +381,32 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: a00df3cf0c6e496bb195837ad3ec8d5c, type: 3} m_Name: m_EditorClassIdentifier: + <canvas>k__BackingField: {fileID: 0} + <raycaster>k__BackingField: {fileID: 0} <FaceSnapshotImage>k__BackingField: {fileID: 5853180061045949392} - <FaceFrame>k__BackingField: {fileID: 3803885536491994256} + <FaceFrame>k__BackingField: {fileID: 3064566796890884558} <UserNameElement>k__BackingField: {fileID: 3511336122902181310} <UserWalletAddressElement>k__BackingField: {fileID: 4021329157380962250} +--- !u!114 &6753001066559121779 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1676428487734425606} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 --- !u!1 &2050763827713771171 GameObject: m_ObjectHideFlags: 0 @@ -531,7 +554,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: -169, y: 61} + m_AnchoredPosition: {x: -1347, y: -20} m_SizeDelta: {x: 3000, y: 2000} m_Pivot: {x: 0, y: 1} --- !u!222 &2972948754638659199 @@ -635,7 +658,7 @@ MonoBehaviour: m_PreferredHeight: -1 m_FlexibleWidth: -1 m_FlexibleHeight: -1 - m_LayoutPriority: 1 + m_LayoutPriority: -50 --- !u!1 &2486318498976276361 GameObject: m_ObjectHideFlags: 0 @@ -1540,6 +1563,7 @@ MonoBehaviour: <viewAnimationElement>k__BackingField: {fileID: 247327978048526739} <ProfileMenu>k__BackingField: {fileID: 3380469708162111100} <SystemMenuView>k__BackingField: {fileID: 6083280960890443224} + <CloseButton>k__BackingField: {fileID: 5905608027042820277} --- !u!114 &247327978048526739 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1718,6 +1742,7 @@ GameObject: - component: {fileID: 6083280960890443224} - component: {fileID: 2620657809970686810} - component: {fileID: 342520947001122537} + - component: {fileID: 6415543506546505118} m_Layer: 5 m_Name: SystemSection m_TagString: Untagged @@ -1762,15 +1787,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 087534717a354563a61fc5e135ae82d7, type: 3} m_Name: m_EditorClassIdentifier: - <canvas>k__BackingField: {fileID: 874950745251077639} - <raycaster>k__BackingField: {fileID: 1417864235299858357} - <CloseButton>k__BackingField: {fileID: 5905608027042820277} + <canvas>k__BackingField: {fileID: 0} + <raycaster>k__BackingField: {fileID: 0} <PreviewProfileButton>k__BackingField: {fileID: 5841731852142912357} <LogoutButton>k__BackingField: {fileID: 1800806959572148375} <ExitAppButton>k__BackingField: {fileID: 2161394582544396313} <PrivacyPolicyButton>k__BackingField: {fileID: 3795866477412316333} <TermsOfServiceButton>k__BackingField: {fileID: 935035715336996757} - <CanvasGroup>k__BackingField: {fileID: 0} --- !u!114 &2620657809970686810 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1811,6 +1834,26 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 1 m_VerticalFit: 1 +--- !u!114 &6415543506546505118 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5549503321594932203} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 --- !u!1 &6005419585584789587 GameObject: m_ObjectHideFlags: 0 diff --git a/Explorer/Assets/DCL/UI/Sidebar/SidebarController.cs b/Explorer/Assets/DCL/UI/Sidebar/SidebarController.cs index 002eb7c9ce..b731fbd26b 100644 --- a/Explorer/Assets/DCL/UI/Sidebar/SidebarController.cs +++ b/Explorer/Assets/DCL/UI/Sidebar/SidebarController.cs @@ -1,6 +1,8 @@ using Cysharp.Threading.Tasks; +using DCL.Browser; using DCL.Chat; using DCL.ExplorePanel; +using DCL.Multiplayer.Connections.DecentralandUrls; using DCL.Notifications.NotificationsMenu; using DCL.NotificationsBusController.NotificationsBus; using DCL.NotificationsBusController.NotificationTypes; @@ -25,6 +27,7 @@ public class SidebarController : ControllerBase<SidebarView> private readonly ChatEntryConfigurationSO chatEntryConfiguration; private readonly IProfileRepository profileRepository; private readonly IWeb3IdentityCache identityCache; + private readonly IWebBrowser webBrowser; private CancellationTokenSource profileWidgetCts = new (); private CancellationTokenSource systemMenuCts = new (); @@ -41,7 +44,8 @@ public SidebarController( ISidebarBus sidebarBus, ChatEntryConfigurationSO chatEntryConfiguration, IWeb3IdentityCache identityCache, - IProfileRepository profileRepository) + IProfileRepository profileRepository, + IWebBrowser webBrowser) : base(viewFactory) { this.mvcManager = mvcManager; @@ -53,6 +57,7 @@ public SidebarController( this.chatEntryConfiguration = chatEntryConfiguration; this.identityCache = identityCache; this.profileRepository = profileRepository; + this.webBrowser = webBrowser; } public override void Dispose() @@ -64,7 +69,7 @@ public override void Dispose() protected override void OnViewInstantiated() { - viewInstance.backpackButton.onClick.AddListener(() => + viewInstance!.backpackButton.onClick.AddListener(() => { viewInstance.backpackNotificationIndicator.SetActive(false); OpenExplorePanelInSection(ExploreSections.Backpack); @@ -72,16 +77,20 @@ protected override void OnViewInstantiated() viewInstance.settingsButton.onClick.AddListener(() => OpenExplorePanelInSection(ExploreSections.Settings)); viewInstance.mapButton.onClick.AddListener(() => OpenExplorePanelInSection(ExploreSections.Navmap)); - viewInstance.ProfileWidget.OpenProfileButton.onClick.AddListener(OpenProfileWidget); + viewInstance.ProfileWidget.OpenProfileButton.onClick.AddListener(OpenProfileMenu); viewInstance.sidebarSettingsButton.onClick.AddListener(OpenSidebarSettings); viewInstance.notificationsButton.onClick.AddListener(OpenNotificationsPanel); viewInstance.autoHideToggle.onValueChanged.AddListener(OnAutoHideToggleChanged); viewInstance.backpackNotificationIndicator.SetActive(false); + viewInstance.helpButton.onClick.AddListener(OnHelpButtonClicked); notificationsBusController.SubscribeToNotificationTypeReceived(NotificationType.REWARD_ASSIGNMENT, OnRewardNotificationReceived); notificationsBusController.SubscribeToNotificationTypeClick(NotificationType.REWARD_ASSIGNMENT, OnRewardNotificationClicked); viewInstance.sidebarSettingsWidget.OnViewHidden += OnSidebarSettingsClosed; } + private void OnHelpButtonClicked() => + webBrowser.OpenUrl(DecentralandUrl.Help); + private void OnAutoHideToggleChanged(bool value) { sidebarBus.SetAutoHideSidebarStatus(value); @@ -92,7 +101,7 @@ private void CloseAllWidgets() systemMenuCts = systemMenuCts.SafeRestart(); if (profileMenuController.State is ControllerState.ViewFocused or ControllerState.ViewBlurred) { profileMenuController.HideViewAsync(systemMenuCts.Token).Forget(); } notificationsMenuController.ToggleNotificationsPanel(true); - viewInstance.sidebarSettingsWidget.CloseElement(); + viewInstance!.sidebarSettingsWidget.CloseElement(); sidebarBus.UnblockSidebar(); } @@ -100,24 +109,24 @@ private void OpenSidebarSettings() { CloseAllWidgets(); sidebarBus.BlockSidebar(); - viewInstance.sidebarSettingsWidget.ShowAsync(CancellationToken.None).Forget(); + viewInstance!.sidebarSettingsWidget.ShowAsync(CancellationToken.None).Forget(); viewInstance.sidebarSettingsButton.OnSelect(null); } private void OnSidebarSettingsClosed() { sidebarBus.UnblockSidebar(); - viewInstance.sidebarSettingsButton.OnDeselect(null); + viewInstance!.sidebarSettingsButton.OnDeselect(null); } private void OnRewardNotificationClicked(object[] parameters) { - viewInstance.backpackNotificationIndicator.SetActive(false); + viewInstance!.backpackNotificationIndicator.SetActive(false); } private void OnRewardNotificationReceived(INotification newNotification) { - viewInstance.backpackNotificationIndicator.SetActive(true); + viewInstance!.backpackNotificationIndicator.SetActive(true); } protected override void OnViewShow() @@ -131,7 +140,7 @@ protected override void OnViewShow() private async UniTaskVoid UpdateFrameColorAsync() { Profile? profile = await profileRepository.GetAsync(identityCache.Identity!.Address, 0, profileWidgetCts.Token); - viewInstance.FaceFrame.color = chatEntryConfiguration.GetNameColor(profile?.Name); + viewInstance!.FaceFrame.color = chatEntryConfiguration.GetNameColor(profile?.Name); } protected override void OnViewClose() @@ -141,12 +150,20 @@ protected override void OnViewClose() systemMenuCts.SafeCancelAndDispose(); } - private void OpenProfileWidget() + private void OpenProfileMenu() { + if (profileMenuController.State is ControllerState.ViewFocused or ControllerState.ViewBlurred) + { + //Profile is already open + return; + } + CloseAllWidgets(); sidebarBus.BlockSidebar(); - viewInstance.profileMenu.gameObject.SetActive(true); - ToggleSystemMenu(); + + systemMenuCts = systemMenuCts.SafeRestart(); + viewInstance!.ProfileMenuView.gameObject.SetActive(true); + profileMenuController.LaunchViewLifeCycleAsync(new CanvasOrdering(CanvasOrdering.SortingLayer.Overlay, 0), new ControllerNoData(), systemMenuCts.Token).Forget(); } private void OpenNotificationsPanel() @@ -156,19 +173,6 @@ private void OpenNotificationsPanel() notificationsMenuController.ToggleNotificationsPanel(false); } - private void ToggleSystemMenu() - { - systemMenuCts = systemMenuCts.SafeRestart(); - - if (profileMenuController.State is ControllerState.ViewFocused or ControllerState.ViewBlurred) - { - profileMenuController.HideViewAsync(systemMenuCts.Token).Forget(); - sidebarBus.UnblockSidebar(); - } - else - profileMenuController.LaunchViewLifeCycleAsync(new CanvasOrdering(CanvasOrdering.SortingLayer.Overlay, 0), new ControllerNoData(), systemMenuCts.Token).Forget(); - } - private void OpenExplorePanelInSection(ExploreSections section, BackpackSections backpackSection = BackpackSections.Avatar) { CloseAllWidgets(); diff --git a/Explorer/Assets/DCL/UI/Sidebar/SidebarSettingsButton.prefab b/Explorer/Assets/DCL/UI/Sidebar/SidebarSettingsButton.prefab index c89c179872..35f554ebe1 100644 --- a/Explorer/Assets/DCL/UI/Sidebar/SidebarSettingsButton.prefab +++ b/Explorer/Assets/DCL/UI/Sidebar/SidebarSettingsButton.prefab @@ -527,8 +527,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 14, y: 0} - m_SizeDelta: {x: 154.53, y: 16.95} + m_AnchoredPosition: {x: 12, y: 0} + m_SizeDelta: {x: 177.44, y: 16.34} m_Pivot: {x: 0, y: 0.5} --- !u!222 &8420718383224501396 CanvasRenderer: @@ -558,7 +558,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Automatically Hide Bar + m_text: 'Hide Sidebar Automatically ' m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} m_sharedMaterial: {fileID: 735423033564544980, guid: 96ae0a2159a39234f858ea23bdcc74ad, type: 2} @@ -585,8 +585,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 14 - m_fontSizeBase: 14 + m_fontSize: 13.5 + m_fontSizeBase: 13.5 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 0 @@ -812,7 +812,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6521834947971461802, guid: 6a387e1548b1545319b57f5a417160aa, type: 3} propertyPath: m_AnchoredPosition.x - value: -14 + value: -12 objectReference: {fileID: 0} - target: {fileID: 6521834947971461802, guid: 6a387e1548b1545319b57f5a417160aa, type: 3} propertyPath: m_AnchoredPosition.y diff --git a/Explorer/Assets/DCL/UI/Sidebar/SidebarUI.prefab b/Explorer/Assets/DCL/UI/Sidebar/SidebarUI.prefab index 658bb25a37..891d5ba5d6 100644 --- a/Explorer/Assets/DCL/UI/Sidebar/SidebarUI.prefab +++ b/Explorer/Assets/DCL/UI/Sidebar/SidebarUI.prefab @@ -417,6 +417,7 @@ RectTransform: - {fileID: 6275068675692716138} - {fileID: 5589918054500395128} - {fileID: 2345943681759489479} + - {fileID: 1959621558750892143} - {fileID: 3531244294086588118} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -461,6 +462,7 @@ MonoBehaviour: <sidebarSettingsButton>k__BackingField: {fileID: 1441228183698799381} <sidebarSettingsWidget>k__BackingField: {fileID: 2506691189012929090} <autoHideToggle>k__BackingField: {fileID: 6705180925666095888} + <helpButton>k__BackingField: {fileID: 2978611201982790949} --- !u!114 &359438563268453406 MonoBehaviour: m_ObjectHideFlags: 0 @@ -675,11 +677,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 447767288900774538, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_SizeDelta.x - value: 54.44 + value: 200.7 objectReference: {fileID: 0} - target: {fileID: 447767288900774538, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_AnchoredPosition.x - value: 27.22 + value: 100.35 objectReference: {fileID: 0} - target: {fileID: 447767288900774538, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_AnchoredPosition.y @@ -929,6 +931,10 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 4858291099790369080, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} + propertyPath: m_SizeDelta.x + value: 250 + objectReference: {fileID: 0} - target: {fileID: 4858291099790369080, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_SizeDelta.y value: 39.4 @@ -1037,6 +1043,10 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 5912558610233554149, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} + propertyPath: m_SizeDelta.x + value: 60 + objectReference: {fileID: 0} - target: {fileID: 5912558610233554149, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_AnchoredPosition.x value: 95 @@ -1227,11 +1237,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7477156036910135036, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_SizeDelta.x - value: 102.44 + value: 220.7 objectReference: {fileID: 0} - target: {fileID: 7477156036910135036, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_AnchoredPosition.x - value: 73.78 + value: 14.650002 objectReference: {fileID: 0} - target: {fileID: 7477156036910135036, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_AnchoredPosition.y @@ -1251,7 +1261,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7800620263123725287, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_AnchoredPosition.x - value: 66.44 + value: 212.7 objectReference: {fileID: 0} - target: {fileID: 7800620263123725287, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_AnchoredPosition.y @@ -1277,6 +1287,10 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -9.7 objectReference: {fileID: 0} + - target: {fileID: 7903397570594201269, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} + propertyPath: m_Alpha + value: 1 + objectReference: {fileID: 0} - target: {fileID: 8419079392565781790, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_SizeDelta.x value: 0 @@ -1329,6 +1343,10 @@ PrefabInstance: propertyPath: m_SizeDelta.x value: 68 objectReference: {fileID: 0} + - target: {fileID: 8965938301174026105, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.01499939 + objectReference: {fileID: 0} - target: {fileID: 9123167509379526391, guid: 2936d4da401930d4f8fef6fefb4010b1, type: 3} propertyPath: m_AnchorMax.y value: 1 @@ -2138,6 +2156,262 @@ MonoBehaviour: <ButtonPressedAudio>k__BackingField: {fileID: 11400000, guid: cbbd6a003fc75e24da47c13feacd92c7, type: 2} <ButtonHoveredAudio>k__BackingField: {fileID: 11400000, guid: 59da234351971c0498a566fb811b0c36, type: 2} <Animator>k__BackingField: {fileID: 2817631124620323997} +--- !u!1001 &4433140928351455978 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 9164904624699036997} + m_Modifications: + - target: {fileID: 216954503483567130, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.x + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 216954503483567130, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.y + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 556587912230755051, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.x + value: 47.11 + objectReference: {fileID: 0} + - target: {fileID: 791050805523401173, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.x + value: 28 + objectReference: {fileID: 0} + - target: {fileID: 791050805523401173, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.y + value: 28 + objectReference: {fileID: 0} + - target: {fileID: 935382261191405662, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.x + value: 31.11 + objectReference: {fileID: 0} + - target: {fileID: 935382261191405662, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.y + value: 16.95 + objectReference: {fileID: 0} + - target: {fileID: 1095953891227981704, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.x + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 1095953891227981704, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.y + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_TargetGraphic + value: + objectReference: {fileID: 8987546028876365542} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_NormalColor.a + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_PressedColor.b + value: 0.09411765 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_PressedColor.g + value: 0.08235294 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_PressedColor.r + value: 0.08627451 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_SelectedColor.b + value: 0.2901961 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_SelectedColor.g + value: 0.2509804 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_SelectedColor.r + value: 0.2627451 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_HighlightedColor.a + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_HighlightedColor.b + value: 0.2901961 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_HighlightedColor.g + value: 0.2509804 + objectReference: {fileID: 0} + - target: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Colors.m_HighlightedColor.r + value: 0.2627451 + objectReference: {fileID: 0} + - target: {fileID: 2014140899845957181, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.x + value: 28 + objectReference: {fileID: 0} + - target: {fileID: 2014140899845957181, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.y + value: 28 + objectReference: {fileID: 0} + - target: {fileID: 2749807465873248309, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Controller + value: + objectReference: {fileID: 22100000, guid: a006366825b69884f9bb5da54b63adb1, type: 2} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.x + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_SizeDelta.y + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3146780150498150332, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: a2705bd12f679144aab6caed37c89555, type: 3} + - target: {fileID: 4701620919981290508, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Color.a + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4701620919981290508, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_PixelsPerUnitMultiplier + value: 2.5 + objectReference: {fileID: 0} + - target: {fileID: 5656729445006871095, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Name + value: HelpButton + objectReference: {fileID: 0} + - target: {fileID: 5790594399661718223, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5984625867669522073, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_text + value: Help + objectReference: {fileID: 0} + - target: {fileID: 5984625867669522073, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_HorizontalAlignment + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6451472314827119683, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 54db90b513f86ff46a6aa6f6676cd48b, type: 3} + - target: {fileID: 7727841365288015261, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 6e68f3c0e96070343bd5cf728a7b71b6, type: 3} + - target: {fileID: 8350839749097872697, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 54db90b513f86ff46a6aa6f6676cd48b, type: 3} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} +--- !u!224 &1959621558750892143 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 2788950014895397509, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + m_PrefabInstance: {fileID: 4433140928351455978} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2978611201982790949 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1500693959885502415, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + m_PrefabInstance: {fileID: 4433140928351455978} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &8987546028876365542 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4701620919981290508, guid: 571c63ddcf1523b45a64fabd71cb6dd5, type: 3} + m_PrefabInstance: {fileID: 4433140928351455978} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &6568927128211631236 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Explorer/Assets/DCL/UI/Sidebar/SidebarView.cs b/Explorer/Assets/DCL/UI/Sidebar/SidebarView.cs index 99ca208463..3ed6094893 100644 --- a/Explorer/Assets/DCL/UI/Sidebar/SidebarView.cs +++ b/Explorer/Assets/DCL/UI/Sidebar/SidebarView.cs @@ -1,5 +1,4 @@ using DCL.EmotesWheel; -using DCL.ExplorePanel; using DCL.Notifications.NotificationsMenu; using DCL.UI.ProfileElements; using MVC; @@ -34,5 +33,10 @@ public class SidebarView : ViewBase, IView [field: SerializeField] internal Button sidebarSettingsButton { get; private set; } [field: SerializeField] internal ElementWithCloseArea sidebarSettingsWidget { get; private set; } [field: SerializeField] internal Toggle autoHideToggle { get; private set; } + + + [field: Header("Help")] + [field: SerializeField] internal Button helpButton { get; private set; } + } } diff --git a/Explorer/Assets/DCL/UI/SystemMenu/SystemMenuController.cs b/Explorer/Assets/DCL/UI/SystemMenu/SystemMenuController.cs index f33e9f2b25..7f5801e453 100644 --- a/Explorer/Assets/DCL/UI/SystemMenu/SystemMenuController.cs +++ b/Explorer/Assets/DCL/UI/SystemMenu/SystemMenuController.cs @@ -9,6 +9,7 @@ using DCL.Web3.Authenticators; using DCL.Web3.Identities; using MVC; +using System; using System.Threading; using UnityEngine; using Utility; @@ -17,6 +18,8 @@ namespace DCL.UI.SystemMenu { public class SystemMenuController : ControllerBase<SystemMenuView> { + public event Action OnClosed; + private readonly IWebBrowser webBrowser; private readonly IWeb3Authenticator web3Authenticator; private readonly IUserInAppInitializationFlow userInAppInitializationFlow; @@ -55,33 +58,38 @@ IMVCManager mvcManager public override void Dispose() { base.Dispose(); - logoutCts.SafeCancelAndDispose(); } - protected override UniTask WaitForCloseIntentAsync(CancellationToken ct) => - UniTask.WhenAny(viewInstance.LogoutButton.OnClickAsync(ct), - viewInstance.ExitAppButton.OnClickAsync(ct), - viewInstance.PrivacyPolicyButton.OnClickAsync(ct), - viewInstance.TermsOfServiceButton.OnClickAsync(ct), - viewInstance.CloseButton.OnClickAsync(ct), - viewInstance.PreviewProfileButton.OnClickAsync(ct)); + protected override UniTask WaitForCloseIntentAsync(CancellationToken ct) => UniTask.Never(ct); protected override void OnViewInstantiated() { base.OnViewInstantiated(); - viewInstance.LogoutButton.onClick!.AddListener(Logout); - viewInstance.ExitAppButton.onClick!.AddListener(ExitApp); - viewInstance.PrivacyPolicyButton.onClick!.AddListener(ShowPrivacyPolicy); - viewInstance.TermsOfServiceButton.onClick!.AddListener(ShowTermsOfService); - viewInstance.PreviewProfileButton.onClick!.AddListener(ShowPassport); + viewInstance!.LogoutButton.onClick.AddListener(Logout); + viewInstance.ExitAppButton.onClick.AddListener(ExitApp); + viewInstance.PrivacyPolicyButton.onClick.AddListener(ShowPrivacyPolicy); + viewInstance.TermsOfServiceButton.onClick.AddListener(ShowTermsOfService); + viewInstance.PreviewProfileButton.onClick.AddListener(ShowPassport); + + viewInstance!.LogoutButton.onClick.AddListener(CloseView); + viewInstance.ExitAppButton.onClick.AddListener(CloseView); + viewInstance.PrivacyPolicyButton.onClick.AddListener(CloseView); + viewInstance.TermsOfServiceButton.onClick.AddListener(CloseView); + viewInstance.PreviewProfileButton.onClick.AddListener(CloseView); + } + + private void CloseView() + { + OnClosed?.Invoke(); } + protected override void OnViewClose() { - base.OnViewClose(); logoutCts.SafeCancelAndDispose(); + base.OnViewClose(); } private void ShowTermsOfService() => diff --git a/Explorer/Assets/DCL/UI/SystemMenu/SystemMenuView.cs b/Explorer/Assets/DCL/UI/SystemMenu/SystemMenuView.cs index 6703a988b3..e432813897 100644 --- a/Explorer/Assets/DCL/UI/SystemMenu/SystemMenuView.cs +++ b/Explorer/Assets/DCL/UI/SystemMenu/SystemMenuView.cs @@ -1,7 +1,4 @@ -using Cysharp.Threading.Tasks; -using DG.Tweening; using MVC; -using System.Threading; using UnityEngine; using UnityEngine.UI; @@ -9,44 +6,10 @@ namespace DCL.UI.SystemMenu { public class SystemMenuView : ViewBase, IView { - private const float PANEL_FADE_TIME = 0.3f; - - [field: SerializeField] - public Button CloseButton { get; private set; } = null!; - - [field: SerializeField] - public Button PreviewProfileButton { get; private set; } = null!; - - [field: SerializeField] - public Button LogoutButton { get; private set; } = null!; - - [field: SerializeField] - public Button ExitAppButton { get; private set; } = null!; - - [field: SerializeField] - public Button PrivacyPolicyButton { get; private set; } = null!; - - [field: SerializeField] - public Button TermsOfServiceButton { get; private set; } = null!; - - [field: SerializeField] - public CanvasGroup? CanvasGroup { get; private set; } - - protected override UniTask PlayShowAnimationAsync(CancellationToken ct) - { - if (CanvasGroup != null) - { - CanvasGroup.alpha = 0; - return CanvasGroup.DOFade(1, PANEL_FADE_TIME).SetEase(Ease.Linear).ToUniTask(cancellationToken: ct); - } - return UniTask.CompletedTask; - } - - protected override UniTask PlayHideAnimationAsync(CancellationToken ct) - { - if (CanvasGroup != null) { return CanvasGroup.DOFade(0, PANEL_FADE_TIME).SetEase(Ease.Linear).ToUniTask(cancellationToken: ct); } - - return UniTask.CompletedTask; - } + [field: SerializeField] public Button PreviewProfileButton { get; private set; } = null!; + [field: SerializeField] public Button LogoutButton { get; private set; } = null!; + [field: SerializeField] public Button ExitAppButton { get; private set; } = null!; + [field: SerializeField] public Button PrivacyPolicyButton { get; private set; } = null!; + [field: SerializeField] public Button TermsOfServiceButton { get; private set; } = null!; } } diff --git a/Explorer/Assets/DCL/UI/UI.asmdef b/Explorer/Assets/DCL/UI/UI.asmdef index 43b511707b..06a32868f8 100644 --- a/Explorer/Assets/DCL/UI/UI.asmdef +++ b/Explorer/Assets/DCL/UI/UI.asmdef @@ -15,7 +15,8 @@ "GUID:d832748739a186646b8656bdbd447ad0", "GUID:5eabe9a3d4dd19d42a16208ea5411062", "GUID:45f6fff651a0a514f8edfdaf9cce45af", - "GUID:a327cdd867b4c134c92b67c566c92ad7" + "GUID:a327cdd867b4c134c92b67c566c92ad7", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/UI/UIAnimationHashes.cs b/Explorer/Assets/DCL/UI/UIAnimationHashes.cs index 49d0526ef4..b7f8fe68dd 100644 --- a/Explorer/Assets/DCL/UI/UIAnimationHashes.cs +++ b/Explorer/Assets/DCL/UI/UIAnimationHashes.cs @@ -8,7 +8,7 @@ public static class UIAnimationHashes public static readonly int UNHOVER = Animator.StringToHash("Unhover"); public static readonly int OUT = Animator.StringToHash("Out"); public static readonly int IN = Animator.StringToHash("In"); - public static readonly int JUMP_IN = Animator.StringToHash("Jump"); + public static readonly int JUMP_IN = Animator.StringToHash("JumpIn"); public static readonly int PRESSED = Animator.StringToHash("Pressed"); public static readonly int LOADING = Animator.StringToHash("Loading"); public static readonly int EXPAND = Animator.StringToHash("Expand"); diff --git a/Explorer/Assets/DCL/UserInAppInitializationFlow/DCL.UserInAppInitializationFlow.asmdef b/Explorer/Assets/DCL/UserInAppInitializationFlow/DCL.UserInAppInitializationFlow.asmdef index 6d9d415cb4..b2e173bd63 100644 --- a/Explorer/Assets/DCL/UserInAppInitializationFlow/DCL.UserInAppInitializationFlow.asmdef +++ b/Explorer/Assets/DCL/UserInAppInitializationFlow/DCL.UserInAppInitializationFlow.asmdef @@ -29,7 +29,8 @@ "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", "GUID:8baf705856414dad9a73b3f382f1bc8b", "GUID:7175400a68914a45acecc9fb068de3b8", - "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b" + "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/Utilities/DCL.Utilities.asmdef b/Explorer/Assets/DCL/Utilities/DCL.Utilities.asmdef index 55eee7fcaf..100e33ce4b 100644 --- a/Explorer/Assets/DCL/Utilities/DCL.Utilities.asmdef +++ b/Explorer/Assets/DCL/Utilities/DCL.Utilities.asmdef @@ -8,7 +8,8 @@ "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", "GUID:b46779583a009f04ba9f5f31d0e7e6ac", - "GUID:4725c02394ab4ce19f889e4e8001f989" + "GUID:4725c02394ab4ce19f889e4e8001f989", + "GUID:56e8195b069a4dca9c4c4f313c65f526" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/DCL/WebRequests/GenericDownloadHandlerUtils.cs b/Explorer/Assets/DCL/WebRequests/GenericDownloadHandlerUtils.cs index 3479cb7d10..8c79b26c4a 100644 --- a/Explorer/Assets/DCL/WebRequests/GenericDownloadHandlerUtils.cs +++ b/Explorer/Assets/DCL/WebRequests/GenericDownloadHandlerUtils.cs @@ -18,6 +18,9 @@ namespace DCL.WebRequests /// </summary> public static class GenericDownloadHandlerUtils { + private const string ORIGIN_HEADER_KEY = "Origin"; + private const string ORIGIN_HEADER_VALUE = "explorer"; + public delegate Exception CreateExceptionOnParseFail(Exception exception, string text); public static Adapter<GenericPostRequest, GenericPostArguments> SignedFetchPostAsync( @@ -46,51 +49,55 @@ public static Adapter<GenericGetRequest, GenericGetArguments> GetAsync( this IWebRequestController controller, CommonArguments commonArguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportData, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null, ISet<long>? ignoreErrorCodes = null - ) => - new (controller, commonArguments, default(GenericGetArguments), ct, reportCategory, headersInfo, signInfo, ignoreErrorCodes, GET_GENERIC); + ) + { + headersInfo ??= new WebRequestHeadersInfo(); + headersInfo.Value.Add(ORIGIN_HEADER_KEY, ORIGIN_HEADER_VALUE); // Probably in the future we will add this origin header also in the rest of requests + return new Adapter<GenericGetRequest, GenericGetArguments>(controller, commonArguments, default(GenericGetArguments), ct, reportData, headersInfo, signInfo, ignoreErrorCodes, GET_GENERIC); + } public static Adapter<GenericPostRequest, GenericPostArguments> PostAsync( this IWebRequestController controller, CommonArguments commonArguments, GenericPostArguments arguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportData, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null) => - new (controller, commonArguments, arguments, ct, reportCategory, headersInfo, signInfo, null, POST_GENERIC); + new (controller, commonArguments, arguments, ct, reportData, headersInfo, signInfo, null, POST_GENERIC); public static Adapter<GenericPutRequest, GenericPutArguments> PutAsync( this IWebRequestController controller, CommonArguments commonArguments, GenericPutArguments arguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportData, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null) => - new (controller, commonArguments, arguments, ct, reportCategory, headersInfo, signInfo, null, PUT_GENERIC); + new (controller, commonArguments, arguments, ct, reportData, headersInfo, signInfo, null, PUT_GENERIC); public static Adapter<GenericPatchRequest, GenericPatchArguments> PatchAsync( this IWebRequestController controller, CommonArguments commonArguments, GenericPatchArguments arguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportData, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null) => - new (controller, commonArguments, arguments, ct, reportCategory, headersInfo, signInfo, null, PATCH_GENERIC); + new (controller, commonArguments, arguments, ct, reportData, headersInfo, signInfo, null, PATCH_GENERIC); public static Adapter<GenericHeadRequest, GenericHeadArguments> HeadAsync( this IWebRequestController controller, CommonArguments commonArguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportData, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null) => - new (controller, commonArguments, default(GenericHeadArguments), ct, reportCategory, headersInfo, signInfo, null, HEAD_GENERIC); + new (controller, commonArguments, default(GenericHeadArguments), ct, reportData, headersInfo, signInfo, null, HEAD_GENERIC); private static async UniTask SwitchToMainThreadAsync(WRThreadFlags flags) { @@ -119,16 +126,16 @@ public readonly struct Adapter<TRequest, TWebRequestArgs> private readonly WebRequestHeadersInfo? headersInfo; private readonly ISet<long>? ignoreErrorCodes; private readonly InitializeRequest<TWebRequestArgs, TRequest> initializeRequest; - private readonly string reportCategory; + private readonly ReportData reportData; private readonly WebRequestSignInfo? signInfo; - public Adapter(IWebRequestController controller, CommonArguments commonArguments, TWebRequestArgs args, CancellationToken ct, string reportCategory, + public Adapter(IWebRequestController controller, CommonArguments commonArguments, TWebRequestArgs args, CancellationToken ct, ReportData reportData, WebRequestHeadersInfo? headersInfo, WebRequestSignInfo? signInfo, ISet<long>? ignoreErrorCodes, InitializeRequest<TWebRequestArgs, TRequest> initializeRequest) { this.commonArguments = commonArguments; this.args = args; this.ct = ct; - this.reportCategory = reportCategory; + this.reportData = reportData; this.headersInfo = headersInfo; this.signInfo = signInfo; this.ignoreErrorCodes = ignoreErrorCodes; @@ -137,7 +144,7 @@ public Adapter(IWebRequestController controller, CommonArguments commonArguments } internal UniTask<TResult> SendAsync<TOp, TResult>(TOp op) where TOp: struct, IWebRequestOp<TRequest, TResult> => - controller.SendAsync<TRequest, TWebRequestArgs, TOp, TResult>(initializeRequest, commonArguments, args, op, ct, reportCategory, headersInfo, signInfo, ignoreErrorCodes); + controller.SendAsync<TRequest, TWebRequestArgs, TOp, TResult>(initializeRequest, commonArguments, args, op, ct, reportData, headersInfo, signInfo, ignoreErrorCodes); public UniTask WithNoOpAsync() => SendAsync<WebRequestUtils.NoOp<TRequest>, WebRequestUtils.NoResult>(new WebRequestUtils.NoOp<TRequest>()); diff --git a/Explorer/Assets/DCL/WebRequests/RequestEnvelope.cs b/Explorer/Assets/DCL/WebRequests/RequestEnvelope.cs index f90d3209b8..6570d781c3 100644 --- a/Explorer/Assets/DCL/WebRequests/RequestEnvelope.cs +++ b/Explorer/Assets/DCL/WebRequests/RequestEnvelope.cs @@ -12,7 +12,7 @@ namespace DCL.WebRequests { public readonly struct RequestEnvelope<TWebRequest, TWebRequestArgs> : IDisposable where TWebRequest: struct, ITypedWebRequest where TWebRequestArgs: struct { - public readonly string ReportCategory; + public readonly ReportData ReportData; public readonly CommonArguments CommonArguments; public readonly CancellationToken Ct; private readonly InitializeRequest<TWebRequestArgs, TWebRequest> initializeRequest; @@ -27,7 +27,7 @@ public RequestEnvelope( InitializeRequest<TWebRequestArgs, TWebRequest> initializeRequest, CommonArguments commonArguments, TWebRequestArgs args, CancellationToken ct, - string reportCategory, + ReportData reportData, WebRequestHeadersInfo headersInfo, WebRequestSignInfo? signInfo, ISet<long>? responseCodeIgnores = null @@ -37,7 +37,7 @@ public RequestEnvelope( this.CommonArguments = commonArguments; this.args = args; this.Ct = ct; - this.ReportCategory = reportCategory; + ReportData = reportData; this.headersInfo = headersInfo; this.signInfo = signInfo; this.responseCodeIgnores = responseCodeIgnores; @@ -50,7 +50,7 @@ public override string ToString() => + $"\nCommonArguments: {CommonArguments}" + $"\nArgs: {args}" + $"\nCancellation Token cancelled: {Ct.IsCancellationRequested}" - + $"\nReportCategory: {ReportCategory}" + + $"\nReportCategory: {ReportData}" + $"\nHeaders: {headersInfo.ToString()}" + $"\nSignInfo: {signInfo?.ToString() ?? NONE}"; @@ -134,7 +134,7 @@ private void SignRequest(UnityWebRequest unityWebRequest, IWeb3IdentityCache web i++; } #if DEBUG - ReportHub.Log(Diagnostics.ReportCategory.GENERIC_WEB_REQUEST, sb); + ReportHub.Log(ReportCategory.GENERIC_WEB_REQUEST, sb); #endif } } diff --git a/Explorer/Assets/DCL/WebRequests/WebRequestController.cs b/Explorer/Assets/DCL/WebRequests/WebRequestController.cs index 870777046a..28ef093b8d 100644 --- a/Explorer/Assets/DCL/WebRequests/WebRequestController.cs +++ b/Explorer/Assets/DCL/WebRequests/WebRequestController.cs @@ -59,7 +59,7 @@ public WebRequestController(IWebRequestsAnalyticsContainer analyticsContainer, I // Print verbose ReportHub.LogError( - envelope.ReportCategory, + envelope.ReportData, $"Exception occured on loading {typeof(TWebRequest).Name} from {envelope.CommonArguments.URL} with {envelope}\n" + $"Attempt Left: {attemptsLeft}" ); diff --git a/Explorer/Assets/DCL/WebRequests/WebRequestControllerExtensions.cs b/Explorer/Assets/DCL/WebRequests/WebRequestControllerExtensions.cs index 3a385cfe07..2ac5dd16f5 100644 --- a/Explorer/Assets/DCL/WebRequests/WebRequestControllerExtensions.cs +++ b/Explorer/Assets/DCL/WebRequests/WebRequestControllerExtensions.cs @@ -29,7 +29,7 @@ public static UniTask<TResult> SendAsync<TWebRequest, TWebRequestArgs, TWebReque CommonArguments commonArguments, TWebRequestArgs args, TWebRequestOp op, CancellationToken ct, - string reportCategory, + ReportData reportData, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null, ISet<long>? ignoreErrorCodes = null @@ -43,7 +43,7 @@ public static UniTask<TResult> SendAsync<TWebRequest, TWebRequestArgs, TWebReque commonArguments, args, ct, - reportCategory, + reportData, headersInfo ?? WebRequestHeadersInfo.NewEmpty(), signInfo, ignoreErrorCodes @@ -55,6 +55,7 @@ public static UniTask<TResult> SignedFetchPostAsync<TOp, TResult>( CommonArguments commonArguments, TOp webRequestOp, string signatureMetadata, + ReportData reportData, CancellationToken ct ) where TOp: struct, IWebRequestOp<GenericPostRequest, TResult> @@ -66,6 +67,7 @@ CancellationToken ct webRequestOp, GenericPostArguments.Empty, ct, + reportData, signInfo: WebRequestSignInfo.NewFromRaw(signatureMetadata, commonArguments.URL, unixTimestamp, "post"), headersInfo: new WebRequestHeadersInfo().WithSign(signatureMetadata, unixTimestamp) ); @@ -79,12 +81,12 @@ public static UniTask<TResult> GetAsync<TOp, TResult>( CommonArguments commonArguments, TOp webRequestOp, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportData, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null, ISet<long>? ignoreErrorCodes = null ) where TOp: struct, IWebRequestOp<GenericGetRequest, TResult> => - controller.SendAsync<GenericGetRequest, GenericGetArguments, TOp, TResult>(GET_GENERIC, commonArguments, default(GenericGetArguments), webRequestOp, ct, reportCategory, headersInfo, signInfo, ignoreErrorCodes); + controller.SendAsync<GenericGetRequest, GenericGetArguments, TOp, TResult>(GET_GENERIC, commonArguments, default(GenericGetArguments), webRequestOp, ct, reportData, headersInfo, signInfo, ignoreErrorCodes); public static UniTask<TResult> PostAsync<TOp, TResult>( this IWebRequestController controller, @@ -92,7 +94,7 @@ public static UniTask<TResult> PostAsync<TOp, TResult>( TOp webRequestOp, GenericPostArguments arguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportCategory, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null) where TOp: struct, IWebRequestOp<GenericPostRequest, TResult> => controller.SendAsync<GenericPostRequest, GenericPostArguments, TOp, TResult>(POST_GENERIC, commonArguments, arguments, webRequestOp, ct, reportCategory, headersInfo, signInfo); @@ -103,7 +105,7 @@ public static UniTask<TResult> PutAsync<TOp, TResult>( TOp webRequestOp, GenericPutArguments arguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportCategory, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null) where TOp: struct, IWebRequestOp<GenericPutRequest, TResult> => controller.SendAsync<GenericPutRequest, GenericPutArguments, TOp, TResult>(PUT_GENERIC, commonArguments, arguments, webRequestOp, ct, reportCategory, headersInfo, signInfo); @@ -114,7 +116,7 @@ public static UniTask<TResult> DeleteAsync<TOp, TResult>( TOp webRequestOp, GenericDeleteArguments arguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportCategory, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null ) where TOp: struct, IWebRequestOp<GenericDeleteRequest, TResult> => @@ -126,7 +128,7 @@ public static UniTask<TResult> PatchAsync<TOp, TResult>( TOp webRequestOp, GenericPatchArguments arguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportCategory, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null) where TOp: struct, IWebRequestOp<GenericPatchRequest, TResult> => controller.SendAsync<GenericPatchRequest, GenericPatchArguments, TOp, TResult>(PATCH_GENERIC, commonArguments, arguments, webRequestOp, ct, reportCategory, headersInfo, signInfo); @@ -137,22 +139,22 @@ public static UniTask<TResult> HeadAsync<TOp, TResult>( TOp webRequestOp, GenericHeadArguments arguments, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportCategory, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null) where TOp: struct, IWebRequestOp<GenericHeadRequest, TResult> => controller.SendAsync<GenericHeadRequest, GenericHeadArguments, TOp, TResult>(HEAD_GENERIC, commonArguments, arguments, webRequestOp, ct, reportCategory, headersInfo, signInfo); - public static async UniTask<bool> IsReachableAsync(this IWebRequestController controller, URLAddress url, CancellationToken ct) + public static async UniTask<bool> IsReachableAsync(this IWebRequestController controller, ReportData reportData, URLAddress url, CancellationToken ct) { await UniTask.SwitchToMainThread(); - try { await HeadAsync<WebRequestUtils.NoOp<GenericHeadRequest>, WebRequestUtils.NoResult>(controller, new CommonArguments(url), new WebRequestUtils.NoOp<GenericHeadRequest>(), default(GenericHeadArguments), ct); } + try { await HeadAsync<WebRequestUtils.NoOp<GenericHeadRequest>, WebRequestUtils.NoResult>(controller, new CommonArguments(url), new WebRequestUtils.NoOp<GenericHeadRequest>(), default(GenericHeadArguments), ct, reportData); } catch (UnityWebRequestException unityWebRequestException) { // Endpoint was unreacheable if (unityWebRequestException.Result == UnityWebRequest.Result.ConnectionError) return false; - + // HEAD request might not be fully supported by the streaming platforms switch (unityWebRequestException.ResponseCode) { @@ -179,11 +181,11 @@ public static UniTask<Texture2D> GetTextureAsync<TOp>( GetTextureArguments args, TOp webRequestOp, CancellationToken ct, - string reportCategory = ReportCategory.GENERIC_WEB_REQUEST, + ReportData reportData, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null ) where TOp: struct, IWebRequestOp<GetTextureWebRequest, Texture2D> => - controller.SendAsync<GetTextureWebRequest, GetTextureArguments, TOp, Texture2D>(GET_TEXTURE, commonArguments, args, webRequestOp, ct, reportCategory, headersInfo, signInfo); + controller.SendAsync<GetTextureWebRequest, GetTextureArguments, TOp, Texture2D>(GET_TEXTURE, commonArguments, args, webRequestOp, ct, reportData, headersInfo, signInfo); /// <summary> /// Make a request that is optimized for audio clip @@ -194,10 +196,10 @@ public static UniTask<AudioClip> GetAudioClipAsync<TOp>( GetAudioClipArguments args, TOp webRequestOp, CancellationToken ct, - string reportCategory = ReportCategory.AUDIO_CLIP_WEB_REQUEST, + ReportData reportData, WebRequestHeadersInfo? headersInfo = null, WebRequestSignInfo? signInfo = null) where TOp: struct, IWebRequestOp<GetAudioClipWebRequest, AudioClip> => - controller.SendAsync<GetAudioClipWebRequest, GetAudioClipArguments, TOp, AudioClip>(GET_AUDIO_CLIP, commonArguments, args, webRequestOp, ct, reportCategory, headersInfo, signInfo); + controller.SendAsync<GetAudioClipWebRequest, GetAudioClipArguments, TOp, AudioClip>(GET_AUDIO_CLIP, commonArguments, args, webRequestOp, ct, reportData, headersInfo, signInfo); public static IWebRequestController WithArtificialDelay(this IWebRequestController origin, ArtificialDelayWebRequestController.IReadOnlyOptions options) => new ArtificialDelayWebRequestController(origin, options); diff --git a/Explorer/Assets/DCL/WebRequests/WebRequestUtils.cs b/Explorer/Assets/DCL/WebRequests/WebRequestUtils.cs index 9570e02990..2ab8412e35 100644 --- a/Explorer/Assets/DCL/WebRequests/WebRequestUtils.cs +++ b/Explorer/Assets/DCL/WebRequests/WebRequestUtils.cs @@ -27,7 +27,7 @@ public static async UniTask<T> WithCustomExceptionAsync<T>(this UniTask<T> webRe } public static bool IsIrrecoverableError(this UnityWebRequestException exception, int attemptLeft) => - attemptLeft <= 0 || ((exception.IsAborted() || exception.IsServerError()) && !exception.IsUnableToCompleteSSLConnection()); + attemptLeft <= 0 || exception.ResponseCode is NOT_FOUND || ((exception.IsAborted() || exception.IsServerError()) && !exception.IsUnableToCompleteSSLConnection()); public static bool IsUnableToCompleteSSLConnection(this UnityWebRequestException exception) { @@ -48,6 +48,12 @@ public static bool IsTimedOut(this UnityWebRequestException exception) => public static bool IsAborted(this UnityWebRequestException exception) => exception is { Result: UnityWebRequest.Result.ConnectionError or UnityWebRequest.Result.ProtocolError, Error: "Request aborted" or "User Aborted" }; + public static string GetResponseContentType(this UnityWebRequest unityWebRequest) => + unityWebRequest.GetResponseHeader("Content-Type"); + + public static string GetResponseContentEncoding(this UnityWebRequest unityWebRequest) => + unityWebRequest.GetResponseHeader("Content-Encoding"); + /// <summary> /// Does nothing with the web request /// </summary> diff --git a/Explorer/Assets/DCL/WorldTime/DCL.WorldTime.asmdef b/Explorer/Assets/DCL/WorldTime/DCL.WorldTime.asmdef index f483f2fc34..d7920d56e5 100644 --- a/Explorer/Assets/DCL/WorldTime/DCL.WorldTime.asmdef +++ b/Explorer/Assets/DCL/WorldTime/DCL.WorldTime.asmdef @@ -4,7 +4,6 @@ "references": [ "GUID:4794e238ed0f65142a4aea5848b513e5", "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", - "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:8322ea9340a544c59ddc56d4793eac74", "GUID:9e314663ce958b746873cb22d57ede55", "GUID:f51ebe6a0ceec4240a699833d6309b23", diff --git a/Explorer/Assets/DCL/_SceneContext.meta b/Explorer/Assets/DCL/_SceneContext.meta new file mode 100644 index 0000000000..2d82717ac3 --- /dev/null +++ b/Explorer/Assets/DCL/_SceneContext.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4daeff436fa97da46927ab43e2e7084a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/_SceneContext/ScenesDebug.meta b/Explorer/Assets/DCL/_SceneContext/ScenesDebug.meta new file mode 100644 index 0000000000..ba21988bdc --- /dev/null +++ b/Explorer/Assets/DCL/_SceneContext/ScenesDebug.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 74b9b8f118fa6ee469ddcebb85116ea5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/_SceneContext/ScenesDebug/ScenesConsistency.meta b/Explorer/Assets/DCL/_SceneContext/ScenesDebug/ScenesConsistency.meta new file mode 100644 index 0000000000..a1d0892596 --- /dev/null +++ b/Explorer/Assets/DCL/_SceneContext/ScenesDebug/ScenesConsistency.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35a118fb0fb4f4145a013da800e74913 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/_SceneContext/ScenesDebug/ScenesConsistency/Reports.meta b/Explorer/Assets/DCL/_SceneContext/ScenesDebug/ScenesConsistency/Reports.meta new file mode 100644 index 0000000000..bd53bb76d2 --- /dev/null +++ b/Explorer/Assets/DCL/_SceneContext/ScenesDebug/ScenesConsistency/Reports.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f42f15cc2c4b5c64fa3d612c5985edef +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Plugins/RustEthereum/SignServerWrap/Libraries/Mac/sign-server.dylib b/Explorer/Assets/Plugins/RustEthereum/SignServerWrap/Libraries/Mac/sign-server.dylib index f35a32903c..620b969c64 100755 Binary files a/Explorer/Assets/Plugins/RustEthereum/SignServerWrap/Libraries/Mac/sign-server.dylib and b/Explorer/Assets/Plugins/RustEthereum/SignServerWrap/Libraries/Mac/sign-server.dylib differ diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev.meta b/Explorer/Assets/Plugins/TypescriptBridge.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev.meta rename to Explorer/Assets/Plugins/TypescriptBridge.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/.gitignore b/Explorer/Assets/Plugins/TypescriptBridge/.gitignore similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/.gitignore rename to Explorer/Assets/Plugins/TypescriptBridge/.gitignore diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/dist.meta b/Explorer/Assets/Plugins/TypescriptBridge/dist.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/dist.meta rename to Explorer/Assets/Plugins/TypescriptBridge/dist.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/node_modules.meta b/Explorer/Assets/Plugins/TypescriptBridge/node_modules.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/node_modules.meta rename to Explorer/Assets/Plugins/TypescriptBridge/node_modules.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/package-lock.json b/Explorer/Assets/Plugins/TypescriptBridge/package-lock.json similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/package-lock.json rename to Explorer/Assets/Plugins/TypescriptBridge/package-lock.json diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/package-lock.json.meta b/Explorer/Assets/Plugins/TypescriptBridge/package-lock.json.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/package-lock.json.meta rename to Explorer/Assets/Plugins/TypescriptBridge/package-lock.json.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/package.json b/Explorer/Assets/Plugins/TypescriptBridge/package.json similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/package.json rename to Explorer/Assets/Plugins/TypescriptBridge/package.json diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/package.json.meta b/Explorer/Assets/Plugins/TypescriptBridge/package.json.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/package.json.meta rename to Explorer/Assets/Plugins/TypescriptBridge/package.json.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src.meta b/Explorer/Assets/Plugins/TypescriptBridge/src.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/checkers.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/checkers.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/checkerStorage.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/checkers/checkerStorage.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/checkerStorage.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/checkers/checkerStorage.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/checkerStorage.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/checkers/checkerStorage.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/checkerStorage.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/checkers/checkerStorage.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/logCheckerStorage.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/checkers/logCheckerStorage.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/logCheckerStorage.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/checkers/logCheckerStorage.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/logCheckerStorage.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/checkers/logCheckerStorage.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/logCheckerStorage.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/checkers/logCheckerStorage.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/wrapCheckerStorage.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/checkers/wrapCheckerStorage.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/wrapCheckerStorage.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/checkers/wrapCheckerStorage.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/wrapCheckerStorage.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/checkers/wrapCheckerStorage.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/checkers/wrapCheckerStorage.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/checkers/wrapCheckerStorage.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/gen.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/gen.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen/apis.d-ti.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/gen/apis.d-ti.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen/apis.d-ti.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/gen/apis.d-ti.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen/apis.d-ti.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/gen/apis.d-ti.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen/apis.d-ti.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/gen/apis.d-ti.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen/apis.d.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/gen/apis.d.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen/apis.d.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/gen/apis.d.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen/apis.d.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/gen/apis.d.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/gen/apis.d.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/gen/apis.d.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/index.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/index.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/index.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/index.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/index.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/index.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/index.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/index.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/lazies.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/lazies.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/lazies.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/lazies.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/lazies/lazy.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/lazies/lazy.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/lazies/lazy.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/lazies/lazy.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/lazies/lazy.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/lazies/lazy.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/lazies/lazy.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/lazies/lazy.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/loggers.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/loggers.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/loggers.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/loggers.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/loggers/logger.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/loggers/logger.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/loggers/logger.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/loggers/logger.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/loggers/logger.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/loggers/logger.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/loggers/logger.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/loggers/logger.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/checkerRegistrationWrap.test.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/checkerRegistrationWrap.test.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/checkerRegistrationWrap.test.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/checkerRegistrationWrap.test.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/checkerRegistrationWrap.test.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/checkerRegistrationWrap.test.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/checkerRegistrationWrap.test.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/checkerRegistrationWrap.test.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/checkerRegistrationWrap.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/checkerRegistrationWrap.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/checkerRegistrationWrap.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/checkerRegistrationWrap.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/checkerRegistrationWrap.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/checkerRegistrationWrap.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/checkerRegistrationWrap.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/checkerRegistrationWrap.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/entities.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/entities.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/entities.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/entities.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/entities/registeredEntities.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/entities/registeredEntities.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/entities/registeredEntities.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/entities/registeredEntities.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/entities/registeredEntities.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/entities/registeredEntities.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/entities/registeredEntities.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/entities/registeredEntities.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/logsRegistrationWrap.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/logsRegistrationWrap.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/logsRegistrationWrap.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/logsRegistrationWrap.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/logsRegistrationWrap.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/logsRegistrationWrap.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/logsRegistrationWrap.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/logsRegistrationWrap.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/registrationWrap.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/registrationWrap.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/registrationWrap.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/registrationWrap.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/registrationWrap.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/registrationWrap.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/registrationWrap.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/registrationWrap.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/testsRegistrationWrap.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/testsRegistrationWrap.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/testsRegistrationWrap.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/testsRegistrationWrap.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/testsRegistrationWrap.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/testsRegistrationWrap.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/registrationWraps/testsRegistrationWrap.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/registrationWraps/testsRegistrationWrap.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/table.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/table.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/table.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/table.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/table/nameCheckerTable.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/table/nameCheckerTable.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/table/nameCheckerTable.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/table/nameCheckerTable.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/table/nameCheckerTable.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/table/nameCheckerTable.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/table/nameCheckerTable.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/table/nameCheckerTable.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/engineApiTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/engineApiTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/engineApiTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/engineApiTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/engineApiTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/engineApiTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/engineApiTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/engineApiTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/environmentTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/environmentTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/environmentTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/environmentTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/environmentTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/environmentTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/environmentTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/environmentTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/ethereumTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/ethereumTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/ethereumTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/ethereumTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/ethereumTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/ethereumTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/ethereumTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/ethereumTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/fetchingTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/fetchingTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/fetchingTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/fetchingTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/fetchingTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/fetchingTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/fetchingTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/fetchingTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/getActiveVideoStreamsTest.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/getActiveVideoStreamsTest.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/getActiveVideoStreamsTest.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/getActiveVideoStreamsTest.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/getActiveVideoStreamsTest.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/getActiveVideoStreamsTest.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/getActiveVideoStreamsTest.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/getActiveVideoStreamsTest.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/identityTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/identityTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/identityTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/identityTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/identityTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/identityTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/identityTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/identityTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/playerTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/playerTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/playerTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/playerTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/playerTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/playerTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/playerTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/playerTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/portableTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/portableTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/portableTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/portableTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/portableTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/portableTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/portableTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/portableTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/restrictedActionsTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/restrictedActionsTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/restrictedActionsTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/restrictedActionsTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/restrictedActionsTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/restrictedActionsTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/restrictedActionsTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/restrictedActionsTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/runtimeTests.Ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/runtimeTests.Ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/runtimeTests.Ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/runtimeTests.Ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/runtimeTests.Ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/runtimeTests.Ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/runtimeTests.Ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/runtimeTests.Ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/sceneTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/sceneTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/sceneTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/sceneTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/sceneTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/sceneTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/sceneTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/sceneTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/signedFetchTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/signedFetchTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/signedFetchTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/signedFetchTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/signedFetchTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/signedFetchTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/signedFetchTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/signedFetchTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/source.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/source.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/source.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/source.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/source/integrationTestsSource.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/source/integrationTestsSource.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/source/integrationTestsSource.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/source/integrationTestsSource.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/source/integrationTestsSource.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/source/integrationTestsSource.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/source/integrationTestsSource.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/source/integrationTestsSource.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/userModuleTests.ts b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/userModuleTests.ts similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/userModuleTests.ts rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/userModuleTests.ts diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/userModuleTests.ts.meta b/Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/userModuleTests.ts.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/src/tests/Integrations/userModuleTests.ts.meta rename to Explorer/Assets/Plugins/TypescriptBridge/src/tests/Integrations/userModuleTests.ts.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/tsconfig.json b/Explorer/Assets/Plugins/TypescriptBridge/tsconfig.json similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/tsconfig.json rename to Explorer/Assets/Plugins/TypescriptBridge/tsconfig.json diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/tsconfig.json.meta b/Explorer/Assets/Plugins/TypescriptBridge/tsconfig.json.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/tsconfig.json.meta rename to Explorer/Assets/Plugins/TypescriptBridge/tsconfig.json.meta diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/webpack.config.js b/Explorer/Assets/Plugins/TypescriptBridge/webpack.config.js similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/webpack.config.js rename to Explorer/Assets/Plugins/TypescriptBridge/webpack.config.js diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/webpack.config.js.meta b/Explorer/Assets/Plugins/TypescriptBridge/webpack.config.js.meta similarity index 100% rename from Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/webpack.config.js.meta rename to Explorer/Assets/Plugins/TypescriptBridge/webpack.config.js.meta diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/CameraTransition.gen.cs b/Explorer/Assets/Protocol/DecentralandProtocol/CameraTransition.gen.cs new file mode 100644 index 0000000000..a38cc46cd8 --- /dev/null +++ b/Explorer/Assets/Protocol/DecentralandProtocol/CameraTransition.gen.cs @@ -0,0 +1,412 @@ +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: decentraland/sdk/components/common/camera_transition.proto +// </auto-generated> +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace DCL.ECSComponents { + + /// <summary>Holder for reflection information generated from decentraland/sdk/components/common/camera_transition.proto</summary> + public static partial class CameraTransitionReflection { + + #region Descriptor + /// <summary>File descriptor for decentraland/sdk/components/common/camera_transition.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CameraTransitionReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjpkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvY29tbW9uL2NhbWVyYV90", + "cmFuc2l0aW9uLnByb3RvEiJkZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMu", + "Y29tbW9uIpYBChBDYW1lcmFUcmFuc2l0aW9uEhgKC2Zyb21fZW50aXR5GAEg", + "ASgNSAGIAQESFgoJdG9fZW50aXR5GAIgASgNSAKIAQESDgoEdGltZRgDIAEo", + "AkgAEg8KBXNwZWVkGAQgASgCSABCEQoPdHJhbnNpdGlvbl9tb2RlQg4KDF9m", + "cm9tX2VudGl0eUIMCgpfdG9fZW50aXR5QhSqAhFEQ0wuRUNTQ29tcG9uZW50", + "c2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.CameraTransition), global::DCL.ECSComponents.CameraTransition.Parser, new[]{ "FromEntity", "ToEntity", "Time", "Speed" }, new[]{ "TransitionMode", "FromEntity", "ToEntity" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class CameraTransition : pb::IMessage<CameraTransition> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<CameraTransition> _parser = new pb::MessageParser<CameraTransition>(() => new CameraTransition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<CameraTransition> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::DCL.ECSComponents.CameraTransitionReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CameraTransition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CameraTransition(CameraTransition other) : this() { + _hasBits0 = other._hasBits0; + fromEntity_ = other.fromEntity_; + toEntity_ = other.toEntity_; + switch (other.TransitionModeCase) { + case TransitionModeOneofCase.Time: + Time = other.Time; + break; + case TransitionModeOneofCase.Speed: + Speed = other.Speed; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CameraTransition Clone() { + return new CameraTransition(this); + } + + /// <summary>Field number for the "from_entity" field.</summary> + public const int FromEntityFieldNumber = 1; + private uint fromEntity_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint FromEntity { + get { if ((_hasBits0 & 1) != 0) { return fromEntity_; } else { return 0; } } + set { + _hasBits0 |= 1; + fromEntity_ = value; + } + } + /// <summary>Gets whether the "from_entity" field is set</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasFromEntity { + get { return (_hasBits0 & 1) != 0; } + } + /// <summary>Clears the value of the "from_entity" field</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFromEntity() { + _hasBits0 &= ~1; + } + + /// <summary>Field number for the "to_entity" field.</summary> + public const int ToEntityFieldNumber = 2; + private uint toEntity_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint ToEntity { + get { if ((_hasBits0 & 2) != 0) { return toEntity_; } else { return 0; } } + set { + _hasBits0 |= 2; + toEntity_ = value; + } + } + /// <summary>Gets whether the "to_entity" field is set</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasToEntity { + get { return (_hasBits0 & 2) != 0; } + } + /// <summary>Clears the value of the "to_entity" field</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearToEntity() { + _hasBits0 &= ~2; + } + + /// <summary>Field number for the "time" field.</summary> + public const int TimeFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Time { + get { return transitionModeCase_ == TransitionModeOneofCase.Time ? (float) transitionMode_ : 0F; } + set { + transitionMode_ = value; + transitionModeCase_ = TransitionModeOneofCase.Time; + } + } + + /// <summary>Field number for the "speed" field.</summary> + public const int SpeedFieldNumber = 4; + /// <summary> + /// meters per second; e.g. speed 1 -> 1 meter per second + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Speed { + get { return transitionModeCase_ == TransitionModeOneofCase.Speed ? (float) transitionMode_ : 0F; } + set { + transitionMode_ = value; + transitionModeCase_ = TransitionModeOneofCase.Speed; + } + } + + private object transitionMode_; + /// <summary>Enum of possible cases for the "transition_mode" oneof.</summary> + public enum TransitionModeOneofCase { + None = 0, + Time = 3, + Speed = 4, + } + private TransitionModeOneofCase transitionModeCase_ = TransitionModeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransitionModeOneofCase TransitionModeCase { + get { return transitionModeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTransitionMode() { + transitionModeCase_ = TransitionModeOneofCase.None; + transitionMode_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CameraTransition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CameraTransition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FromEntity != other.FromEntity) return false; + if (ToEntity != other.ToEntity) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Time, other.Time)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Speed, other.Speed)) return false; + if (TransitionModeCase != other.TransitionModeCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasFromEntity) hash ^= FromEntity.GetHashCode(); + if (HasToEntity) hash ^= ToEntity.GetHashCode(); + if (transitionModeCase_ == TransitionModeOneofCase.Time) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Time); + if (transitionModeCase_ == TransitionModeOneofCase.Speed) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Speed); + hash ^= (int) transitionModeCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasFromEntity) { + output.WriteRawTag(8); + output.WriteUInt32(FromEntity); + } + if (HasToEntity) { + output.WriteRawTag(16); + output.WriteUInt32(ToEntity); + } + if (transitionModeCase_ == TransitionModeOneofCase.Time) { + output.WriteRawTag(29); + output.WriteFloat(Time); + } + if (transitionModeCase_ == TransitionModeOneofCase.Speed) { + output.WriteRawTag(37); + output.WriteFloat(Speed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasFromEntity) { + output.WriteRawTag(8); + output.WriteUInt32(FromEntity); + } + if (HasToEntity) { + output.WriteRawTag(16); + output.WriteUInt32(ToEntity); + } + if (transitionModeCase_ == TransitionModeOneofCase.Time) { + output.WriteRawTag(29); + output.WriteFloat(Time); + } + if (transitionModeCase_ == TransitionModeOneofCase.Speed) { + output.WriteRawTag(37); + output.WriteFloat(Speed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasFromEntity) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FromEntity); + } + if (HasToEntity) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ToEntity); + } + if (transitionModeCase_ == TransitionModeOneofCase.Time) { + size += 1 + 4; + } + if (transitionModeCase_ == TransitionModeOneofCase.Speed) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CameraTransition other) { + if (other == null) { + return; + } + if (other.HasFromEntity) { + FromEntity = other.FromEntity; + } + if (other.HasToEntity) { + ToEntity = other.ToEntity; + } + switch (other.TransitionModeCase) { + case TransitionModeOneofCase.Time: + Time = other.Time; + break; + case TransitionModeOneofCase.Speed: + Speed = other.Speed; + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + FromEntity = input.ReadUInt32(); + break; + } + case 16: { + ToEntity = input.ReadUInt32(); + break; + } + case 29: { + Time = input.ReadFloat(); + break; + } + case 37: { + Speed = input.ReadFloat(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + FromEntity = input.ReadUInt32(); + break; + } + case 16: { + ToEntity = input.ReadUInt32(); + break; + } + case 29: { + Time = input.ReadFloat(); + break; + } + case 37: { + Speed = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/CameraTransition.gen.cs.meta b/Explorer/Assets/Protocol/DecentralandProtocol/CameraTransition.gen.cs.meta new file mode 100644 index 0000000000..69b588a4c6 --- /dev/null +++ b/Explorer/Assets/Protocol/DecentralandProtocol/CameraTransition.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9e46d2bebe3040941a9a996f5b57f72b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/ComponentID.gen.cs b/Explorer/Assets/Protocol/DecentralandProtocol/ComponentID.gen.cs index ba2da30419..8c7156f386 100644 --- a/Explorer/Assets/Protocol/DecentralandProtocol/ComponentID.gen.cs +++ b/Explorer/Assets/Protocol/DecentralandProtocol/ComponentID.gen.cs @@ -30,6 +30,9 @@ public static class ComponentID public const int CAMERA_MODE = 1072; public const int AVATAR_ATTACH = 1073; public const int POINTER_LOCK = 1074; + public const int MAIN_CAMERA = 1075; + public const int VIRTUAL_CAMERA = 1076; + public const int INPUT_MODIFIER = 1078; public const int AVATAR_SHAPE = 1080; public const int VISIBILITY_COMPONENT = 1081; public const int AVATAR_BASE = 1087; diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/InputModifier.gen.cs b/Explorer/Assets/Protocol/DecentralandProtocol/InputModifier.gen.cs new file mode 100644 index 0000000000..36e6126bda --- /dev/null +++ b/Explorer/Assets/Protocol/DecentralandProtocol/InputModifier.gen.cs @@ -0,0 +1,749 @@ +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: decentraland/sdk/components/input_modifier.proto +// </auto-generated> +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace DCL.ECSComponents { + + /// <summary>Holder for reflection information generated from decentraland/sdk/components/input_modifier.proto</summary> + public static partial class InputModifierReflection { + + #region Descriptor + /// <summary>File descriptor for decentraland/sdk/components/input_modifier.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static InputModifierReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjBkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvaW5wdXRfbW9kaWZpZXIu", + "cHJvdG8SG2RlY2VudHJhbGFuZC5zZGsuY29tcG9uZW50cyL/AgoPUEJJbnB1", + "dE1vZGlmaWVyEk4KCHN0YW5kYXJkGAEgASgLMjouZGVjZW50cmFsYW5kLnNk", + "ay5jb21wb25lbnRzLlBCSW5wdXRNb2RpZmllci5TdGFuZGFyZElucHV0SAAa", + "kwIKDVN0YW5kYXJkSW5wdXQSGAoLZGlzYWJsZV9hbGwYASABKAhIAIgBARIZ", + "CgxkaXNhYmxlX3dhbGsYAiABKAhIAYgBARIYCgtkaXNhYmxlX2pvZxgDIAEo", + "CEgCiAEBEhgKC2Rpc2FibGVfcnVuGAQgASgISAOIAQESGQoMZGlzYWJsZV9q", + "dW1wGAUgASgISASIAQESGgoNZGlzYWJsZV9lbW90ZRgGIAEoCEgFiAEBQg4K", + "DF9kaXNhYmxlX2FsbEIPCg1fZGlzYWJsZV93YWxrQg4KDF9kaXNhYmxlX2pv", + "Z0IOCgxfZGlzYWJsZV9ydW5CDwoNX2Rpc2FibGVfanVtcEIQCg5fZGlzYWJs", + "ZV9lbW90ZUIGCgRtb2RlQhSqAhFEQ0wuRUNTQ29tcG9uZW50c2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBInputModifier), global::DCL.ECSComponents.PBInputModifier.Parser, new[]{ "Standard" }, new[]{ "Mode" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBInputModifier.Types.StandardInput), global::DCL.ECSComponents.PBInputModifier.Types.StandardInput.Parser, new[]{ "DisableAll", "DisableWalk", "DisableJog", "DisableRun", "DisableJump", "DisableEmote" }, new[]{ "DisableAll", "DisableWalk", "DisableJog", "DisableRun", "DisableJump", "DisableEmote" }, null, null, null)}) + })); + } + #endregion + + } + #region Messages + public sealed partial class PBInputModifier : pb::IMessage<PBInputModifier> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<PBInputModifier> _parser = new pb::MessageParser<PBInputModifier>(() => new PBInputModifier()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<PBInputModifier> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::DCL.ECSComponents.InputModifierReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PBInputModifier() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PBInputModifier(PBInputModifier other) : this() { + switch (other.ModeCase) { + case ModeOneofCase.Standard: + Standard = other.Standard.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PBInputModifier Clone() { + return new PBInputModifier(this); + } + + /// <summary>Field number for the "standard" field.</summary> + public const int StandardFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::DCL.ECSComponents.PBInputModifier.Types.StandardInput Standard { + get { return modeCase_ == ModeOneofCase.Standard ? (global::DCL.ECSComponents.PBInputModifier.Types.StandardInput) mode_ : null; } + set { + mode_ = value; + modeCase_ = value == null ? ModeOneofCase.None : ModeOneofCase.Standard; + } + } + + private object mode_; + /// <summary>Enum of possible cases for the "mode" oneof.</summary> + public enum ModeOneofCase { + None = 0, + Standard = 1, + } + private ModeOneofCase modeCase_ = ModeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModeOneofCase ModeCase { + get { return modeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMode() { + modeCase_ = ModeOneofCase.None; + mode_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PBInputModifier); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PBInputModifier other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Standard, other.Standard)) return false; + if (ModeCase != other.ModeCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (modeCase_ == ModeOneofCase.Standard) hash ^= Standard.GetHashCode(); + hash ^= (int) modeCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (modeCase_ == ModeOneofCase.Standard) { + output.WriteRawTag(10); + output.WriteMessage(Standard); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (modeCase_ == ModeOneofCase.Standard) { + output.WriteRawTag(10); + output.WriteMessage(Standard); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (modeCase_ == ModeOneofCase.Standard) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Standard); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PBInputModifier other) { + if (other == null) { + return; + } + switch (other.ModeCase) { + case ModeOneofCase.Standard: + if (Standard == null) { + Standard = new global::DCL.ECSComponents.PBInputModifier.Types.StandardInput(); + } + Standard.MergeFrom(other.Standard); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::DCL.ECSComponents.PBInputModifier.Types.StandardInput subBuilder = new global::DCL.ECSComponents.PBInputModifier.Types.StandardInput(); + if (modeCase_ == ModeOneofCase.Standard) { + subBuilder.MergeFrom(Standard); + } + input.ReadMessage(subBuilder); + Standard = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::DCL.ECSComponents.PBInputModifier.Types.StandardInput subBuilder = new global::DCL.ECSComponents.PBInputModifier.Types.StandardInput(); + if (modeCase_ == ModeOneofCase.Standard) { + subBuilder.MergeFrom(Standard); + } + input.ReadMessage(subBuilder); + Standard = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// <summary>Container for nested types declared in the PBInputModifier message type.</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// <summary> + /// when a boolean = false (default) the message is ignored and doesn't consume bandwidth + /// </summary> + public sealed partial class StandardInput : pb::IMessage<StandardInput> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<StandardInput> _parser = new pb::MessageParser<StandardInput>(() => new StandardInput()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<StandardInput> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::DCL.ECSComponents.PBInputModifier.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StandardInput() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StandardInput(StandardInput other) : this() { + _hasBits0 = other._hasBits0; + disableAll_ = other.disableAll_; + disableWalk_ = other.disableWalk_; + disableJog_ = other.disableJog_; + disableRun_ = other.disableRun_; + disableJump_ = other.disableJump_; + disableEmote_ = other.disableEmote_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StandardInput Clone() { + return new StandardInput(this); + } + + /// <summary>Field number for the "disable_all" field.</summary> + public const int DisableAllFieldNumber = 1; + private bool disableAll_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DisableAll { + get { if ((_hasBits0 & 1) != 0) { return disableAll_; } else { return false; } } + set { + _hasBits0 |= 1; + disableAll_ = value; + } + } + /// <summary>Gets whether the "disable_all" field is set</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDisableAll { + get { return (_hasBits0 & 1) != 0; } + } + /// <summary>Clears the value of the "disable_all" field</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDisableAll() { + _hasBits0 &= ~1; + } + + /// <summary>Field number for the "disable_walk" field.</summary> + public const int DisableWalkFieldNumber = 2; + private bool disableWalk_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DisableWalk { + get { if ((_hasBits0 & 2) != 0) { return disableWalk_; } else { return false; } } + set { + _hasBits0 |= 2; + disableWalk_ = value; + } + } + /// <summary>Gets whether the "disable_walk" field is set</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDisableWalk { + get { return (_hasBits0 & 2) != 0; } + } + /// <summary>Clears the value of the "disable_walk" field</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDisableWalk() { + _hasBits0 &= ~2; + } + + /// <summary>Field number for the "disable_jog" field.</summary> + public const int DisableJogFieldNumber = 3; + private bool disableJog_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DisableJog { + get { if ((_hasBits0 & 4) != 0) { return disableJog_; } else { return false; } } + set { + _hasBits0 |= 4; + disableJog_ = value; + } + } + /// <summary>Gets whether the "disable_jog" field is set</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDisableJog { + get { return (_hasBits0 & 4) != 0; } + } + /// <summary>Clears the value of the "disable_jog" field</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDisableJog() { + _hasBits0 &= ~4; + } + + /// <summary>Field number for the "disable_run" field.</summary> + public const int DisableRunFieldNumber = 4; + private bool disableRun_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DisableRun { + get { if ((_hasBits0 & 8) != 0) { return disableRun_; } else { return false; } } + set { + _hasBits0 |= 8; + disableRun_ = value; + } + } + /// <summary>Gets whether the "disable_run" field is set</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDisableRun { + get { return (_hasBits0 & 8) != 0; } + } + /// <summary>Clears the value of the "disable_run" field</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDisableRun() { + _hasBits0 &= ~8; + } + + /// <summary>Field number for the "disable_jump" field.</summary> + public const int DisableJumpFieldNumber = 5; + private bool disableJump_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DisableJump { + get { if ((_hasBits0 & 16) != 0) { return disableJump_; } else { return false; } } + set { + _hasBits0 |= 16; + disableJump_ = value; + } + } + /// <summary>Gets whether the "disable_jump" field is set</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDisableJump { + get { return (_hasBits0 & 16) != 0; } + } + /// <summary>Clears the value of the "disable_jump" field</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDisableJump() { + _hasBits0 &= ~16; + } + + /// <summary>Field number for the "disable_emote" field.</summary> + public const int DisableEmoteFieldNumber = 6; + private bool disableEmote_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DisableEmote { + get { if ((_hasBits0 & 32) != 0) { return disableEmote_; } else { return false; } } + set { + _hasBits0 |= 32; + disableEmote_ = value; + } + } + /// <summary>Gets whether the "disable_emote" field is set</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDisableEmote { + get { return (_hasBits0 & 32) != 0; } + } + /// <summary>Clears the value of the "disable_emote" field</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDisableEmote() { + _hasBits0 &= ~32; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StandardInput); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StandardInput other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (DisableAll != other.DisableAll) return false; + if (DisableWalk != other.DisableWalk) return false; + if (DisableJog != other.DisableJog) return false; + if (DisableRun != other.DisableRun) return false; + if (DisableJump != other.DisableJump) return false; + if (DisableEmote != other.DisableEmote) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasDisableAll) hash ^= DisableAll.GetHashCode(); + if (HasDisableWalk) hash ^= DisableWalk.GetHashCode(); + if (HasDisableJog) hash ^= DisableJog.GetHashCode(); + if (HasDisableRun) hash ^= DisableRun.GetHashCode(); + if (HasDisableJump) hash ^= DisableJump.GetHashCode(); + if (HasDisableEmote) hash ^= DisableEmote.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasDisableAll) { + output.WriteRawTag(8); + output.WriteBool(DisableAll); + } + if (HasDisableWalk) { + output.WriteRawTag(16); + output.WriteBool(DisableWalk); + } + if (HasDisableJog) { + output.WriteRawTag(24); + output.WriteBool(DisableJog); + } + if (HasDisableRun) { + output.WriteRawTag(32); + output.WriteBool(DisableRun); + } + if (HasDisableJump) { + output.WriteRawTag(40); + output.WriteBool(DisableJump); + } + if (HasDisableEmote) { + output.WriteRawTag(48); + output.WriteBool(DisableEmote); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasDisableAll) { + output.WriteRawTag(8); + output.WriteBool(DisableAll); + } + if (HasDisableWalk) { + output.WriteRawTag(16); + output.WriteBool(DisableWalk); + } + if (HasDisableJog) { + output.WriteRawTag(24); + output.WriteBool(DisableJog); + } + if (HasDisableRun) { + output.WriteRawTag(32); + output.WriteBool(DisableRun); + } + if (HasDisableJump) { + output.WriteRawTag(40); + output.WriteBool(DisableJump); + } + if (HasDisableEmote) { + output.WriteRawTag(48); + output.WriteBool(DisableEmote); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasDisableAll) { + size += 1 + 1; + } + if (HasDisableWalk) { + size += 1 + 1; + } + if (HasDisableJog) { + size += 1 + 1; + } + if (HasDisableRun) { + size += 1 + 1; + } + if (HasDisableJump) { + size += 1 + 1; + } + if (HasDisableEmote) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StandardInput other) { + if (other == null) { + return; + } + if (other.HasDisableAll) { + DisableAll = other.DisableAll; + } + if (other.HasDisableWalk) { + DisableWalk = other.DisableWalk; + } + if (other.HasDisableJog) { + DisableJog = other.DisableJog; + } + if (other.HasDisableRun) { + DisableRun = other.DisableRun; + } + if (other.HasDisableJump) { + DisableJump = other.DisableJump; + } + if (other.HasDisableEmote) { + DisableEmote = other.DisableEmote; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + DisableAll = input.ReadBool(); + break; + } + case 16: { + DisableWalk = input.ReadBool(); + break; + } + case 24: { + DisableJog = input.ReadBool(); + break; + } + case 32: { + DisableRun = input.ReadBool(); + break; + } + case 40: { + DisableJump = input.ReadBool(); + break; + } + case 48: { + DisableEmote = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + DisableAll = input.ReadBool(); + break; + } + case 16: { + DisableWalk = input.ReadBool(); + break; + } + case 24: { + DisableJog = input.ReadBool(); + break; + } + case 32: { + DisableRun = input.ReadBool(); + break; + } + case 40: { + DisableJump = input.ReadBool(); + break; + } + case 48: { + DisableEmote = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/InputModifier.gen.cs.meta b/Explorer/Assets/Protocol/DecentralandProtocol/InputModifier.gen.cs.meta new file mode 100644 index 0000000000..49280d8dfd --- /dev/null +++ b/Explorer/Assets/Protocol/DecentralandProtocol/InputModifier.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bd0e34553bfdc314caedb1eb1a3ec892 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/MainCamera.gen.cs b/Explorer/Assets/Protocol/DecentralandProtocol/MainCamera.gen.cs new file mode 100644 index 0000000000..95f7e8d432 --- /dev/null +++ b/Explorer/Assets/Protocol/DecentralandProtocol/MainCamera.gen.cs @@ -0,0 +1,240 @@ +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: decentraland/sdk/components/main_camera.proto +// </auto-generated> +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace DCL.ECSComponents { + + /// <summary>Holder for reflection information generated from decentraland/sdk/components/main_camera.proto</summary> + public static partial class MainCameraReflection { + + #region Descriptor + /// <summary>File descriptor for decentraland/sdk/components/main_camera.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MainCameraReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci1kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvbWFpbl9jYW1lcmEucHJv", + "dG8SG2RlY2VudHJhbGFuZC5zZGsuY29tcG9uZW50cyItCgxQQk1haW5DYW1l", + "cmESHQoVdmlydHVhbF9jYW1lcmFfZW50aXR5GAEgASgNQhSqAhFEQ0wuRUNT", + "Q29tcG9uZW50c2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBMainCamera), global::DCL.ECSComponents.PBMainCamera.Parser, new[]{ "VirtualCameraEntity" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// <summary> + /// PBMainCamera.virtualCameraEntity defines which VirtualCamera entity is active at the moment. 0 means none. + /// </summary> + public sealed partial class PBMainCamera : pb::IMessage<PBMainCamera> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<PBMainCamera> _parser = new pb::MessageParser<PBMainCamera>(() => new PBMainCamera()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<PBMainCamera> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::DCL.ECSComponents.MainCameraReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PBMainCamera() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PBMainCamera(PBMainCamera other) : this() { + virtualCameraEntity_ = other.virtualCameraEntity_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PBMainCamera Clone() { + return new PBMainCamera(this); + } + + /// <summary>Field number for the "virtual_camera_entity" field.</summary> + public const int VirtualCameraEntityFieldNumber = 1; + private uint virtualCameraEntity_; + /// <summary> + /// currently active virtual camera (default: 0) + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint VirtualCameraEntity { + get { return virtualCameraEntity_; } + set { + virtualCameraEntity_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PBMainCamera); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PBMainCamera other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (VirtualCameraEntity != other.VirtualCameraEntity) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (VirtualCameraEntity != 0) hash ^= VirtualCameraEntity.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (VirtualCameraEntity != 0) { + output.WriteRawTag(8); + output.WriteUInt32(VirtualCameraEntity); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (VirtualCameraEntity != 0) { + output.WriteRawTag(8); + output.WriteUInt32(VirtualCameraEntity); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (VirtualCameraEntity != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(VirtualCameraEntity); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PBMainCamera other) { + if (other == null) { + return; + } + if (other.VirtualCameraEntity != 0) { + VirtualCameraEntity = other.VirtualCameraEntity; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + VirtualCameraEntity = input.ReadUInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + VirtualCameraEntity = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/MainCamera.gen.cs.meta b/Explorer/Assets/Protocol/DecentralandProtocol/MainCamera.gen.cs.meta new file mode 100644 index 0000000000..a799079006 --- /dev/null +++ b/Explorer/Assets/Protocol/DecentralandProtocol/MainCamera.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 82a3f49d4f1a992448f78cede8e1b341 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/VirtualCamera.gen.cs b/Explorer/Assets/Protocol/DecentralandProtocol/VirtualCamera.gen.cs new file mode 100644 index 0000000000..4e924386d0 --- /dev/null +++ b/Explorer/Assets/Protocol/DecentralandProtocol/VirtualCamera.gen.cs @@ -0,0 +1,305 @@ +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: decentraland/sdk/components/virtual_camera.proto +// </auto-generated> +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace DCL.ECSComponents { + + /// <summary>Holder for reflection information generated from decentraland/sdk/components/virtual_camera.proto</summary> + public static partial class VirtualCameraReflection { + + #region Descriptor + /// <summary>File descriptor for decentraland/sdk/components/virtual_camera.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static VirtualCameraReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjBkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdmlydHVhbF9jYW1lcmEu", + "cHJvdG8SG2RlY2VudHJhbGFuZC5zZGsuY29tcG9uZW50cxo6ZGVjZW50cmFs", + "YW5kL3Nkay9jb21wb25lbnRzL2NvbW1vbi9jYW1lcmFfdHJhbnNpdGlvbi5w", + "cm90byKTAQoPUEJWaXJ0dWFsQ2FtZXJhElAKEmRlZmF1bHRfdHJhbnNpdGlv", + "bhgBIAEoCzI0LmRlY2VudHJhbGFuZC5zZGsuY29tcG9uZW50cy5jb21tb24u", + "Q2FtZXJhVHJhbnNpdGlvbhIbCg5sb29rX2F0X2VudGl0eRgCIAEoDUgAiAEB", + "QhEKD19sb29rX2F0X2VudGl0eUIUqgIRRENMLkVDU0NvbXBvbmVudHNiBnBy", + "b3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::DCL.ECSComponents.CameraTransitionReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBVirtualCamera), global::DCL.ECSComponents.PBVirtualCamera.Parser, new[]{ "DefaultTransition", "LookAtEntity" }, new[]{ "LookAtEntity" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// <summary> + /// PBVirtualCamera represents a camera to be used at some point in time during the scene execution + /// * The defaultTransition represents the transition TOWARDS this camera. + /// * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from + /// the holding entity transform). + /// </summary> + public sealed partial class PBVirtualCamera : pb::IMessage<PBVirtualCamera> + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser<PBVirtualCamera> _parser = new pb::MessageParser<PBVirtualCamera>(() => new PBVirtualCamera()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser<PBVirtualCamera> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::DCL.ECSComponents.VirtualCameraReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PBVirtualCamera() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PBVirtualCamera(PBVirtualCamera other) : this() { + _hasBits0 = other._hasBits0; + defaultTransition_ = other.defaultTransition_ != null ? other.defaultTransition_.Clone() : null; + lookAtEntity_ = other.lookAtEntity_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PBVirtualCamera Clone() { + return new PBVirtualCamera(this); + } + + /// <summary>Field number for the "default_transition" field.</summary> + public const int DefaultTransitionFieldNumber = 1; + private global::DCL.ECSComponents.CameraTransition defaultTransition_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::DCL.ECSComponents.CameraTransition DefaultTransition { + get { return defaultTransition_; } + set { + defaultTransition_ = value; + } + } + + /// <summary>Field number for the "look_at_entity" field.</summary> + public const int LookAtEntityFieldNumber = 2; + private uint lookAtEntity_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint LookAtEntity { + get { if ((_hasBits0 & 1) != 0) { return lookAtEntity_; } else { return 0; } } + set { + _hasBits0 |= 1; + lookAtEntity_ = value; + } + } + /// <summary>Gets whether the "look_at_entity" field is set</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasLookAtEntity { + get { return (_hasBits0 & 1) != 0; } + } + /// <summary>Clears the value of the "look_at_entity" field</summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearLookAtEntity() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PBVirtualCamera); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PBVirtualCamera other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(DefaultTransition, other.DefaultTransition)) return false; + if (LookAtEntity != other.LookAtEntity) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (defaultTransition_ != null) hash ^= DefaultTransition.GetHashCode(); + if (HasLookAtEntity) hash ^= LookAtEntity.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (defaultTransition_ != null) { + output.WriteRawTag(10); + output.WriteMessage(DefaultTransition); + } + if (HasLookAtEntity) { + output.WriteRawTag(16); + output.WriteUInt32(LookAtEntity); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (defaultTransition_ != null) { + output.WriteRawTag(10); + output.WriteMessage(DefaultTransition); + } + if (HasLookAtEntity) { + output.WriteRawTag(16); + output.WriteUInt32(LookAtEntity); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (defaultTransition_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(DefaultTransition); + } + if (HasLookAtEntity) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(LookAtEntity); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PBVirtualCamera other) { + if (other == null) { + return; + } + if (other.defaultTransition_ != null) { + if (defaultTransition_ == null) { + DefaultTransition = new global::DCL.ECSComponents.CameraTransition(); + } + DefaultTransition.MergeFrom(other.DefaultTransition); + } + if (other.HasLookAtEntity) { + LookAtEntity = other.LookAtEntity; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (defaultTransition_ == null) { + DefaultTransition = new global::DCL.ECSComponents.CameraTransition(); + } + input.ReadMessage(DefaultTransition); + break; + } + case 16: { + LookAtEntity = input.ReadUInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (defaultTransition_ == null) { + DefaultTransition = new global::DCL.ECSComponents.CameraTransition(); + } + input.ReadMessage(DefaultTransition); + break; + } + case 16: { + LookAtEntity = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/VirtualCamera.gen.cs.meta b/Explorer/Assets/Protocol/DecentralandProtocol/VirtualCamera.gen.cs.meta new file mode 100644 index 0000000000..5c6b132da2 --- /dev/null +++ b/Explorer/Assets/Protocol/DecentralandProtocol/VirtualCamera.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5a190328fccd46c4ab77746be56b1854 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Rendering/ForwardRenderer - High.asset b/Explorer/Assets/Rendering/ForwardRenderer - High.asset index 75e758633a..95dae9c2b8 100644 --- a/Explorer/Assets/Rendering/ForwardRenderer - High.asset +++ b/Explorer/Assets/Rendering/ForwardRenderer - High.asset @@ -113,7 +113,7 @@ MonoBehaviour: failOperation: 0 zFailOperation: 0 m_ShadowTransparentReceive: 1 - m_RenderingMode: 0 + m_RenderingMode: 2 m_DepthPrimingMode: 0 m_CopyDepthMode: 0 m_AccurateGbufferNormals: 0 diff --git a/Explorer/Assets/Rendering/ForwardRenderer - Low.asset b/Explorer/Assets/Rendering/ForwardRenderer - Low.asset index 12b53dc881..75628becaa 100644 --- a/Explorer/Assets/Rendering/ForwardRenderer - Low.asset +++ b/Explorer/Assets/Rendering/ForwardRenderer - Low.asset @@ -75,7 +75,7 @@ MonoBehaviour: failOperation: 0 zFailOperation: 0 m_ShadowTransparentReceive: 1 - m_RenderingMode: 0 + m_RenderingMode: 2 m_DepthPrimingMode: 0 m_CopyDepthMode: 0 m_AccurateGbufferNormals: 0 diff --git a/Explorer/Assets/Rendering/ForwardRenderer - Medium.asset b/Explorer/Assets/Rendering/ForwardRenderer - Medium.asset index bd00b35f90..21f6a3bbac 100644 --- a/Explorer/Assets/Rendering/ForwardRenderer - Medium.asset +++ b/Explorer/Assets/Rendering/ForwardRenderer - Medium.asset @@ -75,7 +75,7 @@ MonoBehaviour: failOperation: 0 zFailOperation: 0 m_ShadowTransparentReceive: 1 - m_RenderingMode: 0 + m_RenderingMode: 2 m_DepthPrimingMode: 0 m_CopyDepthMode: 0 m_AccurateGbufferNormals: 0 diff --git a/Explorer/Assets/Rendering/UniversalRenderPipeline - High.asset b/Explorer/Assets/Rendering/UniversalRenderPipeline - High.asset index 0f0a0d1527..8ce38bfc8a 100644 --- a/Explorer/Assets/Rendering/UniversalRenderPipeline - High.asset +++ b/Explorer/Assets/Rendering/UniversalRenderPipeline - High.asset @@ -84,10 +84,10 @@ MonoBehaviour: blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} m_PrefilteringModeMainLightShadows: 3 - m_PrefilteringModeAdditionalLight: 3 + m_PrefilteringModeAdditionalLight: 4 m_PrefilteringModeAdditionalLightShadows: 2 m_PrefilterXRKeywords: 1 - m_PrefilteringModeForwardPlus: 0 + m_PrefilteringModeForwardPlus: 1 m_PrefilteringModeDeferredRendering: 0 m_PrefilteringModeScreenSpaceOcclusion: 0 m_PrefilterDebugKeywords: 1 @@ -105,9 +105,9 @@ MonoBehaviour: m_PrefilterDBufferMRT1: 1 m_PrefilterDBufferMRT2: 1 m_PrefilterDBufferMRT3: 1 - m_PrefilterSoftShadowsQualityLow: 0 - m_PrefilterSoftShadowsQualityMedium: 0 - m_PrefilterSoftShadowsQualityHigh: 0 + m_PrefilterSoftShadowsQualityLow: 1 + m_PrefilterSoftShadowsQualityMedium: 1 + m_PrefilterSoftShadowsQualityHigh: 1 m_PrefilterSoftShadows: 0 m_PrefilterScreenCoord: 1 m_PrefilterNativeRenderPass: 1 diff --git a/Explorer/Assets/Rendering/UniversalRenderPipeline - Low.asset b/Explorer/Assets/Rendering/UniversalRenderPipeline - Low.asset index b4ee65345d..87ea146b03 100644 --- a/Explorer/Assets/Rendering/UniversalRenderPipeline - Low.asset +++ b/Explorer/Assets/Rendering/UniversalRenderPipeline - Low.asset @@ -84,10 +84,10 @@ MonoBehaviour: blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} m_PrefilteringModeMainLightShadows: 3 - m_PrefilteringModeAdditionalLight: 3 + m_PrefilteringModeAdditionalLight: 4 m_PrefilteringModeAdditionalLightShadows: 2 m_PrefilterXRKeywords: 1 - m_PrefilteringModeForwardPlus: 0 + m_PrefilteringModeForwardPlus: 1 m_PrefilteringModeDeferredRendering: 0 m_PrefilteringModeScreenSpaceOcclusion: 0 m_PrefilterDebugKeywords: 1 @@ -105,9 +105,9 @@ MonoBehaviour: m_PrefilterDBufferMRT1: 1 m_PrefilterDBufferMRT2: 1 m_PrefilterDBufferMRT3: 1 - m_PrefilterSoftShadowsQualityLow: 0 - m_PrefilterSoftShadowsQualityMedium: 0 - m_PrefilterSoftShadowsQualityHigh: 0 + m_PrefilterSoftShadowsQualityLow: 1 + m_PrefilterSoftShadowsQualityMedium: 1 + m_PrefilterSoftShadowsQualityHigh: 1 m_PrefilterSoftShadows: 0 m_PrefilterScreenCoord: 1 m_PrefilterNativeRenderPass: 1 diff --git a/Explorer/Assets/Rendering/UniversalRenderPipeline - Medium.asset b/Explorer/Assets/Rendering/UniversalRenderPipeline - Medium.asset index e79d77305a..4a2a6728c8 100644 --- a/Explorer/Assets/Rendering/UniversalRenderPipeline - Medium.asset +++ b/Explorer/Assets/Rendering/UniversalRenderPipeline - Medium.asset @@ -84,10 +84,10 @@ MonoBehaviour: blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} m_PrefilteringModeMainLightShadows: 3 - m_PrefilteringModeAdditionalLight: 3 + m_PrefilteringModeAdditionalLight: 4 m_PrefilteringModeAdditionalLightShadows: 2 m_PrefilterXRKeywords: 1 - m_PrefilteringModeForwardPlus: 0 + m_PrefilteringModeForwardPlus: 1 m_PrefilteringModeDeferredRendering: 0 m_PrefilteringModeScreenSpaceOcclusion: 0 m_PrefilterDebugKeywords: 1 @@ -105,9 +105,9 @@ MonoBehaviour: m_PrefilterDBufferMRT1: 1 m_PrefilterDBufferMRT2: 1 m_PrefilterDBufferMRT3: 1 - m_PrefilterSoftShadowsQualityLow: 0 - m_PrefilterSoftShadowsQualityMedium: 0 - m_PrefilterSoftShadowsQualityHigh: 0 + m_PrefilterSoftShadowsQualityLow: 1 + m_PrefilterSoftShadowsQualityMedium: 1 + m_PrefilterSoftShadowsQualityHigh: 1 m_PrefilterSoftShadows: 0 m_PrefilterScreenCoord: 1 m_PrefilterNativeRenderPass: 1 diff --git a/Explorer/Assets/Scenes/Main.unity b/Explorer/Assets/Scenes/Main.unity index f8b1bb1ed3..acb4410965 100644 --- a/Explorer/Assets/Scenes/Main.unity +++ b/Explorer/Assets/Scenes/Main.unity @@ -472,6 +472,7 @@ MonoBehaviour: remoteHibridWorld: MetadyneLabs.dcl.eth remoteHybridSceneContentServer: 1 useRemoteAssetsBundles: 1 + portableExperiencesEnsToLoadAtGameStart: [] debugViewsCatalog: <Widget>k__BackingField: {fileID: 9197481963319205126, guid: f3bf08b2b62097d4aa0574f7bafa4a86, type: 3} <ControlContainer>k__BackingField: {fileID: 9197481963319205126, guid: 6da3ff28c8a87e0428fa07019c15fa2f, type: 3} @@ -491,12 +492,14 @@ MonoBehaviour: <DropdownField>k__BackingField: {fileID: 9197481963319205126, guid: 63de32c36b8356d42bb93522421d6379, type: 3} debugSettings: showSplash: 1 - showAuthentication: 1 + showAuthentication: 0 showLoading: 1 enableLandscape: 0 enableLOD: 0 - enableVersionUpdateGuard: 0 + enableVersionUpdateGuard: 1 enableEmulateNoLivekitConnection: 0 + enableRemotePortableExperiences: 0 + portableExperiencesEnsToLoad: [] overrideConnectionQuality: 0 connectionQuality: 2 globalPluginSettingsContainer: {fileID: 11400000, guid: 7575a56449e4af444b9c13267319c95d, type: 2} diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementation.cs b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementation.cs index d73651dda6..a838d48bba 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementation.cs +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementation.cs @@ -1,12 +1,11 @@ using CRDT.Memory; using CrdtEcsBridge.PoolsProviders; +using ECS; using SceneRunner.Scene; using SceneRuntime; using System; using System.Buffers; -using System.Collections.Generic; using System.Text; -using Utility; namespace CrdtEcsBridge.JsModulesImplementation.Communications { @@ -15,11 +14,13 @@ public class CommunicationsControllerAPIImplementation : CommunicationsControlle private readonly ICRDTMemoryAllocator crdtMemoryAllocator; public CommunicationsControllerAPIImplementation( + IRealmData realmData, ISceneData sceneData, - ICommunicationControllerHub messagePipesHub, + ISceneCommunicationPipe messagePipesHub, IJsOperations jsOperations, ICRDTMemoryAllocator crdtMemoryAllocator, ISceneStateProvider sceneStateProvider) : base( + realmData, sceneData, messagePipesHub, jsOperations, @@ -28,18 +29,15 @@ public CommunicationsControllerAPIImplementation( this.crdtMemoryAllocator = crdtMemoryAllocator; } - protected override void OnMessageReceived(ICommunicationControllerHub.SceneMessage receivedMessage) + protected override void OnMessageReceived(MsgType messageType, ReadOnlySpan<byte> decodedMessage, string fromWalletId) { - ReadOnlySpan<byte> decodedMessage = receivedMessage.Data.Span; - MsgType msgType = DecodeMessage(ref decodedMessage); - - if (msgType != MsgType.Uint8Array || decodedMessage.Length == 0) + if (messageType != MsgType.Uint8Array) return; // Wallet Id - int walletBytesCount = Encoding.UTF8.GetByteCount(receivedMessage.WalletId); + int walletBytesCount = Encoding.UTF8.GetByteCount(fromWalletId); Span<byte> senderBytes = stackalloc byte[walletBytesCount]; - Encoding.UTF8.GetBytes(receivedMessage.WalletId, senderBytes); + Encoding.UTF8.GetBytes(fromWalletId, senderBytes); int messageLength = senderBytes.Length + decodedMessage.Length + 1; diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementationBase.cs b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementationBase.cs index 8cb1e6f16f..3b9767228a 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementationBase.cs +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementationBase.cs @@ -1,6 +1,5 @@ using CrdtEcsBridge.PoolsProviders; -using DCL.Multiplayer.Connections.Messaging; -using Decentraland.Kernel.Comms.Rfc4; +using ECS; using SceneRunner.Scene; using SceneRuntime; using SceneRuntime.Apis.Modules.CommunicationsControllerApi; @@ -12,39 +11,49 @@ namespace CrdtEcsBridge.JsModulesImplementation.Communications { - public class CommunicationsControllerAPIImplementationBase : ICommunicationsControllerAPI + public abstract class CommunicationsControllerAPIImplementationBase : ICommunicationsControllerAPI { - internal enum MsgType + public enum MsgType { String = 1, // SDK scenes MessageBus messages Uint8Array = 2, } - protected readonly CancellationTokenSource cancellationTokenSource = new (); - protected readonly ICommunicationControllerHub messagePipesHub; - protected readonly ISceneData sceneData; - protected readonly ISceneStateProvider sceneStateProvider; - protected readonly IJsOperations jsOperations; - protected readonly Action<ICommunicationControllerHub.SceneMessage> onMessageReceivedCached; protected readonly List<IMemoryOwner<byte>> eventsToProcess = new (); + private readonly CancellationTokenSource cancellationTokenSource = new (); + private readonly ISceneCommunicationPipe sceneCommunicationPipe; + private readonly IRealmData realmData; + private readonly ISceneData sceneData; + private readonly ISceneStateProvider sceneStateProvider; + private readonly IJsOperations jsOperations; + private readonly Action<ISceneCommunicationPipe.SceneMessage> onMessageReceivedCached; + internal IReadOnlyList<IMemoryOwner<byte>> EventsToProcess => eventsToProcess; - public CommunicationsControllerAPIImplementationBase( + protected CommunicationsControllerAPIImplementationBase( + IRealmData realmData, ISceneData sceneData, - ICommunicationControllerHub messagePipesHub, + ISceneCommunicationPipe sceneCommunicationPipe, IJsOperations jsOperations, ISceneStateProvider sceneStateProvider) { + this.realmData = realmData; this.sceneData = sceneData; - this.messagePipesHub = messagePipesHub; + this.sceneCommunicationPipe = sceneCommunicationPipe; this.jsOperations = jsOperations; this.sceneStateProvider = sceneStateProvider; onMessageReceivedCached = OnMessageReceived; + + // if it's the world subscribe to the messages straight-away + if (IgnoreIsCurrentScene()) + this.sceneCommunicationPipe.SetSceneMessageHandler(onMessageReceivedCached); } public void Dispose() { + sceneCommunicationPipe.RemoveSceneMessageHandler(onMessageReceivedCached); + lock (eventsToProcess) { CleanUpReceivedMessages(); } cancellationTokenSource.SafeCancelAndDispose(); @@ -52,34 +61,22 @@ public void Dispose() public void OnSceneIsCurrentChanged(bool isCurrent) { + if (IgnoreIsCurrentScene()) return; + if (isCurrent) - messagePipesHub.SetSceneMessageHandler(onMessageReceivedCached); + sceneCommunicationPipe.SetSceneMessageHandler(onMessageReceivedCached); else - messagePipesHub.RemoveSceneMessageHandler(onMessageReceivedCached); + sceneCommunicationPipe.RemoveSceneMessageHandler(onMessageReceivedCached); } public object SendBinary(IReadOnlyList<PoolableByteArray> data) { - if (!sceneStateProvider.IsCurrent) + if (!IgnoreIsCurrentScene() && !sceneStateProvider.IsCurrent) return jsOperations.ConvertToScriptTypedArrays(Array.Empty<IMemoryOwner<byte>>()); foreach (PoolableByteArray poolable in data) - { - if (poolable.Length == 0) - continue; - - Memory<byte> message = poolable.Memory; - - EncodeAndSend(); - - void EncodeAndSend() - { - Span<byte> encodedMessage = stackalloc byte[message.Length + 1]; - encodedMessage[0] = (byte)MsgType.Uint8Array; - message.Span.CopyTo(encodedMessage[1..]); - SendMessage(encodedMessage); - } - } + if (poolable.Length > 0) + EncodeAndSendMessage(MsgType.Uint8Array, poolable.Memory.Span); lock (eventsToProcess) { @@ -90,6 +87,14 @@ void EncodeAndSend() } } + /// <summary> + /// If it's a world there is a single scene for the whole world, it's controlled by the endpoint + /// so there is no static reliable way to check it if in the future that behavior changes + /// </summary> + /// <returns></returns> + private bool IgnoreIsCurrentScene() => + realmData.ScenesAreFixed; + private void CleanUpReceivedMessages() { foreach (IMemoryOwner<byte>? message in eventsToProcess) @@ -98,18 +103,32 @@ private void CleanUpReceivedMessages() eventsToProcess.Clear(); } - private void SendMessage(ReadOnlySpan<byte> message) + protected void EncodeAndSendMessage(MsgType msgType, ReadOnlySpan<byte> message) { - messagePipesHub.SendMessage(message, sceneData.SceneEntityDefinition.id!, cancellationTokenSource.Token); + Span<byte> encodedMessage = stackalloc byte[message.Length + 1]; + encodedMessage[0] = (byte)msgType; + message.CopyTo(encodedMessage[1..]); + sceneCommunicationPipe.SendMessage(encodedMessage, sceneData.SceneEntityDefinition.id!, cancellationTokenSource.Token); } - protected virtual void OnMessageReceived(ICommunicationControllerHub.SceneMessage receivedMessage) { } - - internal static MsgType DecodeMessage(ref ReadOnlySpan<byte> value) + private static MsgType DecodeMessage(ref ReadOnlySpan<byte> value) { var msgType = (MsgType)value[0]; value = value[1..]; return msgType; } + + private void OnMessageReceived(ISceneCommunicationPipe.SceneMessage receivedMessage) + { + ReadOnlySpan<byte> decodedMessage = receivedMessage.Data.Span; + MsgType msgType = DecodeMessage(ref decodedMessage); + + if (decodedMessage.Length == 0) + return; + + OnMessageReceived(msgType, decodedMessage, receivedMessage.FromWalletId); + } + + protected abstract void OnMessageReceived(MsgType messageType, ReadOnlySpan<byte> decodedMessage, string fromWalletId); } } diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ICommunicationControllerHub.cs b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ISceneCommunicationPipe.cs similarity index 86% rename from Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ICommunicationControllerHub.cs rename to Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ISceneCommunicationPipe.cs index 08939391c3..86a4d44733 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ICommunicationControllerHub.cs +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ISceneCommunicationPipe.cs @@ -5,7 +5,7 @@ namespace CrdtEcsBridge.JsModulesImplementation.Communications { - public interface ICommunicationControllerHub + public interface ISceneCommunicationPipe { void SetSceneMessageHandler(Action<SceneMessage> onSceneMessage); @@ -17,13 +17,13 @@ readonly struct SceneMessage { public readonly ReadOnlyMemory<byte> Data; public readonly string SceneId; - public readonly string WalletId; + public readonly string FromWalletId; private SceneMessage(in ReceivedMessage<Scene> message) { Data = message.Payload.Data.Memory; SceneId = message.Payload.SceneId; - WalletId = message.FromWalletId; + FromWalletId = message.FromWalletId; } public static SceneMessage CopyFrom(in ReceivedMessage<Scene> message) => diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ICommunicationControllerHub.cs.meta b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ISceneCommunicationPipe.cs.meta similarity index 100% rename from Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ICommunicationControllerHub.cs.meta rename to Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/ISceneCommunicationPipe.cs.meta diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/SDKMessageBus/SDKMessageBusCommsAPIImplementation.cs b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/SDKMessageBus/SDKMessageBusCommsAPIImplementation.cs index f0538f54d3..8d940df14b 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/SDKMessageBus/SDKMessageBusCommsAPIImplementation.cs +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/SDKMessageBus/SDKMessageBusCommsAPIImplementation.cs @@ -1,3 +1,4 @@ +using ECS; using SceneRunner.Scene; using SceneRuntime; using SceneRuntime.Apis.Modules.CommunicationsControllerApi.SDKMessageBus; @@ -10,33 +11,32 @@ namespace CrdtEcsBridge.JsModulesImplementation.Communications.SDKMessageBus { public class SDKMessageBusCommsAPIImplementation : CommunicationsControllerAPIImplementationBase, ISDKMessageBusCommsControllerAPI { - public List<CommsPayload> SceneCommsMessages { get; } = new (); + private readonly List<CommsPayload> messages = new (); - public SDKMessageBusCommsAPIImplementation(ISceneData sceneData, ICommunicationControllerHub messagePipesHub, IJsOperations jsOperations, ISceneStateProvider sceneStateProvider) : base(sceneData, messagePipesHub, jsOperations, sceneStateProvider) + public IReadOnlyList<CommsPayload> SceneCommsMessages => messages; + + public SDKMessageBusCommsAPIImplementation(IRealmData realmData, ISceneData sceneData, ISceneCommunicationPipe sceneCommunicationPipe, IJsOperations jsOperations, ISceneStateProvider sceneStateProvider) + : base(realmData, sceneData, sceneCommunicationPipe, jsOperations, sceneStateProvider) { } + + public void ClearMessages() { + messages.Clear(); } public void Send(string data) { - var dataBytes = Encoding.UTF8.GetBytes(data); - Span<byte> encodedMessage = stackalloc byte[dataBytes.Length + 1]; - encodedMessage[0] = (byte)MsgType.String; - dataBytes.CopyTo(encodedMessage[1..]); - - messagePipesHub.SendMessage(encodedMessage, sceneData.SceneEntityDefinition.id, cancellationTokenSource.Token); + byte[] dataBytes = Encoding.UTF8.GetBytes(data); + EncodeAndSendMessage(MsgType.String, dataBytes); } - protected override void OnMessageReceived(ICommunicationControllerHub.SceneMessage receivedMessage) + protected override void OnMessageReceived(MsgType messageType, ReadOnlySpan<byte> decodedMessage, string fromWalletId) { - ReadOnlySpan<byte> decodedMessage = receivedMessage.Data.Span; - MsgType msgType = DecodeMessage(ref decodedMessage); - - if (msgType != MsgType.String || decodedMessage.Length == 0) + if (messageType != MsgType.String) return; - SceneCommsMessages.Add(new CommsPayload + messages.Add(new CommsPayload { - sender = receivedMessage.WalletId, + sender = fromWalletId, message = Encoding.UTF8.GetString(decodedMessage) }); } diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationControllerHub.cs b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/SceneCommunicationPipe.cs similarity index 72% rename from Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationControllerHub.cs rename to Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/SceneCommunicationPipe.cs index 09217d1c25..53927a5c75 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationControllerHub.cs +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/SceneCommunicationPipe.cs @@ -13,12 +13,12 @@ namespace CrdtEcsBridge.JsModulesImplementation.Communications /// We can't subscribe to the `Scene` message multiple times /// so Hub handles the subscription and the API implementation handles the message processing /// </summary> - public class CommunicationControllerHub : ICommunicationControllerHub + public class SceneCommunicationPipe : ISceneCommunicationPipe { - private Action<ICommunicationControllerHub.SceneMessage>? onSceneMessage; + private Action<ISceneCommunicationPipe.SceneMessage>? onSceneMessage; private readonly IMessagePipe messagePipe; - public CommunicationControllerHub(IMessagePipesHub messagePipesHub) + public SceneCommunicationPipe(IMessagePipesHub messagePipesHub) { messagePipe = messagePipesHub.ScenePipe(); messagePipe.Subscribe<Scene>(Packet.MessageOneofCase.Scene, InvokeCurrentHandler); @@ -27,15 +27,15 @@ public CommunicationControllerHub(IMessagePipesHub messagePipesHub) private void InvokeCurrentHandler(ReceivedMessage<Scene> message) { using (message) - onSceneMessage?.Invoke(ICommunicationControllerHub.SceneMessage.CopyFrom(in message)); + onSceneMessage?.Invoke(ISceneCommunicationPipe.SceneMessage.CopyFrom(in message)); } - public void RemoveSceneMessageHandler(Action<ICommunicationControllerHub.SceneMessage> onSceneMessage) + public void RemoveSceneMessageHandler(Action<ISceneCommunicationPipe.SceneMessage> onSceneMessage) { lock (this) { this.onSceneMessage -= onSceneMessage; } } - public void SetSceneMessageHandler(Action<ICommunicationControllerHub.SceneMessage> onSceneMessage) + public void SetSceneMessageHandler(Action<ISceneCommunicationPipe.SceneMessage> onSceneMessage) { lock (this) { this.onSceneMessage += onSceneMessage; } } diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationControllerHub.cs.meta b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/SceneCommunicationPipe.cs.meta similarity index 100% rename from Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationControllerHub.cs.meta rename to Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Communications/SceneCommunicationPipe.cs.meta diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/JsModulesImplementation.asmdef b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/JsModulesImplementation.asmdef index 64db2cf9a7..3e9e8616a9 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/JsModulesImplementation.asmdef +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/JsModulesImplementation.asmdef @@ -26,6 +26,8 @@ "GUID:702f733b4deb246808c6ce84d93b5c9c", "GUID:166b65e6dfc848bb9fb075f53c293a38", "GUID:b4018cfd60a549f6ab9f20b9a5db4a56", + "GUID:1d2c76eb8b48e0b40940e8b31a679ce1", + "GUID:f1eaef1b40a68e74cb90cbedebf57bbf", "GUID:7175400a68914a45acecc9fb068de3b8" ], "includePlatforms": [], diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/SDKObservableEventsEngineAPIImplementation.cs b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/SDKObservableEventsEngineAPIImplementation.cs index bd4254ecf6..e8eaa359af 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/SDKObservableEventsEngineAPIImplementation.cs +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/SDKObservableEventsEngineAPIImplementation.cs @@ -6,6 +6,7 @@ using CrdtEcsBridge.PoolsProviders; using CrdtEcsBridge.UpdateGate; using CrdtEcsBridge.WorldSynchronizer; +using DCL.Diagnostics; using DCL.ECS7; using DCL.ECSComponents; using SceneRunner.Scene.ExceptionsHandling; @@ -19,6 +20,9 @@ namespace CrdtEcsBridge.JsModulesImplementation public class SDKObservableEventsEngineAPIImplementation : EngineAPIImplementation, ISDKObservableEventsEngineApi { private readonly Dictionary<CRDTEntity, string> userIdEntitiesMap = new (); + private readonly List<SDKObservableEvent> sdkObservableEvents = new (); + private readonly HashSet<string> sdkObservableEventSubscriptions = new (); + private bool enableSDKObservableMessagesDetection; private bool reportedSceneReady; public SDKObservableEventsEngineAPIImplementation(ISharedPoolsProvider poolsProvider, IInstancePoolsProvider instancePoolsProvider, ICRDTProtocol crdtProtocol, ICRDTDeserializer crdtDeserializer, ICRDTSerializer crdtSerializer, @@ -26,37 +30,66 @@ public SDKObservableEventsEngineAPIImplementation(ISharedPoolsProvider poolsProv ISystemGroupsUpdateGate systemGroupsUpdateGate, ISceneExceptionsHandler exceptionsHandler, MultithreadSync multithreadSync) : base(poolsProvider, instancePoolsProvider, crdtProtocol, crdtDeserializer, crdtSerializer, crdtWorldSynchronizer, outgoingCrtdMessagesProvider, - systemGroupsUpdateGate, exceptionsHandler, multithreadSync) + systemGroupsUpdateGate, exceptionsHandler, multithreadSync) { } + + public void TryAddSubscription(string eventId) { + if (eventId == SDKObservableEventIds.PlayerClicked) + { + ReportHub.LogWarning(new ReportData(ReportCategory.SDK_OBSERVABLES), "Scene subscribed to unsupported SDK Observable 'PlayerClicked'"); + return; + } + + sdkObservableEventSubscriptions.Add(eventId); + enableSDKObservableMessagesDetection = true; } - public bool EnableSDKObservableMessagesDetection { get; set; } = false; - public List<SDKObservableEvent> SdkObservableEvents { get; } = new (); - public HashSet<string> SdkObservableEventSubscriptions { get; } = new (); + public void RemoveSubscriptionIfExists(string eventId) + { + sdkObservableEventSubscriptions.Remove(eventId); - public override void SetIsDisposing() + if (sdkObservableEventSubscriptions.Count == 0) + enableSDKObservableMessagesDetection = false; + } + + public bool HasSubscription(string eventId) => + sdkObservableEventSubscriptions.Contains(eventId); + + public bool IsAnySubscription() => + sdkObservableEventSubscriptions.Count > 0; + + public void AddSDKObservableEvent(SDKObservableEvent sdkObservableEvent) { - userIdEntitiesMap.Clear(); - SdkObservableEvents.Clear(); - SdkObservableEventSubscriptions.Clear(); + sdkObservableEvents.Add(sdkObservableEvent); + } - base.SetIsDisposing(); + public void ClearSDKObservableEvents() + { + sdkObservableEvents.Clear(); } public PoolableSDKObservableEventArray? ConsumeSDKObservableEvents() { - if (SdkObservableEvents.Count == 0) return null; + if (sdkObservableEvents.Count == 0) return null; - PoolableSDKObservableEventArray serializationBufferPoolable = sharedPoolsProvider.GetSerializationSDKObservableEventsPool(SdkObservableEvents.Count); - for (var i = 0; i < SdkObservableEvents.Count; i++) - { - serializationBufferPoolable.Array[i] = SdkObservableEvents[i]; - } - SdkObservableEvents.Clear(); + PoolableSDKObservableEventArray serializationBufferPoolable = sharedPoolsProvider.GetSerializationSDKObservableEventsPool(sdkObservableEvents.Count); + + for (var i = 0; i < sdkObservableEvents.Count; i++) { serializationBufferPoolable.Array[i] = sdkObservableEvents[i]; } + + sdkObservableEvents.Clear(); return serializationBufferPoolable; } + public override void SetIsDisposing() + { + userIdEntitiesMap.Clear(); + sdkObservableEvents.Clear(); + sdkObservableEventSubscriptions.Clear(); + + base.SetIsDisposing(); + } + protected override void ProcessPendingMessage(OutgoingCRDTMessagesProvider.PendingMessage pendingMessage) { if (SDKObservableComponentIDs.Ids.Contains(pendingMessage.Bridge.Id)) @@ -69,7 +102,7 @@ private void DetectObservableEventsFromComponents(OutgoingCRDTMessagesProvider.P // for scenes that may subscribe to observables later in their execution DetectPlayerIdentityDataComponent(pendingMessage); - if (!EnableSDKObservableMessagesDetection) return; + if (!enableSDKObservableMessagesDetection) return; DetectOtherObservableComponents(pendingMessage); } @@ -84,19 +117,19 @@ private void DetectPlayerIdentityDataComponent(OutgoingCRDTMessagesProvider.Pend { case CRDTMessageType.PUT_COMPONENT: // onEnterScene + playerConnected observables - if (EnableSDKObservableMessagesDetection) + if (enableSDKObservableMessagesDetection) { - bool onEnterSceneSubscribed = SdkObservableEventSubscriptions.Contains(SDKObservableEventIds.EnterScene); - bool onPlayerConnectedSubscribed = SdkObservableEventSubscriptions.Contains(SDKObservableEventIds.PlayerConnected); + bool onEnterSceneSubscribed = sdkObservableEventSubscriptions.Contains(SDKObservableEventIds.EnterScene); + bool onPlayerConnectedSubscribed = sdkObservableEventSubscriptions.Contains(SDKObservableEventIds.PlayerConnected); if (onEnterSceneSubscribed) - SdkObservableEvents.Add(SDKObservableUtils.GenerateSDKObservableEvent(SDKObservableEventIds.EnterScene, new UserIdPayload + sdkObservableEvents.Add(SDKObservableUtils.NewSDKObservableEventFromData(SDKObservableEventIds.EnterScene, new UserIdPayload { userId = playerIdentityData.Address, })); if (onPlayerConnectedSubscribed) - SdkObservableEvents.Add(SDKObservableUtils.GenerateSDKObservableEvent(SDKObservableEventIds.PlayerConnected, new UserIdPayload + sdkObservableEvents.Add(SDKObservableUtils.NewSDKObservableEventFromData(SDKObservableEventIds.PlayerConnected, new UserIdPayload { userId = playerIdentityData.Address, })); @@ -108,16 +141,16 @@ private void DetectPlayerIdentityDataComponent(OutgoingCRDTMessagesProvider.Pend if (userIdEntitiesMap.ContainsKey(pendingMessage.Entity)) // we may get more than 1 DELETE_COMPONENT of the same component { // onLeaveScene + playerDisconnected observables - if (EnableSDKObservableMessagesDetection) + if (enableSDKObservableMessagesDetection) { - if (SdkObservableEventSubscriptions.Contains(SDKObservableEventIds.LeaveScene)) - SdkObservableEvents.Add(SDKObservableUtils.GenerateSDKObservableEvent(SDKObservableEventIds.LeaveScene, new UserIdPayload + if (sdkObservableEventSubscriptions.Contains(SDKObservableEventIds.LeaveScene)) + sdkObservableEvents.Add(SDKObservableUtils.NewSDKObservableEventFromData(SDKObservableEventIds.LeaveScene, new UserIdPayload { userId = userIdEntitiesMap[pendingMessage.Entity], })); - if (SdkObservableEventSubscriptions.Contains(SDKObservableEventIds.PlayerDisconnected)) - SdkObservableEvents.Add(SDKObservableUtils.GenerateSDKObservableEvent(SDKObservableEventIds.PlayerDisconnected, new UserIdPayload + if (sdkObservableEventSubscriptions.Contains(SDKObservableEventIds.PlayerDisconnected)) + sdkObservableEvents.Add(SDKObservableUtils.NewSDKObservableEventFromData(SDKObservableEventIds.PlayerDisconnected, new UserIdPayload { userId = userIdEntitiesMap[pendingMessage.Entity], })); @@ -140,19 +173,19 @@ private void DetectOtherObservableComponents(OutgoingCRDTMessagesProvider.Pendin case ComponentID.ENGINE_INFO: // onSceneReady observable if (reportedSceneReady) break; - if (SdkObservableEventSubscriptions.Contains(SDKObservableEventIds.SceneReady)) + if (sdkObservableEventSubscriptions.Contains(SDKObservableEventIds.SceneReady)) { - SdkObservableEvents.Add(SDKObservableUtils.GenerateSDKObservableEvent(SDKObservableEventIds.SceneReady, new SceneReadyPayload())); + sdkObservableEvents.Add(SDKObservableUtils.NewSDKObservableEventFromData(SDKObservableEventIds.SceneReady, new SceneReadyPayload())); reportedSceneReady = true; } break; case ComponentID.REALM_INFO: // onRealmChanged observables - if (SdkObservableEventSubscriptions.Contains(SDKObservableEventIds.RealmChanged)) + if (sdkObservableEventSubscriptions.Contains(SDKObservableEventIds.RealmChanged)) { var realmInfo = (PBRealmInfo)message.Message; - SdkObservableEvents.Add(SDKObservableUtils.GenerateSDKObservableEvent(SDKObservableEventIds.RealmChanged, new RealmChangedPayload + sdkObservableEvents.Add(SDKObservableUtils.NewSDKObservableEventFromData(SDKObservableEventIds.RealmChanged, new RealmChangedPayload { domain = realmInfo.BaseUrl, room = realmInfo.Room, @@ -164,11 +197,11 @@ private void DetectOtherObservableComponents(OutgoingCRDTMessagesProvider.Pendin break; case ComponentID.AVATAR_EQUIPPED_DATA: // profileChanged observable case ComponentID.AVATAR_BASE: // profileChanged observable - if (SdkObservableEventSubscriptions.Contains(SDKObservableEventIds.ProfileChanged)) + if (sdkObservableEventSubscriptions.Contains(SDKObservableEventIds.ProfileChanged)) { if (!userIdEntitiesMap.ContainsKey(message.Entity)) break; - SdkObservableEvents.Add(SDKObservableUtils.GenerateSDKObservableEvent(SDKObservableEventIds.ProfileChanged, new ProfileChangedPayload + sdkObservableEvents.Add(SDKObservableUtils.NewSDKObservableEventFromData(SDKObservableEventIds.ProfileChanged, new ProfileChangedPayload { ethAddress = userIdEntitiesMap[message.Entity], version = 0, @@ -183,11 +216,11 @@ private void DetectOtherObservableComponents(OutgoingCRDTMessagesProvider.Pendin break; case CRDTMessageType.APPEND_COMPONENT: if (message.Bridge.Id == ComponentID.AVATAR_EMOTE_COMMAND) - if (SdkObservableEventSubscriptions.Contains(SDKObservableEventIds.PlayerExpression)) + if (sdkObservableEventSubscriptions.Contains(SDKObservableEventIds.PlayerExpression)) { - var avatarEmoteCommand = (PBAvatarEmoteCommand) message.Message; + var avatarEmoteCommand = (PBAvatarEmoteCommand)message.Message; - SdkObservableEvents.Add(SDKObservableUtils.GenerateSDKObservableEvent(SDKObservableEventIds.PlayerExpression, new PlayerExpressionPayload + sdkObservableEvents.Add(SDKObservableUtils.NewSDKObservableEventFromData(SDKObservableEventIds.PlayerExpression, new PlayerExpressionPayload { expressionId = avatarEmoteCommand.EmoteUrn, })); diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/SimpleFetchApiImplementation.cs b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/SimpleFetchApiImplementation.cs index d6ae998756..84aa2da501 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/SimpleFetchApiImplementation.cs +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/SimpleFetchApiImplementation.cs @@ -28,6 +28,13 @@ private enum RequestMethod INVALID, } + private readonly SceneShortInfo sceneShortInfo; + + public SimpleFetchApiImplementation(SceneShortInfo sceneShortInfo) + { + this.sceneShortInfo = sceneShortInfo; + } + public void Dispose() { } public async UniTask<ISimpleFetchApi.Response> FetchAsync( @@ -48,7 +55,7 @@ CancellationToken ct throw new ArgumentException("Invalid request method."); var commonArguments = new CommonArguments(URLAddress.FromString(url), timeout: timeout); - var webRequestHeaders = HeadersFromJsObject(headers); + WebRequestHeadersInfo webRequestHeaders = HeadersFromJsObject(headers); try { @@ -57,23 +64,23 @@ CancellationToken ct switch (parsedRequestMethod) { case RequestMethod.GET: - return await webController.GetAsync<GenerateResponseOp<GenericGetRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericGetRequest>(), ct, ReportCategory.SCENE_FETCH_REQUEST, webRequestHeaders); + return await webController.GetAsync<GenerateResponseOp<GenericGetRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericGetRequest>(), ct, GetReportData(), webRequestHeaders); case RequestMethod.POST: string postContentType = webRequestHeaders.HeaderContentType(); var postArguments = GenericPostArguments.Create(body, postContentType); - return await webController.PostAsync<GenerateResponseOp<GenericPostRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericPostRequest>(), postArguments, ct, ReportCategory.SCENE_FETCH_REQUEST, webRequestHeaders); + return await webController.PostAsync<GenerateResponseOp<GenericPostRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericPostRequest>(), postArguments, ct, GetReportData(), webRequestHeaders); case RequestMethod.PUT: string putContentType = webRequestHeaders.HeaderContentType(); var putArguments = GenericPutArguments.Create(body, putContentType); - return await webController.PutAsync<GenerateResponseOp<GenericPutRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericPutRequest>(), putArguments, ct, ReportCategory.SCENE_FETCH_REQUEST, webRequestHeaders); + return await webController.PutAsync<GenerateResponseOp<GenericPutRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericPutRequest>(), putArguments, ct, GetReportData(), webRequestHeaders); case RequestMethod.DELETE: string deleteContentType = webRequestHeaders.HeaderContentType(); var deleteArguments = GenericDeleteArguments.Create(body, deleteContentType); - return await webController.DeleteAsync<GenerateResponseOp<GenericDeleteRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericDeleteRequest>(), deleteArguments, ct, ReportCategory.SCENE_FETCH_REQUEST, webRequestHeaders); + return await webController.DeleteAsync<GenerateResponseOp<GenericDeleteRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericDeleteRequest>(), deleteArguments, ct, GetReportData(), webRequestHeaders); case RequestMethod.PATCH: string patchContentType = webRequestHeaders.HeaderContentType(); var patchArguments = GenericPatchArguments.Create(body, patchContentType); - return await webController.PatchAsync<GenerateResponseOp<GenericPatchRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericPatchRequest>(), patchArguments, ct, ReportCategory.SCENE_FETCH_REQUEST, webRequestHeaders); + return await webController.PatchAsync<GenerateResponseOp<GenericPatchRequest>, ISimpleFetchApi.Response>(commonArguments, new GenerateResponseOp<GenericPatchRequest>(), patchArguments, ct, GetReportData(), webRequestHeaders); case RequestMethod.HEAD: throw new NotImplementedException(); case RequestMethod.INVALID: default: throw new ArgumentOutOfRangeException(); @@ -92,21 +99,45 @@ CancellationToken ct } } + private ReportData GetReportData() => + new (ReportCategory.SCENE_FETCH_REQUEST, sceneShortInfo: sceneShortInfo); + + private static WebRequestHeadersInfo HeadersFromJsObject(object headers) + { + var webRequestHeaders = new WebRequestHeadersInfo(); + + if (headers is IScriptObject scriptObject) + { + IEnumerable<string> propertyNames = scriptObject.PropertyNames.EnsureNotNull(); + + foreach (string name in propertyNames) + { + var property = scriptObject.GetProperty(name).EnsureNotNull().ToString()!; + webRequestHeaders.Add(name, property); + } + } + + return webRequestHeaders; + } + + private static RequestMethod ParseRequestMethod(string request) => + Enum.TryParse(request, true, out RequestMethod method) ? method : RequestMethod.INVALID; + private struct GenerateResponseOp<TGenericRequest> : IWebRequestOp<TGenericRequest, ISimpleFetchApi.Response> - where TGenericRequest : struct, GenericDownloadHandlerUtils.IGenericDownloadHandlerRequest, ITypedWebRequest + where TGenericRequest: struct, GenericDownloadHandlerUtils.IGenericDownloadHandlerRequest, ITypedWebRequest { public async UniTask<ISimpleFetchApi.Response> ExecuteAsync(TGenericRequest request, CancellationToken ct) { UnityWebRequest unityWebRequest = request.UnityWebRequest; string responseData = unityWebRequest.downloadHandler?.text ?? string.Empty; - var responseHeadersDictionary = unityWebRequest.GetResponseHeaders(); + Dictionary<string, string>? responseHeadersDictionary = unityWebRequest.GetResponseHeaders(); bool requestOk = unityWebRequest.result == UnityWebRequest.Result.Success; bool requestRedirected = unityWebRequest.result is UnityWebRequest.Result.ProtocolError or UnityWebRequest.Result.ConnectionError; var requestStatus = (int)unityWebRequest.responseCode; var requestStatusText = unityWebRequest.responseCode.ToString(); string requestUrl = unityWebRequest.url.EnsureNotNull(); - ISimpleFetchApi.Response result = new ISimpleFetchApi.Response + var result = new ISimpleFetchApi.Response { Headers = responseHeadersDictionary, Ok = requestOk, @@ -121,26 +152,5 @@ private struct GenerateResponseOp<TGenericRequest> : IWebRequestOp<TGenericReque return result; } } - - private static WebRequestHeadersInfo HeadersFromJsObject(object headers) - { - var webRequestHeaders = new WebRequestHeadersInfo(); - - if (headers is IScriptObject scriptObject) - { - IEnumerable<string> propertyNames = scriptObject.PropertyNames.EnsureNotNull(); - - foreach (string name in propertyNames) - { - var property = scriptObject.GetProperty(name).EnsureNotNull().ToString()!; - webRequestHeaders.Add(name, property); - } - } - - return webRequestHeaders; - } - - private static RequestMethod ParseRequestMethod(string request) => - Enum.TryParse(request, true, out RequestMethod method) ? method : RequestMethod.INVALID; } } diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Tests/CommunicationControllerAPIImplementationShould.cs b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Tests/CommunicationControllerAPIImplementationShould.cs index 53cdabffdc..474de9b3c0 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Tests/CommunicationControllerAPIImplementationShould.cs +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Tests/CommunicationControllerAPIImplementationShould.cs @@ -5,6 +5,7 @@ using DCL.Multiplayer.Connections.Messaging; using DCL.Multiplayer.Connections.Messaging.Pipe; using Decentraland.Kernel.Comms.Rfc4; +using ECS; using Google.Protobuf; using LiveKit.Internal.FFIClients.Pools; using NSubstitute; @@ -22,7 +23,7 @@ namespace CrdtEcsBridge.JsModulesImplementation.Tests public class CommunicationControllerAPIImplementationShould { private CommunicationsControllerAPIImplementation api; - private TestCommunicationControllerHub communicationControllerHub; + private TestSceneCommunicationPipe sceneCommunicationPipe; private IMessagePipe messagePipe; private IJsOperations jsOperations; private ICRDTMemoryAllocator crdtMemoryAllocator; @@ -30,7 +31,7 @@ public class CommunicationControllerAPIImplementationShould [SetUp] public void SetUp() { - communicationControllerHub = new TestCommunicationControllerHub(); + sceneCommunicationPipe = new TestSceneCommunicationPipe(); ISceneData sceneData = Substitute.For<ISceneData>(); sceneData.SceneEntityDefinition.Returns(new SceneEntityDefinition { id = "TEST_SCENE" }); @@ -39,7 +40,10 @@ public void SetUp() var sceneStateProvider = Substitute.For<ISceneStateProvider>(); sceneStateProvider.IsCurrent.Returns(true); - api = new CommunicationsControllerAPIImplementation(sceneData, communicationControllerHub, jsOperations = Substitute.For<IJsOperations>(), crdtMemoryAllocator, sceneStateProvider); + IRealmData realmData = Substitute.For<IRealmData>(); + realmData.ScenesAreFixed.Returns(false); + + api = new CommunicationsControllerAPIImplementation(realmData, sceneData, sceneCommunicationPipe, jsOperations = Substitute.For<IJsOperations>(), crdtMemoryAllocator, sceneStateProvider); api.OnSceneIsCurrentChanged(true); } @@ -55,10 +59,10 @@ public void SendBinary([Range(0, 5)] int outerArraySize, [Range(1, 500, 50)] int api.SendBinary(outerArray); - var expectedCalls = outerArray.Select(o => o.Prepend((byte)CommunicationsControllerAPIImplementation.MsgType.Uint8Array).ToArray()).ToList(); + var expectedCalls = outerArray.Select(o => o.Prepend((byte)CommunicationsControllerAPIImplementationBase.MsgType.Uint8Array).ToArray()).ToList(); // Assert the 2d array is equal - CollectionAssert.AreEqual(expectedCalls, communicationControllerHub.sendMessageCalls); + CollectionAssert.AreEqual(expectedCalls, sceneCommunicationPipe.sendMessageCalls); // Assert JSOperations called jsOperations.Received().ConvertToScriptTypedArrays(api.EventsToProcess); @@ -70,10 +74,10 @@ public void OnMessageReceived() const string WALLET_ID = "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"; const string SCENE_ID = "TEST_SCENE"; - byte[] data = GetRandomBytes(50).Prepend((byte)CommunicationsControllerAPIImplementation.MsgType.Uint8Array).ToArray(); + byte[] data = GetRandomBytes(50).Prepend((byte)CommunicationsControllerAPIImplementationBase.MsgType.Uint8Array).ToArray(); var receivedMessage = new ReceivedMessage<Scene>(new Scene { Data = ByteString.CopyFrom(data), SceneId = SCENE_ID }, new Packet(), WALLET_ID, Substitute.For<IMultiPool>()); - communicationControllerHub.onSceneMessage.Invoke(ICommunicationControllerHub.SceneMessage.CopyFrom(receivedMessage)); + sceneCommunicationPipe.onSceneMessage.Invoke(ISceneCommunicationPipe.SceneMessage.CopyFrom(receivedMessage)); byte[] walletBytes = Encoding.UTF8.GetBytes(receivedMessage.FromWalletId); @@ -101,17 +105,17 @@ public void TearDown() } // This class exists because we can't mock ReadOnlySpan (ref structs) - private class TestCommunicationControllerHub : ICommunicationControllerHub + private class TestSceneCommunicationPipe : ISceneCommunicationPipe { internal readonly List<byte[]> sendMessageCalls = new (); - internal Action<ICommunicationControllerHub.SceneMessage> onSceneMessage; + internal Action<ISceneCommunicationPipe.SceneMessage> onSceneMessage; - public void SetSceneMessageHandler(Action<ICommunicationControllerHub.SceneMessage> onSceneMessage) + public void SetSceneMessageHandler(Action<ISceneCommunicationPipe.SceneMessage> onSceneMessage) { this.onSceneMessage = onSceneMessage; } - public void RemoveSceneMessageHandler(Action<ICommunicationControllerHub.SceneMessage> onSceneMessage) + public void RemoveSceneMessageHandler(Action<ISceneCommunicationPipe.SceneMessage> onSceneMessage) { } diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Tests/Tests.asmdef b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Tests/Tests.asmdef index e0bbfd4ef1..62ba42f271 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Tests/Tests.asmdef +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/JsModulesImplementation/Tests/Tests.asmdef @@ -19,7 +19,8 @@ "GUID:0b3eab7834a09c24ca4e84fe0d8a43ce", "GUID:702f733b4deb246808c6ce84d93b5c9c", "GUID:7175400a68914a45acecc9fb068de3b8", - "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", + "GUID:e0eedfa2deb9406daf86fd8368728e39" ], "includePlatforms": [ "Editor" diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/RestrictedActions/GlobalWorldActions.cs b/Explorer/Assets/Scripts/CrdtEcsBridge/RestrictedActions/GlobalWorldActions.cs index 2fe5260254..82a8dce598 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/RestrictedActions/GlobalWorldActions.cs +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/RestrictedActions/GlobalWorldActions.cs @@ -3,6 +3,7 @@ using Cysharp.Threading.Tasks; using DCL.AvatarRendering.AvatarShape.Components; using DCL.AvatarRendering.Emotes; +using DCL.AvatarRendering.Loading.Components; using DCL.CharacterCamera; using DCL.CharacterMotion.Components; using DCL.Multiplayer.Emotes; @@ -63,8 +64,11 @@ public async UniTask TriggerSceneEmoteAsync(string sceneId, SceneAssetBundleMani promise = await promise.ToUniTaskAsync(world, cancellationToken: ct); - URN urn = promise.Result!.Value.Asset.Emotes[0].GetUrn(); - bool isLooping = promise.Result!.Value.Asset.Emotes[0].IsLooping(); + using var consumed = promise.Result!.Value.Asset.ConsumeEmotes(); + var value = consumed.Value[0]!; + URN urn = value.GetUrn(); + bool isLooping = value.IsLooping(); + TriggerEmote(urn, isLooping); } diff --git a/Explorer/Assets/Scripts/CrdtEcsBridge/RestrictedActions/RestrictedActionsImplementation.asmdef b/Explorer/Assets/Scripts/CrdtEcsBridge/RestrictedActions/RestrictedActionsImplementation.asmdef index b38b894b5b..92d3d7dba8 100644 --- a/Explorer/Assets/Scripts/CrdtEcsBridge/RestrictedActions/RestrictedActionsImplementation.asmdef +++ b/Explorer/Assets/Scripts/CrdtEcsBridge/RestrictedActions/RestrictedActionsImplementation.asmdef @@ -25,8 +25,10 @@ "GUID:e25ef972de004615a22937e739de2def", "GUID:5eabe9a3d4dd19d42a16208ea5411062", "GUID:d0ec51c740809fd4680d3ea27279dca7", + "GUID:e74ed5baa5004d34a6b3240075d14758", "GUID:9e314663ce958b746873cb22d57ede55", - "GUID:e74ed5baa5004d34a6b3240075d14758" + "GUID:543b8f091a5947a3880b7f2bca2358bd", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/Scripts/ECS/Abstract/BaseUnityLoopSystem.cs b/Explorer/Assets/Scripts/ECS/Abstract/BaseUnityLoopSystem.cs index 01099f07e2..f0640f3cde 100644 --- a/Explorer/Assets/Scripts/ECS/Abstract/BaseUnityLoopSystem.cs +++ b/Explorer/Assets/Scripts/ECS/Abstract/BaseUnityLoopSystem.cs @@ -4,6 +4,7 @@ using DCL.Diagnostics; using System; using System.Linq; +using UnityEngine; using UnityEngine.Profiling; namespace ECS.Abstract @@ -13,6 +14,8 @@ namespace ECS.Abstract /// </summary> public abstract class BaseUnityLoopSystem : PlayerLoopSystem<World> { + private static readonly QueryDescription SCENE_INFO_QUERY = new QueryDescription().WithAll<SceneShortInfo>(); + private readonly CustomSampler updateSampler; /// <summary> @@ -22,10 +25,17 @@ public abstract class BaseUnityLoopSystem : PlayerLoopSystem<World> private string? cachedCategory; + private readonly SceneShortInfo sceneInfo; + protected BaseUnityLoopSystem(World world) : base(world) { updateSampler = CustomSampler.Create($"{GetType().Name}.Update"); genericUpdateSampler = CreateGenericSamplerIfRequired(); + + var entity = new SingleInstanceEntity(SCENE_INFO_QUERY, world, false); + + if (entity != Entity.Null) + sceneInfo = world.Get<SceneShortInfo>(entity); } private CustomSampler? CreateGenericSamplerIfRequired() @@ -58,13 +68,14 @@ public sealed override void Update(in float t) protected abstract void Update(float t); + protected internal ReportData GetReportData() => + new (GetReportCategory(), sceneShortInfo: sceneInfo); + + // Look for category starting from the class itself and then groups recursively + // if not found fall back to "ECS" protected internal string GetReportCategory() { - // Look for category starting from the class itself and then groups recursively - // if not found fall back to "ECS" - - if (cachedCategory != null) - return cachedCategory; + if (cachedCategory != null) return cachedCategory; AttributesInfoBase metadata = GetMetadataInternal(); LogCategoryAttribute? logCategory = null; @@ -72,7 +83,9 @@ protected internal string GetReportCategory() while (metadata != null && (logCategory = metadata.GetAttribute<LogCategoryAttribute>()) == null) metadata = metadata.GroupMetadata; - return cachedCategory = logCategory?.Category ?? ReportCategory.ECS; + cachedCategory = logCategory?.Category ?? ReportCategory.ECS; + + return cachedCategory; } /// <summary> @@ -82,6 +95,6 @@ protected EcsSystemException CreateException(Exception inner, ReportHint hint = CreateException(inner, hint, false); private EcsSystemException CreateException(Exception inner, ReportHint hint, bool unhandled) => - new (this, inner, new ReportData(GetReportCategory(), hint), unhandled); + new (this, inner, new ReportData(GetReportCategory(), hint, sceneInfo), unhandled); } } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/FixedScenePointers.cs.meta b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/FixedScenePointers.cs.meta index 96c3104c51..ccefb6b303 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/FixedScenePointers.cs.meta +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/FixedScenePointers.cs.meta @@ -1,3 +1,3 @@ fileFormatVersion: 2 -guid: 3fb42ab848ac45f081c53ac50e87637e +guid: 177d13b3c29865345bbbeb238f174d2d timeCreated: 1688649251 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/PortableExperienceScenePointers.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/PortableExperienceScenePointers.cs new file mode 100644 index 0000000000..2ca768c43e --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/PortableExperienceScenePointers.cs @@ -0,0 +1,20 @@ +using DCL.Ipfs; +using ECS.SceneLifeCycle.SceneDefinition; +using ECS.StreamableLoading.Common; + +namespace ECS.SceneLifeCycle.Components +{ + public struct PortableExperienceScenePointers + { + public readonly AssetPromise<SceneEntityDefinition, GetSceneDefinition>[] Promises; + + // Quick path to avoid an iteration + public bool AllPromisesResolved; + + public PortableExperienceScenePointers(AssetPromise<SceneEntityDefinition, GetSceneDefinition>[] promises) + { + Promises = promises; + AllPromisesResolved = false; + } + } +} diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/PortableExperienceScenePointers.cs.meta b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/PortableExperienceScenePointers.cs.meta new file mode 100644 index 0000000000..96c3104c51 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Components/PortableExperienceScenePointers.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3fb42ab848ac45f081c53ac50e87637e +timeCreated: 1688649251 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IScenesCache.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IScenesCache.cs index f6ad126728..3753a08114 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IScenesCache.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IScenesCache.cs @@ -7,14 +7,16 @@ namespace ECS.SceneLifeCycle { public interface IScenesCache { - ISceneFacade CurrentScene { get; } - IReadOnlyCollection<ISceneFacade> Scenes { get; } + IReadOnlyCollection<ISceneFacade> PortableExperiencesScenes { get; } + ISceneFacade? CurrentScene { get; } void Add(ISceneFacade sceneFacade, IReadOnlyList<Vector2Int> parcels); void AddNonRealScene(IReadOnlyList<Vector2Int> parcels); + void AddPortableExperienceScene(ISceneFacade sceneFacade, string sceneUrn); + void RemoveNonRealScene(IReadOnlyList<Vector2Int> parcels); void RemoveSceneFacade(IReadOnlyList<Vector2Int> parcels); @@ -23,21 +25,26 @@ public interface IScenesCache bool TryGetByParcel(Vector2Int parcel, out ISceneFacade sceneFacade); - void SetCurrentScene(ISceneFacade parcel); + bool TryGetPortableExperienceBySceneUrn(string sceneUrn, out ISceneFacade sceneFacade); + + void RemovePortableExperienceFacade(string sceneUrn); - void Clear(); + void ClearScenes(bool clearPortableExperiences = false); + + void SetCurrentScene(ISceneFacade sceneFacade); } public class ScenesCache : IScenesCache { private readonly Dictionary<Vector2Int, ISceneFacade> scenesByParcels = new (PoolConstants.SCENES_COUNT); private readonly HashSet<Vector2Int> nonRealSceneByParcel = new (PoolConstants.SCENES_COUNT); + private readonly Dictionary<string, ISceneFacade> portableExperienceScenesByUrn = new (PoolConstants.PORTABLE_EXPERIENCES_INITIAL_COUNT); private readonly HashSet<ISceneFacade> scenes = new (PoolConstants.SCENES_COUNT); - public ISceneFacade CurrentScene { get; private set; } - public IReadOnlyCollection<ISceneFacade> Scenes => scenes; + public IReadOnlyCollection<ISceneFacade> PortableExperiencesScenes => portableExperienceScenesByUrn.Values; + public ISceneFacade? CurrentScene { get; private set; } public void Add(ISceneFacade sceneFacade, IReadOnlyList<Vector2Int> parcels) { @@ -71,23 +78,37 @@ public void RemoveSceneFacade(IReadOnlyList<Vector2Int> parcels) } } + public void AddPortableExperienceScene(ISceneFacade sceneFacade, string sceneUrn) + { + portableExperienceScenesByUrn.TryAdd(sceneUrn, sceneFacade); + } + public bool Contains(Vector2Int parcel) => scenesByParcels.ContainsKey(parcel) || nonRealSceneByParcel.Contains(parcel); public bool TryGetByParcel(Vector2Int parcel, out ISceneFacade sceneFacade) => scenesByParcels.TryGetValue(parcel, out sceneFacade); - public void SetCurrentScene(ISceneFacade scene) + public bool TryGetPortableExperienceBySceneUrn(string urn, out ISceneFacade sceneFacade) => + portableExperienceScenesByUrn.TryGetValue(urn, out sceneFacade); + + public void RemovePortableExperienceFacade(string urn) { - if (CurrentScene != scene) - CurrentScene = scene; + portableExperienceScenesByUrn.Remove(urn); } - public void Clear() + public void ClearScenes(bool clearPortableExperiences) { scenesByParcels.Clear(); nonRealSceneByParcel.Clear(); + if (clearPortableExperiences) portableExperienceScenesByUrn.Clear(); scenes.Clear(); } + + public void SetCurrentScene(ISceneFacade sceneFacade) + { + if (CurrentScene != sceneFacade) + CurrentScene = sceneFacade; + } } } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IncreasingRadius/CreateEmptyPointersInFixedRealmSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IncreasingRadius/CreateEmptyPointersInFixedRealmSystem.cs index f3ec9ce85b..df166947b8 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IncreasingRadius/CreateEmptyPointersInFixedRealmSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IncreasingRadius/CreateEmptyPointersInFixedRealmSystem.cs @@ -61,7 +61,7 @@ private void CreatePointersWithIncreasingRadius(ref FixedScenePointers fixedScen // we need to check it again as parcelInfo.AlreadyProcessed corresponds to the moment of splitting if (!processedScenePointers.Value.Contains(parcelInfo.Parcel)) { - World.Create(new SceneDefinitionComponent(parcelInfo.Parcel.ToVector2Int())); + World.Create(SceneDefinitionComponentFactory.CreateEmpty(parcelInfo.Parcel.ToVector2Int())); pointersCreated++; processedScenePointers.Value.Add(parcelInfo.Parcel); } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IncreasingRadius/LoadPointersByIncreasingRadiusSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IncreasingRadius/LoadPointersByIncreasingRadiusSystem.cs index 5a339f4dc3..312b71cb1f 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IncreasingRadius/LoadPointersByIncreasingRadiusSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/IncreasingRadius/LoadPointersByIncreasingRadiusSystem.cs @@ -11,6 +11,7 @@ using ECS.StreamableLoading.Common; using ECS.StreamableLoading.Common.Components; using System.Collections.Generic; +using Unity.Collections; using Unity.Mathematics; using Utility; @@ -75,7 +76,7 @@ private void StartLoadingFromVolatilePointers(ref RealmComponent realm, ref Vola // Take up to <ScenesDefinitionsRequestBatchSize> closest pointers that were not processed yet List<int2> input = volatileScenePointers.InputReusableList; - ref var flatArray = ref parcelMathJobifiedHelper.LastSplit; + ref NativeArray<ParcelMathJobifiedHelper.ParcelInfo> flatArray = ref parcelMathJobifiedHelper.LastSplit; int i; splitIsPending = false; @@ -111,6 +112,7 @@ private void StartLoadingFromVolatilePointers(ref RealmComponent realm, ref Vola // Find the bucket byte bucketIndex = 0; + for (; bucketIndex < partitionSettings.SqrDistanceBuckets.Count; bucketIndex++) { if (median < partitionSettings.SqrDistanceBuckets[bucketIndex]) @@ -118,6 +120,7 @@ private void StartLoadingFromVolatilePointers(ref RealmComponent realm, ref Vola } volatileScenePointers.ActivePartitionComponent.Bucket = bucketIndex; + volatileScenePointers.ActivePromise = AssetPromise<SceneDefinitions, GetSceneDefinitionList>.Create(World, new GetSceneDefinitionList(volatileScenePointers.RetrievedReusableList, input, @@ -154,7 +157,7 @@ private void ResolveActivePromise(ref VolatileScenePointers volatileScenePointer { int2 parcel = requestedList[i]; if (!processedScenePointers.Value.Add(parcel)) continue; - World.Create(new SceneDefinitionComponent(parcel.ToVector2Int())); + World.Create(SceneDefinitionComponentFactory.CreateEmpty(parcel.ToVector2Int())); } } else diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/PortableExperienceRealmComponent.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/PortableExperienceRealmComponent.cs new file mode 100644 index 0000000000..6481f02aba --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/PortableExperienceRealmComponent.cs @@ -0,0 +1,22 @@ +using DCL.Ipfs; + +namespace ECS +{ + public readonly struct PortableExperienceRealmComponent + { + public IIpfsRealm Ipfs => RealmData.Ipfs; + public IRealmData RealmData { get; } + + //These are the PX created by DCL and cannot be killed or turned off by scenes. + public bool IsGlobalPortableExperience { get; } + + public string ParentSceneId { get; } + + public PortableExperienceRealmComponent(IRealmData realmData, string parentSceneId, bool isGlobalPortableExperience) + { + RealmData = realmData; + ParentSceneId = parentSceneId; + IsGlobalPortableExperience = isGlobalPortableExperience; + } + } +} diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/PortableExperienceRealmComponent.cs.meta b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/PortableExperienceRealmComponent.cs.meta new file mode 100644 index 0000000000..367455d893 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/PortableExperienceRealmComponent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0d15a50725dd95a469ff9d826a75e4aa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/RealmComponent.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/RealmComponent.cs index 3df7f391af..efca6832bf 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/RealmComponent.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/RealmComponent.cs @@ -7,19 +7,17 @@ namespace ECS /// </summary> public readonly struct RealmComponent { - public IIpfsRealm Ipfs => realmData.Ipfs; - public IRealmData RealmData => realmData; + public IIpfsRealm Ipfs => RealmData.Ipfs; + public IRealmData RealmData { get; } /// <summary> /// Indicates that the realm contains a fixed number of scenes /// </summary> - public bool ScenesAreFixed => realmData.ScenesAreFixed; - - private readonly IRealmData realmData; + public bool ScenesAreFixed => RealmData.ScenesAreFixed; public RealmComponent(IRealmData realmData) { - this.realmData = realmData; + this.RealmData = realmData; } } } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/RealmData.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/RealmData.cs index 485419fc50..6c3036a6ee 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/RealmData.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/RealmData.cs @@ -82,6 +82,6 @@ private void Validate() throw new InvalidOperationException("RealmData has not been configured"); } - public bool IsDirty { get; internal set; } = true; + public bool IsDirty { get; set; } = true; } } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmdef b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmdef deleted file mode 100644 index 6994c1b99c..0000000000 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmdef +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "SceneLifeCycle.Realm.Systems", - "rootNamespace": "", - "references": [ - "GUID:101b8b6ebaf64668909b49c4b7a1420d", - "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", - "GUID:e0eedfa2deb9406daf86fd8368728e39", - "GUID:275e22790c04e9b47a5085d7b0c4432a" - ], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmdef.meta b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmdef.meta deleted file mode 100644 index ba9722b67d..0000000000 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmdef.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 01357ec67dc740fd8773f7adcf9791eb -timeCreated: 1714738840 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmref b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmref new file mode 100644 index 0000000000..b24e4ef9e3 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:fc4fd35fb877e904d8cedee73b2256f6" +} \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmref.meta b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmref.meta new file mode 100644 index 0000000000..20d7343c37 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Realm/Systems/SceneLifeCycle.Realm.Systems.asmref.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e99178f38f4db874585ada998b838c7b +AssemblyDefinitionReferenceImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/PortableExperienceComponent.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/PortableExperienceComponent.cs new file mode 100644 index 0000000000..5743642c4f --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/PortableExperienceComponent.cs @@ -0,0 +1,18 @@ +using CommunicationData.URLHelpers; + +namespace ECS.SceneLifeCycle.SceneDefinition +{ + /// <summary> + /// A component used to indicate which scenes are PX and filter them from certain queries. + /// Also contains an ID to help filter which entities belong to certain PX + /// </summary> + public struct PortableExperienceComponent + { + public readonly ENS Ens; + + public PortableExperienceComponent(ENS ens) + { + Ens = ens; + } + }; +} diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/PortableExperienceComponent.cs.meta b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/PortableExperienceComponent.cs.meta new file mode 100644 index 0000000000..0fd847fdd8 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/PortableExperienceComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 88d1bb6d78d84beb89ece61129d91cd7 +timeCreated: 1722869363 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/SceneDefinitionComponent.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/SceneDefinitionComponent.cs index 307fee3716..bf3b754fc3 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/SceneDefinitionComponent.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Components/SceneDefinitionComponent.cs @@ -1,78 +1,130 @@ using CommunicationData.URLHelpers; using DCL.Ipfs; +using System.Collections.Generic; +using System.Linq; using UnityEngine; using Utility; namespace ECS.SceneLifeCycle.SceneDefinition { /// <summary> - /// Scene definition in ECS, indicates the definition is loaded but does tell the state of SceneFacade itself + /// Scene definition in ECS, indicates the definition is loaded but does not tell the state of SceneFacade itself /// </summary> public struct SceneDefinitionComponent { - public static readonly SceneMetadataScene EMPTY_METADATA = new (); + public SceneEntityDefinition Definition { get; } + public IReadOnlyList<Vector2Int> Parcels { get; } + public IReadOnlyList<ParcelMathHelper.ParcelCorners> ParcelsCorners { get; } + public IpfsPath IpfsPath { get; } + public bool IsEmpty { get; } + public bool IsSDK7 { get; } + public ParcelMathHelper.SceneGeometry SceneGeometry { get; } + public bool IsPortableExperience { get; } - public readonly SceneEntityDefinition Definition; + public int InternalJobIndex { get; set; } - public readonly Vector2Int [] Parcels; - public readonly ParcelMathHelper.ParcelCorners [] ParcelsCorners; - public readonly IpfsPath IpfsPath; - public readonly bool IsEmpty; - public readonly bool IsSDK7; - public readonly ParcelMathHelper.SceneGeometry SceneGeometry; - public int InternalJobIndex; - - public SceneDefinitionComponent(SceneEntityDefinition definition, IpfsPath ipfsPath) + public SceneDefinitionComponent( + SceneEntityDefinition definition, + IReadOnlyList<Vector2Int> parcels, + IReadOnlyList<ParcelMathHelper.ParcelCorners> parcelsCorners, + ParcelMathHelper.SceneGeometry sceneGeometry, + IpfsPath ipfsPath, bool isEmpty, bool isSDK7, bool isPortableExperience) { - var decodedParcels = definition.metadata.scene.DecodedParcels; Definition = definition; - Parcels = new Vector2Int[decodedParcels.Count]; - ParcelsCorners = new ParcelMathHelper.ParcelCorners[decodedParcels.Count]; - - for (int i = 0; i < decodedParcels.Count; i++) - { - Parcels[i] = decodedParcels[i]; - } - - for (int i = 0; i < Parcels.Length; i++) - { - ParcelsCorners[i] = ParcelMathHelper.CalculateCorners(Parcels[i]); - } - + Parcels = parcels; + ParcelsCorners = parcelsCorners; IpfsPath = ipfsPath; - IsEmpty = false; - IsSDK7 = definition.metadata?.runtimeVersion == "7"; - SceneGeometry = ParcelMathHelper.CreateSceneGeometry(ParcelsCorners, Definition.metadata.scene.DecodedBase); + IsEmpty = isEmpty; + IsSDK7 = isSDK7; + SceneGeometry = sceneGeometry; InternalJobIndex = -1; + IsPortableExperience = isPortableExperience; } + } + + public static class SceneDefinitionComponentFactory + { + private static readonly SceneMetadataScene EMPTY_METADATA = new (); + //This is considering a size of -150 to 150 parcels + private const float PORTABLE_EXPERIENCE_MAX_VALUES = 2400f; + private const float PORTABLE_EXPERIENCE_MAX_HEIGHT = 300f; + + private static readonly ParcelMathHelper.SceneGeometry PORTABLE_EXPERIENCES_SCENE_GEOMETRY = new ParcelMathHelper.SceneGeometry(Vector3.zero, + new ParcelMathHelper.SceneCircumscribedPlanes( + minX: -PORTABLE_EXPERIENCE_MAX_VALUES, + maxX: PORTABLE_EXPERIENCE_MAX_VALUES, + minZ: -PORTABLE_EXPERIENCE_MAX_VALUES, + maxZ: PORTABLE_EXPERIENCE_MAX_VALUES), + PORTABLE_EXPERIENCE_MAX_HEIGHT); + //PX don't care about parcel corners as they work on all the map. + private static readonly IReadOnlyList<ParcelMathHelper.ParcelCorners> PORTABLE_EXPERIENCES_PARCEL_CORNERS = new List<ParcelMathHelper.ParcelCorners>(); + + public static SceneDefinitionComponent CreateFromDefinition(SceneEntityDefinition definition, IpfsPath ipfsPath, bool isPortableExperience = false) => + isPortableExperience ? + CreatePortableExperienceSceneDefinitionComponent(definition, ipfsPath) : + CreateSceneDefinitionComponent(definition, definition.metadata.scene.DecodedParcels, ipfsPath, isEmpty: false, isSDK7: definition.metadata.runtimeVersion == "7", isPortableExperience: false); + + private static SceneDefinitionComponent CreatePortableExperienceSceneDefinitionComponent(SceneEntityDefinition definition, IpfsPath ipfsPath) => + new ( + definition, + parcels: definition.metadata.scene.DecodedParcels, + PORTABLE_EXPERIENCES_PARCEL_CORNERS, + PORTABLE_EXPERIENCES_SCENE_GEOMETRY, + ipfsPath, + isEmpty: false, + isSDK7: definition.metadata.runtimeVersion == "7", + isPortableExperience: true + ); /// <summary> /// Create empty scene pointer /// </summary> - public SceneDefinitionComponent(Vector2Int parcel) + public static SceneDefinitionComponent CreateEmpty(Vector2Int parcel) { var id = $"empty-parcel-{parcel.x}-{parcel.y}"; - ParcelsCorners = new[] { ParcelMathHelper.CalculateCorners(parcel) }; - Parcels = new[] { parcel }; - IsEmpty = true; - IpfsPath = new IpfsPath(id, URLDomain.EMPTY); - - Definition = new SceneEntityDefinition( + var definition = new SceneEntityDefinition( id, new SceneMetadata { main = "bin/game.js", scene = EMPTY_METADATA, + + // content will be filled by the loading system } - // content will be filled by the loading system ); - //No runtime version in metadata - IsSDK7 = false; - SceneGeometry = ParcelMathHelper.CreateSceneGeometry(ParcelsCorners, Definition.metadata.scene.DecodedBase); + return CreateSceneDefinitionComponent( + definition, + new[] { parcel }, + new IpfsPath(id, URLDomain.EMPTY), + isEmpty: true, + isSDK7: false, + isPortableExperience: false + ); + } - InternalJobIndex = -1; + private static SceneDefinitionComponent CreateSceneDefinitionComponent( + SceneEntityDefinition definition, + IReadOnlyList<Vector2Int> parcels, + IpfsPath ipfsPath, + bool isEmpty, + bool isSDK7, + bool isPortableExperience) + { + var parcelCorners = parcels.Select(ParcelMathHelper.CalculateCorners).ToList(); + ParcelMathHelper.SceneGeometry sceneGeometry = ParcelMathHelper.CreateSceneGeometry(parcelCorners, definition.metadata.scene.DecodedBase); + + return new SceneDefinitionComponent( + definition, + parcels, + parcelCorners, + sceneGeometry, + ipfsPath, + isEmpty, + isSDK7, + isPortableExperience + ); } } } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Systems/LoadSceneDefinitionListSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Systems/LoadSceneDefinitionListSystem.cs index e0dd384029..0bcdd2de86 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Systems/LoadSceneDefinitionListSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Systems/LoadSceneDefinitionListSystem.cs @@ -61,8 +61,8 @@ protected override async UniTask<StreamableLoadingResult<SceneDefinitions>> Flow bodyBuilder.Append("]}"); List<SceneEntityDefinition> targetList = await - webRequestController.PostAsync(intention.CommonArguments, GenericPostArguments.CreateJson(bodyBuilder.ToString()), ct) - .OverwriteFromJsonAsync(intention.TargetCollection, WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool); + webRequestController.PostAsync(intention.CommonArguments, GenericPostArguments.CreateJson(bodyBuilder.ToString()), ct, GetReportData()) + .OverwriteFromJsonAsync(intention.TargetCollection, WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool); return new StreamableLoadingResult<SceneDefinitions>(new SceneDefinitions(targetList)); } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Systems/LoadSceneDefinitionSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Systems/LoadSceneDefinitionSystem.cs index 2741127a92..6aedbc3565 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Systems/LoadSceneDefinitionSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneDefinition/Systems/LoadSceneDefinitionSystem.cs @@ -32,8 +32,8 @@ internal LoadSceneDefinitionSystem(World world, IWebRequestController webRequest protected override async UniTask<StreamableLoadingResult<SceneEntityDefinition>> FlowInternalAsync(GetSceneDefinition intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) { SceneEntityDefinition sceneEntityDefinition = await - webRequestController.GetAsync(intention.CommonArguments, ct, GetReportCategory()) - .CreateFromJson<SceneEntityDefinition>(WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool); + webRequestController.GetAsync(intention.CommonArguments, ct, GetReportData()) + .CreateFromJson<SceneEntityDefinition>(WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool); sceneEntityDefinition.id ??= intention.IpfsPath.EntityId; diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadHybridSceneSystemLogic.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadHybridSceneSystemLogic.cs index 12ad73c3b7..dbdd34a059 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadHybridSceneSystemLogic.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadHybridSceneSystemLogic.cs @@ -1,6 +1,7 @@ using Arch.Core; using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using DCL.Ipfs; using DCL.Multiplayer.SDK.Systems.GlobalWorld; using DCL.WebRequests; @@ -19,7 +20,7 @@ public class LoadHybridSceneSystemLogic : LoadSceneSystemLogicBase private readonly URLDomain hybridSceneContentServerDomain; private readonly Vector2Int startParcel; private readonly string world; - private HibridSceneHashedContent? hybridSceneHashedContent; + private HybridSceneHashedContent? hybridSceneHashedContent; private string? remoteSceneID; public LoadHybridSceneSystemLogic(IWebRequestController webRequestController, URLDomain assetBundleURL, HybridSceneParams hybridSceneParams, @@ -47,9 +48,9 @@ public LoadHybridSceneSystemLogic(IWebRequestController webRequestController, UR protected override string GetAssetBundleSceneId(string _) => hybridSceneHashedContent!.remoteSceneID; - protected override async UniTask<ISceneContent> GetSceneHashedContentAsync(SceneEntityDefinition definition, URLDomain contentBaseUrl, string reportCategory) + protected override async UniTask<ISceneContent> GetSceneHashedContentAsync(SceneEntityDefinition definition, URLDomain contentBaseUrl, ReportData reportCategory) { - hybridSceneHashedContent = new HibridSceneHashedContent(webRequestController, definition, contentBaseUrl, assetBundleURL); + hybridSceneHashedContent = new HybridSceneHashedContent(webRequestController, definition, contentBaseUrl, assetBundleURL); if (await hybridSceneHashedContent.TryGetRemoteSceneIDAsync(hybridSceneContentServerDomain, hybridSceneContentServer, startParcel, world, reportCategory)) { await hybridSceneHashedContent.GetRemoteSceneDefinitionAsync(hybridSceneContentServerDomain, reportCategory); } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystem.cs index 26709895fb..fce23de5a5 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystem.cs @@ -38,7 +38,7 @@ internal LoadSceneSystem(World world, protected override async UniTask<StreamableLoadingResult<ISceneFacade>> FlowInternalAsync(GetSceneFacadeIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) => intention.DefinitionComponent.IsEmpty ? new StreamableLoadingResult<ISceneFacade>(loadEmptySceneSystemLogic.Flow(intention)) - : new StreamableLoadingResult<ISceneFacade>(await loadSceneSystemLogic.FlowAsync(sceneFactory, intention, GetReportCategory(), partition, ct)); + : new StreamableLoadingResult<ISceneFacade>(await loadSceneSystemLogic.FlowAsync(sceneFactory, intention, GetReportData(), partition, ct)); protected override void DisposeAbandonedResult(ISceneFacade asset) { diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogic.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogic.cs index 2b645dc219..4e40ef3f45 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogic.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogic.cs @@ -1,6 +1,7 @@ using Arch.Core; using CommunicationData.URLHelpers; using Cysharp.Threading.Tasks; +using DCL.Diagnostics; using DCL.Ipfs; using DCL.Multiplayer.SDK.Systems.GlobalWorld; using DCL.WebRequests; @@ -17,7 +18,7 @@ public LoadSceneSystemLogic(IWebRequestController webRequestController, URLDomai protected override string GetAssetBundleSceneId(string ipfsPathEntityId) => ipfsPathEntityId; - protected override async UniTask<ISceneContent> GetSceneHashedContentAsync(SceneEntityDefinition definition, URLDomain contentBaseUrl, string reportCategory) => + protected override async UniTask<ISceneContent> GetSceneHashedContentAsync(SceneEntityDefinition definition, URLDomain contentBaseUrl, ReportData reportCategory) => new SceneHashedContent(definition.content!, contentBaseUrl); } } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogicBase.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogicBase.cs index 5cf5a1fdfa..6414153a1e 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogicBase.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogicBase.cs @@ -32,7 +32,7 @@ protected LoadSceneSystemLogicBase(IWebRequestController webRequestController, I this.webRequestController = webRequestController; } - public async UniTask<ISceneFacade> FlowAsync(ISceneFactory sceneFactory, GetSceneFacadeIntention intention, string reportCategory, IPartitionComponent partition, CancellationToken ct) + public async UniTask<ISceneFacade> FlowAsync(ISceneFactory sceneFactory, GetSceneFacadeIntention intention, ReportData reportCategory, IPartitionComponent partition, CancellationToken ct) { var definitionComponent = intention.DefinitionComponent; var ipfsPath = definitionComponent.IpfsPath; @@ -75,9 +75,9 @@ public async UniTask<ISceneFacade> FlowAsync(ISceneFactory sceneFactory, GetScen protected abstract string GetAssetBundleSceneId(string ipfsPathEntityId); - protected abstract UniTask<ISceneContent> GetSceneHashedContentAsync(SceneEntityDefinition definition, URLDomain contentBaseUrl, string reportCategory); + protected abstract UniTask<ISceneContent> GetSceneHashedContentAsync(SceneEntityDefinition definition, URLDomain contentBaseUrl, ReportData reportCategory); - protected async UniTask<ReadOnlyMemory<byte>> LoadMainCrdtAsync(ISceneContent sceneContent, string reportCategory, CancellationToken ct) + protected async UniTask<ReadOnlyMemory<byte>> LoadMainCrdtAsync(ISceneContent sceneContent, ReportData reportCategory, CancellationToken ct) { const string NAME = "main.crdt"; @@ -88,9 +88,9 @@ protected async UniTask<ReadOnlyMemory<byte>> LoadMainCrdtAsync(ISceneContent sc return await webRequestController.GetAsync(new CommonArguments(url), ct, reportCategory).GetDataCopyAsync(); } - protected async UniTask<SceneAssetBundleManifest> LoadAssetBundleManifestAsync(string sceneId, string reportCategory, CancellationToken ct) + protected async UniTask<SceneAssetBundleManifest> LoadAssetBundleManifestAsync(string sceneId, ReportData reportCategory, CancellationToken ct) { - var url = assetBundleURL.Append(URLPath.FromString($"manifest/{sceneId}{PlatformUtils.GetPlatform()}.json")); + var url = assetBundleURL.Append(URLPath.FromString($"manifest/{sceneId}{PlatformUtils.GetCurrentPlatform()}.json")); try { @@ -100,13 +100,13 @@ protected async UniTask<SceneAssetBundleManifest> LoadAssetBundleManifestAsync(s if (sceneAbDto.ValidateVersion()) return new SceneAssetBundleManifest(assetBundleURL, sceneAbDto.Version, sceneAbDto.files); - ReportHub.LogError(new ReportData(reportCategory, ReportHint.SessionStatic), $"Asset Bundle Version Mismatch for {sceneId}"); + ReportHub.LogError(reportCategory.WithSessionStatic(), $"Asset Bundle Version Mismatch for {sceneId}"); return SceneAssetBundleManifest.NULL; } catch { // Don't block the scene if the loading manifest failed, just use NULL - ReportHub.LogError(new ReportData(reportCategory, ReportHint.SessionStatic), $"Asset Bundles Manifest is not loaded for scene {sceneId}"); + ReportHub.LogError(reportCategory.WithSessionStatic(), $"Asset Bundles Manifest is not loaded for scene {sceneId}"); return SceneAssetBundleManifest.NULL; } } @@ -115,14 +115,14 @@ protected async UniTask<SceneAssetBundleManifest> LoadAssetBundleManifestAsync(s /// Loads scene metadata from a separate endpoint to ensure it contains "baseUrl" and overrides the existing metadata /// with new one /// </summary> - protected async UniTask<UniTaskVoid> OverrideSceneMetadataAsync(ISceneContent sceneContent, GetSceneFacadeIntention intention, string reportCategory, string sceneID, CancellationToken ct) + protected async UniTask<UniTaskVoid> OverrideSceneMetadataAsync(ISceneContent sceneContent, GetSceneFacadeIntention intention, ReportData reportCategory, string sceneID, CancellationToken ct) { const string NAME = "scene.json"; if (!sceneContent.TryGetContentUrl(NAME, out var sceneJsonUrl)) { //What happens if we dont have a scene.json file? Will the default one work? - ReportHub.LogWarning(new ReportData(reportCategory, ReportHint.SessionStatic), $"scene.json does not exist for scene {sceneID}, no override is possible"); + ReportHub.LogWarning(reportCategory.WithSessionStatic(), $"scene.json does not exist for scene {sceneID}, no override is possible"); return default; } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/ControlSceneUpdateLoopSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/ControlSceneUpdateLoopSystem.cs index 0139d01a44..6859a72fa9 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/ControlSceneUpdateLoopSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/ControlSceneUpdateLoopSystem.cs @@ -71,13 +71,20 @@ async UniTaskVoid RunOnThreadPoolAsync() // FPS is set by another system await scene.StartUpdateLoopAsync(fps, destroyCancellationToken); } - catch (Exception e) { ReportHub.LogException(e, GetReportCategory()); } + catch (Exception e) { ReportHub.LogException(e, GetReportData()); } } RunOnThreadPoolAsync().Forget(); - // So we know the scene has started - scenesCache.Add(scene, promise.LoadingIntention.DefinitionComponent.Parcels); + if (promise.LoadingIntention.DefinitionComponent.IsPortableExperience) + { + scenesCache.AddPortableExperienceScene(scene, promise.LoadingIntention.DefinitionComponent.IpfsPath.EntityId); + } + else + { + // So we know the scene has started + scenesCache.Add(scene, promise.LoadingIntention.DefinitionComponent.Parcels); + } World.Add(entity, scene); } } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadPortableExperiencePointersSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadPortableExperiencePointersSystem.cs new file mode 100644 index 0000000000..3cbe523cb1 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadPortableExperiencePointersSystem.cs @@ -0,0 +1,91 @@ +using Arch.Core; +using Arch.System; +using Arch.SystemGroups; +using DCL.Ipfs; +using ECS.LifeCycle.Components; +using ECS.Prioritization.Components; +using ECS.SceneLifeCycle.Components; +using ECS.SceneLifeCycle.SceneDefinition; +using ECS.StreamableLoading.Common; +using ECS.StreamableLoading.Common.Components; + +namespace ECS.SceneLifeCycle.Systems +{ + [UpdateInGroup(typeof(RealmGroup))] + public partial class LoadPortableExperiencePointersSystem : LoadScenePointerSystemBase + { + internal LoadPortableExperiencePointersSystem(World world) : base(world) { } + + protected override void Update(float t) + { + ResolvePromisesQuery(World); + InitiateDefinitionLoadingQuery(World); + HandleEntityDestructionQuery(World); + } + + [Query] + [None(typeof(PortableExperienceScenePointers), typeof(DeleteEntityIntention))] + private void InitiateDefinitionLoading(in Entity entity, ref PortableExperienceRealmComponent portableExperienceRealmComponent) + { + var promises = new AssetPromise<SceneEntityDefinition, GetSceneDefinition>[portableExperienceRealmComponent.Ipfs.SceneUrns.Count]; + + for (var i = 0; i < portableExperienceRealmComponent.Ipfs.SceneUrns.Count; i++) + { + string urn = portableExperienceRealmComponent.Ipfs.SceneUrns[i]; + IpfsPath ipfsPath = IpfsHelper.ParseUrn(urn); + + // can't prioritize scenes definition - they are always top priority + var promise = AssetPromise<SceneEntityDefinition, GetSceneDefinition> + .Create(World, new GetSceneDefinition(new CommonLoadingArguments(ipfsPath.GetUrl(portableExperienceRealmComponent.Ipfs.ContentBaseUrl)), ipfsPath), PartitionComponent.TOP_PRIORITY); + + promises[i] = promise; + } + + World.Add(entity, new PortableExperienceScenePointers(promises)); + } + + [Query] + [None(typeof(DeleteEntityIntention))] + private void ResolvePromises(ref PortableExperienceScenePointers portableExperienceScenePointers, PortableExperienceComponent portableExperienceComponent) + { + if (portableExperienceScenePointers.AllPromisesResolved) return; + + portableExperienceScenePointers.AllPromisesResolved = true; + + for (var i = 0; i < portableExperienceScenePointers.Promises.Length; i++) + { + ref AssetPromise<SceneEntityDefinition, GetSceneDefinition> promise = ref portableExperienceScenePointers.Promises[i]; + if (promise.IsConsumed) continue; + + if (promise.TryConsume(World, out StreamableLoadingResult<SceneEntityDefinition> result)) + { + if (result is {Asset: not null, Succeeded: true }) + { + var entity = CreateSceneEntity(result.Asset, promise.LoadingIntention.IpfsPath, true); + World.Add(entity, portableExperienceComponent); + } + } + else + { + // at least one unresolved promise + portableExperienceScenePointers.AllPromisesResolved = false; + } + } + } + + [Query] + [All(typeof(DeleteEntityIntention))] + private void HandleEntityDestruction(in Entity entity, ref PortableExperienceScenePointers portableExperienceScenePointers) + { + for (var i = 0; i < portableExperienceScenePointers.Promises.Length; i++) + { + ref AssetPromise<SceneEntityDefinition, GetSceneDefinition> promise = ref portableExperienceScenePointers.Promises[i]; + promise.ForgetLoading(World); + } + + World.Remove<PortableExperienceScenePointers>(entity); + } + + + } +} diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadPortableExperiencePointersSystem.cs.meta b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadPortableExperiencePointersSystem.cs.meta new file mode 100644 index 0000000000..516bba2602 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadPortableExperiencePointersSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4ebeef74419502249adacda3c08a5099 +timeCreated: 1688651147 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadScenePointerSystemBase.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadScenePointerSystemBase.cs index 6ec55a2806..3f9a48288d 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadScenePointerSystemBase.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/LoadScenePointerSystemBase.cs @@ -14,8 +14,8 @@ public abstract class LoadScenePointerSystemBase : BaseUnityLoopSystem { protected LoadScenePointerSystemBase(World world) : base(world) { } - protected Entity CreateSceneEntity(SceneEntityDefinition definition, IpfsPath ipfsPath) => - World.Create(new SceneDefinitionComponent(definition, ipfsPath)); + protected Entity CreateSceneEntity(SceneEntityDefinition definition, IpfsPath ipfsPath, bool isPortableExperience = false) => + World.Create(SceneDefinitionComponentFactory.CreateFromDefinition(definition, ipfsPath, isPortableExperience)); /// <summary> /// Creates a scene entity if none of scene parcels were processed yet @@ -35,7 +35,7 @@ protected void TryCreateSceneEntity(SceneEntityDefinition definition, IpfsPath i if (shouldCreate) { // Note: Span.ToArray is not LINQ - World.Create(new SceneDefinitionComponent(definition, ipfsPath)); + World.Create(SceneDefinitionComponentFactory.CreateFromDefinition(definition, ipfsPath)); } } } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/PartitionSceneEntitiesSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/PartitionSceneEntitiesSystem.cs index 1b382bd26b..ff9ff3b377 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/PartitionSceneEntitiesSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/PartitionSceneEntitiesSystem.cs @@ -10,7 +10,6 @@ using Unity.Collections; using Unity.Jobs; using UnityEngine; -using Utility; using static ECS.Prioritization.ScenesPartitioningUtils; using static Utility.ParcelMathHelper; @@ -112,6 +111,18 @@ private void PartitionNewEntity(in Entity entity, ref SceneDefinitionComponent d return; } + if (definition.IsPortableExperience) + { + PartitionComponent partitionComponent = partitionComponentPool.Get(); + partitionComponent.OutOfRange = false; + partitionComponent.Bucket = 0; + partitionComponent.IsBehind = false; + partitionComponent.RawSqrDistance = 1; + partitionComponent.IsDirty = true; + World.Add(entity, partitionComponent); + return; + } + if (definition.InternalJobIndex < 0) { ScheduleSceneDefinition(ref definition); @@ -137,9 +148,9 @@ protected void ScheduleSceneDefinition(ref SceneDefinitionComponent definition) protected void AddCorners(ref SceneDefinitionComponent definition) { - var corners = new NativeArray<ParcelCorners>(definition.ParcelsCorners.Length, Allocator.Persistent); + var corners = new NativeArray<ParcelCorners>(definition.ParcelsCorners.Count, Allocator.Persistent); - for (var i = 0; i < definition.ParcelsCorners.Length; i++) + for (var i = 0; i < definition.ParcelsCorners.Count; i++) corners[i] = definition.ParcelsCorners[i]; partitionDataContainer.AddCorners(new ParcelCornersData(in corners)); @@ -147,6 +158,7 @@ protected void AddCorners(ref SceneDefinitionComponent definition) } [Query] + [None(typeof(PortableExperienceComponent))] private void PartitionExistingEntity(ref SceneDefinitionComponent definition, ref PartitionComponent partitionComponent) { if (definition.InternalJobIndex < 0) return; diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/ResolveStaticPointersSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/ResolveStaticPointersSystem.cs index b7f6ab5312..d4258e42b9 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/ResolveStaticPointersSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/ResolveStaticPointersSystem.cs @@ -50,7 +50,7 @@ private void ForEachRealm(ref RealmComponent realm, ref StaticScenePointers stat private void StartSceneLoading([Data] IIpfsRealm realm, [Data] in StaticScenePointers staticScenePointers, in Entity entity, ref SceneDefinitionComponent definition, ref PartitionComponent partitionComponent) { - for (var i = 0; i < definition.Parcels.Length; i++) + for (var i = 0; i < definition.Parcels.Count; i++) { Vector2Int parcel = definition.Parcels[i]; diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadPortableExperiencesSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadPortableExperiencesSystem.cs new file mode 100644 index 0000000000..8862692205 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadPortableExperiencesSystem.cs @@ -0,0 +1,40 @@ +using Arch.Core; +using Arch.System; +using Arch.SystemGroups; +using CommunicationData.URLHelpers; +using ECS.Abstract; +using ECS.Groups; +using ECS.LifeCycle.Components; +using ECS.SceneLifeCycle.SceneDefinition; + +namespace ECS.SceneLifeCycle.Systems +{ + [UpdateInGroup(typeof(CleanUpGroup))] + [UpdateBefore(typeof(UnloadSceneSystem))] + public partial class UnloadPortableExperiencesSystem : BaseUnityLoopSystem + { + internal UnloadPortableExperiencesSystem(World world) : base(world) { } + + protected override void Update(float t) + { + UnloadPortableExperienceRealmQuery(World); + } + + [Query] + [All(typeof(DeleteEntityIntention), (typeof(PortableExperienceRealmComponent)))] + private void UnloadPortableExperienceRealm(in Entity entity, ref PortableExperienceComponent portableExperienceComponent) + { + //We start another query from here using the data from the px component to match all other entities that were created by this PX + UnloadLoadedPortableExperienceSceneQuery(World, portableExperienceComponent.Ens); + World.Remove<PortableExperienceRealmComponent, PortableExperienceComponent>(entity); + } + + [Query] + [None(typeof(DeleteEntityIntention))] + private void UnloadLoadedPortableExperienceScene([Data] ENS sceneEntityId, in Entity entity, ref PortableExperienceComponent portableExperienceComponent) + { + //We only set to destroy those entities that have the same ens than the PX + if (portableExperienceComponent.Ens.Equals(sceneEntityId)) World.Add<DeleteEntityIntention>(entity); + } + } +} diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadPortableExperiencesSystem.cs.meta b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadPortableExperiencesSystem.cs.meta new file mode 100644 index 0000000000..509c034e1f --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadPortableExperiencesSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1e211d7ea5ac4f26913fadf60a76e7f0 +timeCreated: 1723682021 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadSceneSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadSceneSystem.cs index 1cbeadb345..ad5ea3d0c1 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadSceneSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UnloadSceneSystem.cs @@ -31,6 +31,7 @@ internal UnloadSceneSystem(World world, IScenesCache scenesCache, SceneAssetLock protected override void Update(float t) { UnloadLoadedSceneQuery(World); + UnloadLoadedPortableExperienceSceneQuery(World); AbortLoadingScenesQuery(World); } @@ -40,7 +41,7 @@ public void FinalizeComponents(in Query query) } [Query] - [All(typeof(DeleteEntityIntention))] + [All(typeof(DeleteEntityIntention)), None(typeof(PortableExperienceComponent))] private void UnloadLoadedScene(in Entity entity, ref SceneDefinitionComponent definitionComponent, ref ISceneFacade sceneFacade) { // Keep definition so it won't be downloaded again = Cache in ECS itself @@ -48,6 +49,15 @@ private void UnloadLoadedScene(in Entity entity, ref SceneDefinitionComponent de World.Remove<ISceneFacade, VisualSceneState, DeleteEntityIntention>(entity); } + [Query] + [All(typeof(DeleteEntityIntention), (typeof(PortableExperienceComponent)))] + private void UnloadLoadedPortableExperienceScene(in Entity entity, ref SceneDefinitionComponent definitionComponent, ref ISceneFacade sceneFacade) + { + sceneFacade.DisposeAsync().Forget(); + scenesCache.RemovePortableExperienceFacade(definitionComponent.IpfsPath.EntityId); + World.Remove<ISceneFacade, SceneDefinitionComponent>(entity); + } + [Query] [All(typeof(DeleteEntityIntention))] private void AbortLoadingScenes(in Entity entity, ref AssetPromise<ISceneFacade, GetSceneFacadeIntention> promise) diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UpdateCurrentSceneSystem.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UpdateCurrentSceneSystem.cs index 05e94c783d..0df4b0ea29 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UpdateCurrentSceneSystem.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Systems/UpdateCurrentSceneSystem.cs @@ -1,9 +1,12 @@ using Arch.Core; using Arch.SystemGroups; using DCL.Character.Components; +using DCL.DebugUtilities; +using DCL.DebugUtilities.UIBindings; using ECS.Abstract; using ECS.SceneLifeCycle.CurrentScene; using UnityEngine; +using UnityEngine.Rendering; using Utility; namespace ECS.SceneLifeCycle.Systems @@ -23,7 +26,16 @@ public partial class UpdateCurrentSceneSystem : BaseUnityLoopSystem private readonly SceneAssetLock sceneAssetLock; - internal UpdateCurrentSceneSystem(World world, IRealmData realmData, IScenesCache scenesCache, CurrentSceneInfo currentSceneInfo, Entity playerEntity, SceneAssetLock sceneAssetLock) : base(world) + private IDebugContainerBuilder debugBuilder; + private ElementBinding<string> sceneNameBinding; + private ElementBinding<string> sceneParcelsBinding; + private ElementBinding<string> sceneHeightBinding; + private DebugWidgetVisibilityBinding debugInfoVisibilityBinding; + private bool showDebugCube; + private GameObject sceneBoundsCube; + + internal UpdateCurrentSceneSystem(World world, IRealmData realmData, IScenesCache scenesCache, CurrentSceneInfo currentSceneInfo, + Entity playerEntity, SceneAssetLock sceneAssetLock, IDebugContainerBuilder debugBuilder) : base(world) { this.realmData = realmData; this.scenesCache = scenesCache; @@ -31,6 +43,14 @@ internal UpdateCurrentSceneSystem(World world, IRealmData realmData, IScenesCach this.playerEntity = playerEntity; this.sceneAssetLock = sceneAssetLock; ResetProcessedParcel(); + + debugBuilder.TryAddWidget(IDebugContainerBuilder.Categories.CURRENT_SCENE)? + .SetVisibilityBinding(debugInfoVisibilityBinding = new DebugWidgetVisibilityBinding(true)) + .AddCustomMarker("Name:", sceneNameBinding = new ElementBinding<string>(string.Empty)) + .AddCustomMarker("Parcels:", sceneParcelsBinding = new ElementBinding<string>(string.Empty)) + .AddCustomMarker("Height (m):", sceneHeightBinding = new ElementBinding<string>(string .Empty)) + .AddToggleField("Show scene bounds:", (state) => { showDebugCube = state.newValue; }, false); + this.debugBuilder = debugBuilder; } private void ResetProcessedParcel() @@ -51,14 +71,26 @@ protected override void Update(float t) UpdateSceneReadiness(parcel); UpdateCurrentScene(parcel); UpdateCurrentSceneInfo(parcel); + + if (debugBuilder.IsVisible && debugInfoVisibilityBinding.IsExpanded) + RefreshSceneDebugInfo(); + } + + public override void Dispose() + { + base.Dispose(); + + GameObject.Destroy(sceneBoundsCube); } private void UpdateSceneReadiness(Vector2Int parcel) { + if (!scenesCache.TryGetByParcel(parcel, out var currentScene)) return; sceneAssetLock.TryLock(currentScene); + if (!currentScene.SceneStateProvider.IsCurrent) currentScene.SetIsCurrent(true); } @@ -66,7 +98,6 @@ private void UpdateSceneReadiness(Vector2Int parcel) private void UpdateCurrentScene(Vector2Int parcel) { if (lastParcelProcessed == parcel) return; - scenesCache.TryGetByParcel(lastParcelProcessed, out var lastProcessedScene); scenesCache.TryGetByParcel(parcel, out var currentScene); @@ -77,6 +108,7 @@ private void UpdateCurrentScene(Vector2Int parcel) currentScene.SetIsCurrent(true); lastParcelProcessed = parcel; + scenesCache.SetCurrentScene(currentScene); } private void UpdateCurrentSceneInfo(Vector2Int parcel) @@ -85,5 +117,71 @@ private void UpdateCurrentSceneInfo(Vector2Int parcel) currentSceneInfo.Update(currentScene); scenesCache.SetCurrentScene(currentScene); } + + private void RefreshSceneDebugInfo() + { + if (scenesCache.CurrentScene != null) + { + sceneBoundsCube?.SetActive(showDebugCube); + + if (sceneNameBinding.Value != scenesCache.CurrentScene.Info.Name) + { + sceneNameBinding.Value = scenesCache.CurrentScene.Info.Name; + + if (scenesCache.CurrentScene.SceneData.Parcels != null) + { + sceneParcelsBinding.Value = scenesCache.CurrentScene.SceneData.Parcels.Count.ToString(); + } + + sceneHeightBinding.Value = scenesCache.CurrentScene.SceneData.Geometry.Height.ToString(); + + if (sceneBoundsCube == null) + { + sceneBoundsCube = CreateDebugCube(); + } + + UpdateDebugCube(scenesCache.CurrentScene.SceneData.Geometry, sceneBoundsCube); + } + } + else + { + sceneNameBinding.Value = "<No data>"; + sceneParcelsBinding.Value = "<No data>"; + sceneHeightBinding.Value = "<No data>"; + sceneBoundsCube?.SetActive(false); + } + } + + private static GameObject CreateDebugCube() + { + GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); + cube.name = "DebugSceneBoundsCube"; + + Material cubeMaterial = new Material(Shader.Find("DCL/Scene")); + cubeMaterial.color = new Color(1.0f, 0.0f, 0.0f, 0.8f); + cubeMaterial.SetFloat("_SrcBlend", (int)BlendMode.One); + cubeMaterial.SetFloat("_DstBlend", (int)BlendMode.OneMinusSrcAlpha); + cubeMaterial.SetFloat("_Cull", (int)CullMode.Off); + cubeMaterial.SetFloat("_Surface", 1.0f); // 1 means transparent + cubeMaterial.renderQueue = (int)RenderQueue.Transparent; + cube.GetComponent<MeshRenderer>().material = cubeMaterial; + + GameObject.Destroy(cube.GetComponent<Collider>()); + + cube.SetActive(false); + return cube; + } + + private static void UpdateDebugCube(ParcelMathHelper.SceneGeometry sceneGeometry, GameObject cube) + { + // Makes the cube fit the scene bounds + Vector3 cubeSize = new Vector3(sceneGeometry.CircumscribedPlanes.MaxX - sceneGeometry.CircumscribedPlanes.MinX, + sceneGeometry.Height, + sceneGeometry.CircumscribedPlanes.MaxZ - sceneGeometry.CircumscribedPlanes.MinZ); + cube.transform.position = new Vector3(sceneGeometry.CircumscribedPlanes.MinX + cubeSize.x * 0.5f, + cubeSize.y * 0.5f, + sceneGeometry.CircumscribedPlanes.MinZ + cubeSize.z * 0.5f); + cube.transform.localScale = cubeSize; + } } } diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Tests/PartitionSceneEntitiesSystemShould.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Tests/PartitionSceneEntitiesSystemShould.cs index 39c7a5fb82..f647e119e6 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Tests/PartitionSceneEntitiesSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Tests/PartitionSceneEntitiesSystemShould.cs @@ -32,7 +32,7 @@ public void SetUp() samplingData = Substitute.For<IReadOnlyCameraSamplingData>(); componentPool = Substitute.For<IComponentPool<PartitionComponent>>(); componentPool.Get().Returns(_ => new PartitionComponent()); - var realmPartitionSettings = Substitute.For<IRealmPartitionSettings>(); + IRealmPartitionSettings realmPartitionSettings = Substitute.For<IRealmPartitionSettings>(); system = new PartitionSceneEntitiesSystem(world, componentPool, partitionSettings, samplingData, new PartitionDataContainer(), realmPartitionSettings); system.partitionDataContainer.Restart(); @@ -46,7 +46,7 @@ public void PartitionNewEntity() samplingData.Position.Returns(new Vector3(0, 0, 46)); // Partition #1 samplingData.Parcel.Returns(new Vector3(0, 0, 46).ToParcel()); - Entity e = world.Create(new SceneDefinitionComponent(new SceneEntityDefinition + Entity e = world.Create(SceneDefinitionComponentFactory.CreateFromDefinition(new SceneEntityDefinition { metadata = new SceneMetadata { @@ -79,7 +79,7 @@ public void PartitionExistingEntity() samplingData.Parcel.Returns(coords.ToParcel()); // new entity without partition - Entity e = world.Create(new SceneDefinitionComponent(new SceneEntityDefinition + Entity e = world.Create(SceneDefinitionComponentFactory.CreateFromDefinition(new SceneEntityDefinition { metadata = new SceneMetadata { @@ -88,7 +88,6 @@ public void PartitionExistingEntity() }, }, new IpfsPath())); - // Run for the first time so the internals of the system change system.Update(0); system.ForceCompleteJob(); diff --git a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Tests/ResolveSceneStateByIncreasingRadiusSystemShould.cs b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Tests/ResolveSceneStateByIncreasingRadiusSystemShould.cs index 9e2a04f2b7..3458f86365 100644 --- a/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Tests/ResolveSceneStateByIncreasingRadiusSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/SceneLifeCycle/Tests/ResolveSceneStateByIncreasingRadiusSystemShould.cs @@ -43,7 +43,7 @@ public async Task LimitScenesLoading() // Create 4 for (var i = 0; i < 4; i++) { - world.Create(new SceneDefinitionComponent( + world.Create(SceneDefinitionComponentFactory.CreateFromDefinition( new SceneEntityDefinition { metadata = new SceneMetadata @@ -54,7 +54,7 @@ public async Task LimitScenesLoading() }, new IpfsPath()), new PartitionComponent { - Bucket = (byte)i, RawSqrDistance = ParcelMathHelper.SQR_PARCEL_SIZE * i + Bucket = (byte)i, RawSqrDistance = ParcelMathHelper.SQR_PARCEL_SIZE * i, }, new VisualSceneState()); } @@ -86,7 +86,7 @@ public void StartUnloading() for (byte i = 2; i <= 4; i++) { - world.Create(new SceneDefinitionComponent( + world.Create(SceneDefinitionComponentFactory.CreateFromDefinition( new SceneEntityDefinition { metadata = new SceneMetadata @@ -99,7 +99,7 @@ public void StartUnloading() }, new IpfsPath()), new PartitionComponent { - Bucket = i, RawSqrDistance = ParcelMathHelper.PARCEL_SIZE * i * ParcelMathHelper.PARCEL_SIZE * i - 1f, OutOfRange = i < 4 + Bucket = i, RawSqrDistance = (ParcelMathHelper.PARCEL_SIZE * i * ParcelMathHelper.PARCEL_SIZE * i) - 1f, OutOfRange = i < 4, }, Substitute.For<ISceneFacade>()); } diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/AssetBundleData.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/AssetBundleData.cs index 50dda6c18e..9a6a7152d0 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/AssetBundleData.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/AssetBundleData.cs @@ -1,5 +1,4 @@ using DCL.Profiling; -using JetBrains.Annotations; using System; using UnityEngine; using UnityEngine.Assertions; @@ -11,7 +10,7 @@ namespace ECS.StreamableLoading.AssetBundles /// <summary> /// A wrapper over <see cref="AssetBundle" /> to provide additional data /// </summary> - public class AssetBundleData : IDisposable + public class AssetBundleData : IAssetData { private readonly Object? mainAsset; private readonly Type? assetType; @@ -104,9 +103,7 @@ public void Dereference() ProfilingCounters.ABReferencedAmount.Value--; } - public string GetInstanceName() - { - return $"AB:{AssetBundle.name}_{version}_{source}"; - } + public string GetInstanceName() => + $"AB:{AssetBundle.name}_{version}_{source}"; } } diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Editor/CompileSceneShader.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Editor/CompileSceneShader.cs index 9f16528a05..86d64ae0d4 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Editor/CompileSceneShader.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Editor/CompileSceneShader.cs @@ -22,7 +22,7 @@ public static class CompileSceneShader [MenuItem("Decentraland/Shaders/Compile \"Scene\" Shader Variants")] public static void ExecuteMenuItem() { - string sPlatform = PlatformUtils.GetPlatform(); + string sPlatform = PlatformUtils.GetCurrentPlatform(); BuildTarget bt = BuildTarget.StandaloneWindows64; // default switch (sPlatform) diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/GetAssetBundleIntention.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/GetAssetBundleIntention.cs index 008c758f89..30b27f870d 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/GetAssetBundleIntention.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/GetAssetBundleIntention.cs @@ -73,7 +73,7 @@ public static GetAssetBundleIntention FromHash(Type? expectedAssetType, string h new (expectedAssetType, hash: hash, permittedSources: permittedSources, assetBundleManifest: manifest, customEmbeddedSubDirectory: customEmbeddedSubDirectory); public static GetAssetBundleIntention FromHash(Type expectedAssetType, string hash, CancellationTokenSource cancellationTokenSource, AssetSource permittedSources = AssetSource.ALL, - SceneAssetBundleManifest manifest = null, URLSubdirectory customEmbeddedSubDirectory = default) => + SceneAssetBundleManifest? manifest = null, URLSubdirectory customEmbeddedSubDirectory = default) => new (expectedAssetType, hash: hash, permittedSources: permittedSources, assetBundleManifest: manifest, customEmbeddedSubDirectory: customEmbeddedSubDirectory, cancellationTokenSource: cancellationTokenSource); public static GetAssetBundleIntention Create(Type? expectedAssetType, string hash, string name,AssetSource permittedSources = AssetSource.ALL, SceneAssetBundleManifest? manifest = null, URLSubdirectory customEmbeddedSubDirectory = default) => diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/LoadAssetBundleSystem.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/LoadAssetBundleSystem.cs index ecd29619cf..7f8cf0e62c 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/LoadAssetBundleSystem.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/LoadAssetBundleSystem.cs @@ -17,7 +17,6 @@ using AssetManagement; using UnityEngine; using UnityEngine.Networking; -using Utility.Multithreading; using Object = UnityEngine.Object; namespace ECS.StreamableLoading.AssetBundles @@ -52,7 +51,7 @@ private async UniTask<AssetBundleData[]> LoadDependenciesAsync(GetAssetBundleInt var customEmbeddedSubdirectory = parentIntent.CommonArguments.CustomEmbeddedSubDirectory; return await UniTask.WhenAll(assetBundleMetadata.dependencies.Select(hash => WaitForDependencyAsync(manifest, hash, customEmbeddedSubdirectory, partition, ct))); - } + } protected override async UniTask<StreamableLoadingResult<AssetBundleData>> FlowInternalAsync(GetAssetBundleIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) { @@ -116,7 +115,7 @@ protected override async UniTask<StreamableLoadingResult<AssetBundleData>> FlowI string source = intention.CommonArguments.CurrentSource.ToStringNonAlloc(); // if the type was not specified don't load any assets - return await CreateAssetBundleDataAsync(assetBundle, metrics, intention.ExpectedObjectType, mainAsset, loadingMutex, dependencies, GetReportCategory(), version, source, ct); + return await CreateAssetBundleDataAsync(assetBundle, metrics, intention.ExpectedObjectType, mainAsset, loadingMutex, dependencies, GetReportData(), version, source, ct); } catch (Exception e) { @@ -135,7 +134,7 @@ public static async UniTask<StreamableLoadingResult<AssetBundleData>> CreateAsse AssetBundle assetBundle, AssetBundleMetrics? metrics, Type? expectedObjType, string? mainAsset, AssetBundleLoadingMutex loadingMutex, AssetBundleData[] dependencies, - string reportCategory, + ReportData reportCategory, string version, string source, CancellationToken ct) @@ -152,7 +151,9 @@ public static async UniTask<StreamableLoadingResult<AssetBundleData>> CreateAsse source: source)); } - private static async UniTask<Object> LoadAllAssetsAsync(AssetBundle assetBundle, Type objectType, string? mainAsset, AssetBundleLoadingMutex loadingMutex, string reportCategory, CancellationToken ct) { + private static async UniTask<Object> LoadAllAssetsAsync(AssetBundle assetBundle, Type objectType, string? mainAsset, AssetBundleLoadingMutex loadingMutex, ReportData reportCategory, + CancellationToken ct) + { using AssetBundleLoadingMutex.LoadingRegion _ = await loadingMutex.AcquireAsync(ct); var asyncOp = !string.IsNullOrEmpty(mainAsset) diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/PrepareAssetBundleLoadingParametersSystemBase.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/PrepareAssetBundleLoadingParametersSystemBase.cs index 8fffe715a5..5d38e4f17a 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/PrepareAssetBundleLoadingParametersSystemBase.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/PrepareAssetBundleLoadingParametersSystemBase.cs @@ -5,7 +5,6 @@ using ECS.StreamableLoading.Common.Components; using System; using System.Linq; -using UnityEngine; using Utility; namespace ECS.StreamableLoading.AssetBundles @@ -16,7 +15,7 @@ public abstract class PrepareAssetBundleLoadingParametersSystemBase : BaseUnityL { "dcl/scene_ignore_windows", "dcl/scene_ignore_mac", "dcl/universal render pipeline/lit_ignore_windows", - "dcl/universal render pipeline/lit_ignore_mac" + "dcl/universal render pipeline/lit_ignore_mac", }; private readonly URLDomain streamingAssetURL; @@ -50,7 +49,7 @@ protected void PrepareCommonArguments(in Entity entity, ref GetAssetBundleIntent if (assetBundleIntention.Manifest == null) { World.Add(entity, new StreamableLoadingResult<AssetBundleData> - (CreateException(new ArgumentException($"Manifest must be provided to load {assetBundleIntention.Name} from `WEB` source")))); + (GetReportCategory(), CreateException(new ArgumentException($"Manifest must be provided to load {assetBundleIntention.Name} from `WEB` source")))); return; } @@ -59,7 +58,7 @@ protected void PrepareCommonArguments(in Entity entity, ref GetAssetBundleIntent { // Add the failure to the entity World.Add(entity, new StreamableLoadingResult<AssetBundleData> - (CreateException(new ArgumentException($"Asset Bundle {assetBundleIntention.Hash} {assetBundleIntention.Name} not found in the manifest")))); + (GetReportCategory(), CreateException(new ArgumentException($"Asset Bundle {assetBundleIntention.Hash} {assetBundleIntention.Name} not found in the manifest")))); return; } diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportAssetBundleErrorSystem.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportAssetBundleErrorSystem.cs deleted file mode 100644 index fd7beb0841..0000000000 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportAssetBundleErrorSystem.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Arch.Core; -using Arch.SystemGroups; -using DCL.Diagnostics; -using ECS.StreamableLoading.Common.Systems; - -namespace ECS.StreamableLoading.AssetBundles -{ - [LogCategory(ReportCategory.ASSET_BUNDLES)] - [UpdateInGroup(typeof(StreamableLoadingGroup))] - [UpdateAfter(typeof(PrepareAssetBundleLoadingParametersSystem))] - public partial class ReportAssetBundleErrorSystem : ReportStreamableLoadingErrorSystem<GetAssetBundleIntention, AssetBundleData> - { - public ReportAssetBundleErrorSystem(World world, IReportsHandlingSettings settings) : base(world, settings) { } - } -} diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportAssetBundleErrorSystem.cs.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportAssetBundleErrorSystem.cs.meta deleted file mode 100644 index daf4bb6fa8..0000000000 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportAssetBundleErrorSystem.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 1f841e87a77e4d48a499baf9e82bf788 -timeCreated: 1687788133 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportGlobalAssetBundleErrorSystem.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportGlobalAssetBundleErrorSystem.cs deleted file mode 100644 index c86658aa1e..0000000000 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportGlobalAssetBundleErrorSystem.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Arch.Core; -using Arch.SystemGroups; -using Arch.SystemGroups.DefaultSystemGroups; -using DCL.Diagnostics; - -namespace ECS.StreamableLoading.AssetBundles -{ - [LogCategory(ReportCategory.ASSET_BUNDLES)] - [UpdateInGroup(typeof(PresentationSystemGroup))] - [UpdateAfter(typeof(PrepareGlobalAssetBundleLoadingParametersSystem))] - public partial class ReportGlobalAssetBundleErrorSystem : ReportAssetBundleErrorSystem - { - public ReportGlobalAssetBundleErrorSystem(World world, IReportsHandlingSettings settings) : base(world, settings) { } - } -} diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportGlobalAssetBundleErrorSystem.cs.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportGlobalAssetBundleErrorSystem.cs.meta deleted file mode 100644 index 8443b17d23..0000000000 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/ReportGlobalAssetBundleErrorSystem.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: e881ac2932594130bd4e08a52a6dc3fd -timeCreated: 1694086858 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs index 43aa2dc1b4..fd77ba8672 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs @@ -8,7 +8,7 @@ using SceneRunner.Scene; using System; using UnityEngine; -using Utility; +using UnityEngine.TestTools; namespace ECS.StreamableLoading.AssetBundles.Tests { @@ -31,6 +31,8 @@ public void SetUp() [Test] public void LoadFromEmbeddedFirst() { + LogAssert.ignoreFailingMessages = true; + var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "TEST", permittedSources: AssetSource.EMBEDDED | AssetSource.WEB); Entity e = world.Create(intent, new StreamableLoadingState()); @@ -47,7 +49,9 @@ public void LoadFromEmbeddedFirst() [Test] public void LoadFromWeb() { - sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, "200", new[] { "abcd" } )); + LogAssert.ignoreFailingMessages = true; + + sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, "200", new[] { "abcd" })); var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB); Entity e = world.Create(intent, new StreamableLoadingState()); @@ -64,6 +68,8 @@ public void LoadFromWeb() [Test] public void FailIfAbsentInManifest() { + LogAssert.ignoreFailingMessages = true; + sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, null, Array.Empty<string>())); var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB); diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AudioClips/LoadAudioClipSystem.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AudioClips/LoadAudioClipSystem.cs index 77e2b6e496..7801dbd450 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AudioClips/LoadAudioClipSystem.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/AudioClips/LoadAudioClipSystem.cs @@ -32,7 +32,7 @@ protected override async UniTask<StreamableLoadingResult<AudioClip>> FlowInterna new GetAudioClipArguments(intention.AudioType), new GetAudioClipWebRequest.CreateAudioClipOp(), ct, - reportCategory: GetReportCategory()); + GetReportData()); return new StreamableLoadingResult<AudioClip>(result); } diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/AssetPromise.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/AssetPromise.cs index 35e62100a2..c79b5b8223 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/AssetPromise.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/AssetPromise.cs @@ -24,7 +24,7 @@ public struct AssetPromise<TAsset, TLoadingIntention> : IEquatable<AssetPromise< public EntityReference Entity { get; private set; } /// <summary> - /// Loading intention will persist so it can be used to dereference unused assets + /// Loading intention will persist, so it can be used to dereference unused assets /// </summary> public TLoadingIntention LoadingIntention { get; private set; } @@ -136,6 +136,18 @@ private void DestroyEntity(World world) Entity = EntityReference.Null; } + public bool TryForgetWithEntityIfCancelled(Entity selfEntity, World world) + { + if (LoadingIntention.CancellationTokenSource.IsCancellationRequested) + { + ForgetLoading(world); + world.Destroy(selfEntity); + return true; + } + + return false; + } + public bool Equals(AssetPromise<TAsset, TLoadingIntention> other) => Entity.Equals(other.Entity) && LoadingIntention.Equals(other.LoadingIntention) && Nullable.Equals(Result, other.Result); diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/AssetPromiseExtensions.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/AssetPromiseExtensions.cs index e437d30546..82ca2e385f 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/AssetPromiseExtensions.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/AssetPromiseExtensions.cs @@ -1,4 +1,5 @@ using Arch.Core; +using DCL.Diagnostics; using ECS.StreamableLoading.Common.Components; using System; @@ -10,13 +11,17 @@ public static class AssetPromiseExtensions /// If the promise is already consumed returns the stored result, /// otherwise consumes the promise and returns the result /// </summary> - public static bool SafeTryConsume<TAsset, TLoadingIntention>(this ref AssetPromise<TAsset, TLoadingIntention> promise, World world, out StreamableLoadingResult<TAsset> result) + public static bool SafeTryConsume<TAsset, TLoadingIntention>(this ref AssetPromise<TAsset, TLoadingIntention> promise, World world, ReportData reportData, out StreamableLoadingResult<TAsset> result) where TLoadingIntention: IAssetIntention, IEquatable<TLoadingIntention> { if (promise.IsConsumed) { result = promise.Result - ?? new StreamableLoadingResult<TAsset>(new Exception("The promise generated no result")); + ?? new StreamableLoadingResult<TAsset>( + reportData, + new Exception("The promise generated no result") + ); + return true; } diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Components/ILoadingIntention.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Components/ILoadingIntention.cs index c8737669c4..661094d020 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Components/ILoadingIntention.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Components/ILoadingIntention.cs @@ -1,5 +1,9 @@ -using AssetManagement; +using Arch.Core; +using AssetManagement; using CommunicationData.URLHelpers; +using DCL.Diagnostics; +using System; +using System.Collections.Generic; using System.Threading; using Utility; @@ -15,6 +19,11 @@ public interface ILoadingIntention : IAssetIntention CommonLoadingArguments CommonArguments { get; set; } } + public interface IPointersLoadingIntention : ILoadingIntention + { + IReadOnlyList<URN> Pointers { get; } + } + public static class LoadingIntentionExtensions { public static bool IsCancelled<T>(this ref T intention) where T: struct, ILoadingIntention => @@ -58,5 +67,29 @@ public static void SetSources<T>(this ref T loadingIntention, AssetSource permit public static bool AreUrlEquals<TIntention>(this TIntention intention, TIntention other) where TIntention: struct, ILoadingIntention => intention.CommonArguments.URL == other.CommonArguments.URL; + + public static bool TryCancelByRequest<TIntention, TStreamableResult>( + this TIntention intention, + World world, + ReportData reportData, + Entity entity, + Func<TIntention, string> errorMessage + ) where TIntention: IAssetIntention + { + if (intention.CancellationTokenSource.IsCancellationRequested) + { + if (world.Has<StreamableLoadingResult<TStreamableResult>>(entity) == false) + world.Add( + entity, + new StreamableLoadingResult<TStreamableResult>( + reportData, new OperationCanceledException(errorMessage(intention)!) + ) + ); + + return true; + } + + return false; + } } } diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Components/StreamableLoadingResult.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Components/StreamableLoadingResult.cs index ae43356463..64639d71ac 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Components/StreamableLoadingResult.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Components/StreamableLoadingResult.cs @@ -1,4 +1,5 @@ -using System; +using DCL.Diagnostics; +using System; namespace ECS.StreamableLoading.Common.Components { @@ -7,19 +8,25 @@ namespace ECS.StreamableLoading.Common.Components /// </summary> public readonly struct StreamableLoadingResult<T> { - public readonly Exception? Exception; + private readonly (ReportData reportData, Exception exception)? exceptionData; + public readonly bool Succeeded; public readonly T? Asset; + public Exception? Exception => exceptionData?.exception; + public ReportData ReportData => exceptionData?.reportData ?? ReportData.UNSPECIFIED; - public StreamableLoadingResult(T asset) : this() + public StreamableLoadingResult(T? asset) : this() { Asset = asset; Succeeded = true; } - public StreamableLoadingResult(Exception exception) : this() + public StreamableLoadingResult(ReportData reportData, Exception exception) : this() { - Exception = exception; + if (exception is not OperationCanceledException) + ReportHub.LogException(exception, reportData); + + exceptionData = (reportData, exception); } public bool IsInitialized => Exception != null || Asset != null || Succeeded; diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/AssetsLoadingUtility.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/AssetsLoadingUtility.cs index 94232f1bed..9ef87e613a 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/AssetsLoadingUtility.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/AssetsLoadingUtility.cs @@ -24,43 +24,43 @@ public delegate UniTask<StreamableLoadingResult<TAsset>> InternalFlowDelegate<TA public static async UniTask<StreamableLoadingResult<TAsset>?> RepeatLoopAsync<TIntention, TAsset>(this TIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, - InternalFlowDelegate<TAsset, TIntention> flow, string reportCategory, CancellationToken ct) + InternalFlowDelegate<TAsset, TIntention> flow, ReportData reportData, CancellationToken ct) where TIntention: struct, ILoadingIntention { int attemptCount = intention.CommonArguments.Attempts; while (true) { - ReportHub.Log(reportCategory, $"Starting loading {intention}\n{partition}, attempts left: {attemptCount}"); + ReportHub.Log(reportData, $"Starting loading {intention}\n{partition}, attempts left: {attemptCount}"); try { return await flow(intention, acquiredBudget, partition, ct); } catch (UnityWebRequestException unityWebRequestException) { // we can't access web request here as it is disposed already - // no more sources left - if (intention.CommonArguments.PermittedSources == AssetSource.NONE) - { - ReportHub.LogError(reportCategory, $"Exception occured on loading {typeof(TAsset)} from {intention.ToString()} with url {intention.CommonArguments.URL}.\n" - + "No more sources left."); - - ReportHub.LogException(unityWebRequestException, reportCategory); - } - else - { - ReportHub.Log(reportCategory, $"Exception occured on loading {typeof(TAsset)} from {intention.ToString()}.\n" - + $"Trying sources: {intention.CommonArguments.PermittedSources} attemptCount {attemptCount} url: {intention.CommonArguments.URL}"); - } - // Decide if we can repeat or not --attemptCount; if (unityWebRequestException.IsIrrecoverableError(attemptCount)) { + // no more sources left + ReportHub.Log( + reportData, + $"Exception occured on loading {typeof(TAsset)} from {intention.ToString()}.\n" + + $"Trying sources: {intention.CommonArguments.PermittedSources} attemptCount {attemptCount} url: {intention.CommonArguments.URL}" + ); + if (intention.CommonArguments.PermittedSources == AssetSource.NONE) // conclude now - return new StreamableLoadingResult<TAsset>(unityWebRequestException); + return new StreamableLoadingResult<TAsset>( + reportData, + new Exception( + $"Exception occured on loading {typeof(TAsset)} from {intention.ToString()} with url {intention.CommonArguments.URL}.\n" + + "No more sources left.", + unityWebRequestException + ) + ); // Leave other systems to decide on other sources return null; @@ -70,25 +70,11 @@ public delegate UniTask<StreamableLoadingResult<TAsset>> InternalFlowDelegate<TA { // General exception // conclude now, we can't do anything - ReportException(reportCategory, e); - return new StreamableLoadingResult<TAsset>(e); + return new StreamableLoadingResult<TAsset>(reportData.WithSessionStatic(), e); } } } - public static void ReportException(string category, Exception exception) - { - ReportHub.LogException(exception, new ReportData(category, ReportHint.SessionStatic)); - } - - public static StreamableLoadingResult<TAsset> Denullify<TAsset>(this in StreamableLoadingResult<TAsset>? loadingResult) - { - if (loadingResult == null) - throw new ArgumentNullException(nameof(loadingResult)); - - return loadingResult.Value; - } - /// <summary> /// Throws and exception if the loading result is an exception or is null /// </summary> diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/LoadSystemBase.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/LoadSystemBase.cs index ef56e917a1..979ad916e7 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/LoadSystemBase.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/LoadSystemBase.cs @@ -161,10 +161,7 @@ CancellationToken disposalCt catch (Exception e) { // If we don't set an exception it will spin forever - result = new StreamableLoadingResult<TAsset>(e); - - if (e is not OperationCanceledException) - ReportException(e); + result = new StreamableLoadingResult<TAsset>(GetReportCategory(), e); } finally { FinalizeLoading(entity, intention, result, source, acquiredBudget); } } @@ -182,7 +179,7 @@ private void FinalizeLoading(EntityReference entity, TIntention intention, if (!exists) { - ReportHub.LogError(GetReportCategory(), $"Leak detected on loading {intention.ToString()} from {source}"); + ReportHub.LogError(GetReportData(), $"Leak detected on loading {intention.ToString()} from {source}"); // it could be already disposed of, but it's safe to call it again acquiredBudget?.Dispose(); @@ -213,7 +210,7 @@ private void ApplyLoadedResult(Entity entity, ref StreamableLoadingState state, { IncreaseRefCount(in intention, result.Value.Asset!); - ReportHub.Log(GetReportCategory(), $"{intention}'s successfully loaded from {source}"); + ReportHub.Log(GetReportData(), $"{intention}'s successfully loaded from {source}"); } } @@ -240,14 +237,6 @@ private void IncreaseRefCount(in TIntention intention, TAsset asset) /// </summary> protected abstract UniTask<StreamableLoadingResult<TAsset>> FlowInternalAsync(TIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct); - /// <summary> - /// Can't move it to another system as the update cycle is not synchronized with systems but based on UniTasks - /// </summary> - private void ReportException(Exception exception) - { - AssetsLoadingUtility.ReportException(GetReportCategory(), exception); - } - /// <summary> /// Part of the flow that can be reused by multiple intentions /// </summary> @@ -318,7 +307,7 @@ void TryRemoveOngoingRequest() private async UniTask<StreamableLoadingResult<TAsset>?> RepeatLoopAsync(TIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) { - StreamableLoadingResult<TAsset>? result = await intention.RepeatLoopAsync(acquiredBudget, partition, cachedInternalFlowDelegate, GetReportCategory(), ct); + StreamableLoadingResult<TAsset>? result = await intention.RepeatLoopAsync(acquiredBudget, partition, cachedInternalFlowDelegate, GetReportData(), ct); return result is { Succeeded: false } ? SetIrrecoverableFailure(intention, result.Value) : result; } diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/ReportStreamableLoadingErrorSystem.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/ReportStreamableLoadingErrorSystem.cs deleted file mode 100644 index 8954d73fa6..0000000000 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/ReportStreamableLoadingErrorSystem.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Arch.Core; -using DCL.Diagnostics; -using ECS.Abstract; -using ECS.StreamableLoading.Common.Components; -using UnityEngine; - -namespace ECS.StreamableLoading.Common.Systems -{ - /// <summary> - /// Reads promises and reports their exceptions. - /// <para>It's very important to update this system right after the system that creates <see cref="StreamableLoadingResult{TAsset}" /> as promises are consumed in a closest update cycle</para> - /// </summary> - public abstract class ReportStreamableLoadingErrorSystem<TIntention, TAsset> : BaseUnityLoopSystem - where TIntention: struct, IAssetIntention - { - private const LogType LOG_TYPE = LogType.Exception; - - private static readonly QueryDescription QUERY = new QueryDescription().WithAll<TIntention, StreamableLoadingResult<TAsset>>(); - - private readonly IReportsHandlingSettings settings; - - private TryReport tryReport; - - protected ReportStreamableLoadingErrorSystem(World world, IReportsHandlingSettings settings) : base(world) - { - this.settings = settings; - tryReport = new TryReport(GetReportCategory()); - } - - protected override void Update(float t) - { - // Skip the update entirely if the category is disabled - if (!settings.CategoryIsEnabled(GetReportCategory(), LOG_TYPE)) - return; - - World.InlineQuery<TryReport, StreamableLoadingResult<TAsset>>(in QUERY, ref tryReport); - } - - private readonly struct TryReport : IForEach<StreamableLoadingResult<TAsset>> - { - private readonly string category; - - public TryReport(string category) - { - this.category = category; - } - - public void Update(ref StreamableLoadingResult<TAsset> streamableLoadingResult) - { - if (!streamableLoadingResult.Succeeded) - AssetsLoadingUtility.ReportException(category, streamableLoadingResult.Exception); - } - } - } -} diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/ReportStreamableLoadingErrorSystem.cs.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/ReportStreamableLoadingErrorSystem.cs.meta deleted file mode 100644 index fcf7fd2346..0000000000 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Common/Systems/ReportStreamableLoadingErrorSystem.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: d6d7733e6b854c4dae955ebf1cf08fc7 -timeCreated: 1687779843 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/DeferredLoading/AssetsDeferredLoadingSystem.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/DeferredLoading/AssetsDeferredLoadingSystem.cs index eb10f8bc1c..4a385f5a14 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/DeferredLoading/AssetsDeferredLoadingSystem.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/DeferredLoading/AssetsDeferredLoadingSystem.cs @@ -3,7 +3,7 @@ using DCL.Optimization.PerformanceBudgeting; using ECS.StreamableLoading.AssetBundles; using ECS.StreamableLoading.AudioClips; -using ECS.StreamableLoading.NFTShapes; +using ECS.StreamableLoading.GLTF; using ECS.StreamableLoading.NFTShapes; using ECS.StreamableLoading.Textures; using UnityEngine; @@ -28,6 +28,7 @@ static AssetsDeferredLoadingSystem() COMPONENT_HANDLERS = new[] { CreateQuery<GetAssetBundleIntention, AssetBundleData>(), + CreateQuery<GetGLTFIntention, GLTFData>(), CreateQuery<GetTextureIntention, Texture2D>(), CreateQuery<GetNFTShapeIntention, Texture2D>(), CreateQuery<GetAudioClipIntention, AudioClip>(), diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF.meta new file mode 100644 index 0000000000..14b220ae47 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9edcd988ad384d4dbfd713e479a60caf +timeCreated: 1721070545 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GLTFData.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GLTFData.cs new file mode 100644 index 0000000000..7e08703ca7 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GLTFData.cs @@ -0,0 +1,22 @@ +using GLTFast; +using UnityEngine; + +namespace ECS.StreamableLoading.GLTF +{ + public class GLTFData : IAssetData + { + public readonly GltfImport gltfImportedData; + public readonly GameObject containerGameObject; + + public GLTFData(GltfImport gltfImportedData, GameObject containerGameObject) + { + this.gltfImportedData = gltfImportedData; + this.containerGameObject = containerGameObject; + } + + public void Dispose() + { + gltfImportedData.Dispose(); + } + } +} diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GLTFData.cs.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GLTFData.cs.meta new file mode 100644 index 0000000000..3970d83dc6 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GLTFData.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 83a5ab6842a245daa05cb98732020c16 +timeCreated: 1721074896 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GetGLTFIntention.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GetGLTFIntention.cs new file mode 100644 index 0000000000..2ced5b48b7 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GetGLTFIntention.cs @@ -0,0 +1,34 @@ +using CommunicationData.URLHelpers; +using ECS.StreamableLoading.Common.Components; +using System; +using System.Threading; + +namespace ECS.StreamableLoading.GLTF +{ + public struct GetGLTFIntention: ILoadingIntention, IEquatable<GetGLTFIntention> + { + public readonly string? Hash; + public readonly string? Name; // File path + + public CancellationTokenSource CancellationTokenSource => CommonArguments.CancellationTokenSource; + public CommonLoadingArguments CommonArguments { get; set; } + + private GetGLTFIntention( + string? name = null, + string? hash = null, + CancellationTokenSource? cancellationTokenSource = null) + { + Name = name; + Hash = hash; + + CommonArguments = new CommonLoadingArguments( + URLAddress.EMPTY, + cancellationTokenSource: cancellationTokenSource); + } + + public static GetGLTFIntention Create(string name, string hash) => new (name: name, hash: hash); + + public bool Equals(GetGLTFIntention other) => + StringComparer.OrdinalIgnoreCase.Equals(Hash, other.Hash) || Name == other.Name; + } +} diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GetGLTFIntention.cs.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GetGLTFIntention.cs.meta new file mode 100644 index 0000000000..5b7a32c500 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GetGLTFIntention.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 768316bdd65e4a8d97dc43cacc3ed5fb +timeCreated: 1721070569 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastDownloadProvider.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastDownloadProvider.cs new file mode 100644 index 0000000000..264e0c6b8e --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastDownloadProvider.cs @@ -0,0 +1,142 @@ +using Arch.Core; +using Cysharp.Threading.Tasks; +using ECS.Prioritization.Components; +using ECS.StreamableLoading.Common; +using ECS.StreamableLoading.Common.Components; +using ECS.StreamableLoading.Textures; +using GLTFast; +using GLTFast.Loading; +using SceneRunner.Scene; +using System; +using System.Threading; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.Networking; +using Promise = ECS.StreamableLoading.Common.AssetPromise<UnityEngine.Texture2D, ECS.StreamableLoading.Textures.GetTextureIntention>; + +namespace ECS.StreamableLoading.GLTF +{ + internal class GltFastDownloadProvider : IDownloadProvider, IDisposable + { + public string TargetGltfOriginalPath = string.Empty; + + private ISceneData sceneData; + private World world; + private IPartitionComponent partitionComponent; + private const int ATTEMPTS_COUNT = 6; + + public GltFastDownloadProvider(World world, ISceneData sceneData, IPartitionComponent partitionComponent) + { + this.world = world; + this.sceneData = sceneData; + this.partitionComponent = partitionComponent; + } + + public async Task<IDownload> RequestAsync(Uri uri) + { + // TODO: Replace for WebRequestController (Planned in PR #1670) + using (UnityWebRequest webRequest = new UnityWebRequest(uri)) + { + webRequest.downloadHandler = new DownloadHandlerBuffer(); + + try { await webRequest.SendWebRequest().WithCancellation(new CancellationToken()); } + catch { throw new Exception($"Error on GLTF download: {webRequest.downloadHandler.error}"); } + + return new GltfDownloadResult + { + Data = webRequest.downloadHandler.data, + Error = webRequest.downloadHandler.error, + Text = webRequest.downloadHandler.text, + Success = webRequest.result == UnityWebRequest.Result.Success, + }; + } + } + + public async Task<ITextureDownload> RequestTextureAsync(Uri uri, bool nonReadable, bool forceLinear) + { + string textureFileName = uri.OriginalString.Substring(uri.OriginalString.LastIndexOf('/')+1); + string textureOriginalPath = string.Concat(TargetGltfOriginalPath.Remove(TargetGltfOriginalPath.LastIndexOf('/') + 1), textureFileName); + + sceneData.SceneContent.TryGetContentUrl(textureOriginalPath, out var tryGetContentUrlResult); + + var texturePromise = Promise.Create(world, new GetTextureIntention + { + CommonArguments = new CommonLoadingArguments(tryGetContentUrlResult, attempts: ATTEMPTS_COUNT), + }, partitionComponent); + + // The textures fetching need to finish before the GLTF loading can continue its flow... + var promiseResult = await texturePromise.ToUniTaskAsync(world, cancellationToken: new CancellationToken()); + + if (promiseResult.Result is { Succeeded: false }) + throw new Exception($"Error on GLTF Texture download: {promiseResult.Result.Value.Exception!.Message}"); + + return new TextureDownloadResult(promiseResult.Result?.Asset) + { + Error = promiseResult.Result?.Exception?.Message, + Success = (bool)promiseResult.Result?.Succeeded, + }; + } + + public void Dispose() + { + } + } + + public struct GltfDownloadResult : IDownload + { + private const uint GLB_SIGNATURE = 0x46546c67; + + public bool Success { get; set; } + public string Error { get; set; } + public byte[] Data { get; set; } + public string Text { get; set; } + public bool? IsBinary + { + get { + if (Data == null) return false; + var gltfBinarySignature = BitConverter.ToUInt32(Data, 0); + return gltfBinarySignature == GLB_SIGNATURE; + } + } + + public void Dispose() + { + Data = null!; + } + } + + public struct TextureDownloadResult : ITextureDownload + { + public bool Success { get; set; } + public string? Error { get; set; } + public byte[] Data => Array.Empty<byte>(); + public string Text => string.Empty; + public bool? IsBinary => true; + public readonly IDisposableTexture Texture; + + public TextureDownloadResult(Texture2D? texture) + { + Texture = new DisposableTexture() { Texture = texture }; + Error = null!; + Success = false; + } + + public IDisposableTexture GetTexture(bool forceSampleLinear) => + Texture; + + public void Dispose() => Texture.Dispose(); + } + + public struct DisposableTexture : IDisposableTexture + { + public Texture2D? Texture { get; set; } + + public void Dispose() + { + // TODO: if we enable texture destruction on disposal, the external-fetched textures get destroyed before + // the GLTF finishes loading... investigate why... + // if (Texture != null) + // Object.Destroy(Texture); + } + } +} diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastDownloadProvider.cs.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastDownloadProvider.cs.meta new file mode 100644 index 0000000000..b3311e40b0 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastDownloadProvider.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cc4ab6113d1d4f6faea7030e8fa5951b +timeCreated: 1721137950 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastReportHubLogger.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastReportHubLogger.cs new file mode 100644 index 0000000000..0b4a3ac37c --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastReportHubLogger.cs @@ -0,0 +1,54 @@ +using DCL.Diagnostics; +using GLTFast.Logging; +using System.Diagnostics; + +namespace ECS.StreamableLoading.GLTF +{ + public class GltFastReportHubLogger : ICodeLogger + { + public LogCode LastErrorCode { get; private set; } + + public void Error(LogCode code, params string[] messages) + { + LastErrorCode = code; + ReportHub.LogError(ReportCategory.GLTF_CONTAINER, LogMessages.GetFullMessage(code, messages)); + } + + public void Warning(LogCode code, params string[] messages) + { + LogWarning(LogMessages.GetFullMessage(code, messages)); + } + + public void Info(LogCode code, params string[] messages) + { + LogVerbose(LogMessages.GetFullMessage(code, messages)); + } + + public void Error(string message) + { + ReportHub.LogError(ReportCategory.GLTF_CONTAINER, message); + } + + public void Warning(string message) + { + LogWarning(message); + } + + public void Info(string message) + { + LogVerbose(message); + } + + [Conditional("UNITY_EDITOR")] + private void LogWarning(string message) + { + ReportHub.LogWarning(ReportCategory.GLTF_CONTAINER, message); + } + + [Conditional("UNITY_EDITOR")] + private void LogVerbose(string message) + { + ReportHub.Log(ReportCategory.GLTF_CONTAINER, message); + } + } +} diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastReportHubLogger.cs.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastReportHubLogger.cs.meta new file mode 100644 index 0000000000..ce2aa3ae0d --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/GltFastReportHubLogger.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cde71025fc844152995a77fa0b935a7b +timeCreated: 1721137803 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/LoadGLTFSystem.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/LoadGLTFSystem.cs new file mode 100644 index 0000000000..23109a5abe --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/LoadGLTFSystem.cs @@ -0,0 +1,126 @@ +using Arch.Core; +using Arch.SystemGroups; +using Cysharp.Threading.Tasks; +using DCL.Diagnostics; +using DCL.Optimization.PerformanceBudgeting; +using ECS.Prioritization.Components; +using ECS.StreamableLoading.Cache; +using ECS.StreamableLoading.Common.Components; +using ECS.StreamableLoading.Common.Systems; +using GLTFast; +using SceneRunner.Scene; +using System; +using System.Threading; +using UnityEngine; + +namespace ECS.StreamableLoading.GLTF +{ + [UpdateInGroup(typeof(StreamableLoadingGroup))] + public partial class LoadGLTFSystem: LoadSystemBase<GLTFData, GetGLTFIntention> + { + private ISceneData sceneData; + private GltFastDownloadProvider gltfDownloadProvider; + private GltFastReportHubLogger gltfConsoleLogger = new GltFastReportHubLogger(); // TODO: Remove ??? + + internal LoadGLTFSystem( + World world, + IStreamableCache<GLTFData, GetGLTFIntention> cache, + ISceneData sceneData, + IPartitionComponent partitionComponent) : base(world, cache) + { + this.sceneData = sceneData; + gltfDownloadProvider = new GltFastDownloadProvider(World, sceneData, partitionComponent); + } + + // Might be used later + // private AnimationMethod GetAnimationMethod() + // { + // string sPlatform = PlatformUtils.GetPlatform(); + // BuildTarget bt = BuildTarget.StandaloneWindows64; // default + // + // switch (sPlatform) + // { + // case "_windows": + // { + // bt = BuildTarget.StandaloneWindows64; + // break; + // } + // case "_mac": + // { + // bt = BuildTarget.StandaloneOSX; + // break; + // } + // case "_linux": + // { + // bt = BuildTarget.StandaloneLinux64; + // break; + // } + // } + // + // return bt is BuildTarget.StandaloneWindows64 or BuildTarget.StandaloneOSX + // ? AnimationMethod.Mecanim + // : AnimationMethod.Legacy; + // } + + protected override async UniTask<StreamableLoadingResult<GLTFData>> FlowInternalAsync(GetGLTFIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct) + { + if (!sceneData.SceneContent.TryGetContentUrl(intention.Name!, out var finalDownloadUrl)) + return new StreamableLoadingResult<GLTFData>( + new ReportData(GetReportCategory()), + new Exception("The content to download couldn't be found")); + + gltfDownloadProvider.TargetGltfOriginalPath = intention.Name!; + var gltfImport = new GltfImport(downloadProvider: gltfDownloadProvider, logger: gltfConsoleLogger); + + var gltFastSettings = new ImportSettings + { + NodeNameMethod = NameImportMethod.OriginalUnique, + AnisotropicFilterLevel = 0, + GenerateMipMaps = false, + }; + + bool success = await gltfImport.Load(finalDownloadUrl, gltFastSettings, ct); + + // Release budget now to not hold it until dependencies are resolved to prevent a deadlock + acquiredBudget.Release(); + + if (success) + { + // We do the GameObject instantiation in this system since 'InstantiateMainSceneAsync()' is async. + var rootContainer = new GameObject(gltfImport.GetSceneName(0)); + + // Let the upper layer decide what to do with the root + rootContainer.SetActive(false); + + await InstantiateGltfAsync(gltfImport, rootContainer.transform); + + return new StreamableLoadingResult<GLTFData>(new GLTFData(gltfImport, rootContainer)); + } + + return new StreamableLoadingResult<GLTFData>( + new ReportData(GetReportCategory()), + new Exception("The content to download couldn't be found")); + } + + public async UniTask InstantiateGltfAsync(GltfImport gltfImport, Transform rootContainerTransform) + { + if (gltfImport.SceneCount > 1) + for (int i = 0; i < gltfImport.SceneCount; i++) + { + var targetTransform = rootContainerTransform; + + if (i != 0) + { + var go = new GameObject($"{rootContainerTransform.name}_{i}"); + Transform goTransform = go.transform; + goTransform.SetParent(rootContainerTransform, false); + targetTransform = goTransform; + } + + await gltfImport.InstantiateSceneAsync(targetTransform, i); + } + else + await gltfImport.InstantiateSceneAsync(rootContainerTransform); + } + } +} diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/LoadGLTFSystem.cs.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/LoadGLTFSystem.cs.meta new file mode 100644 index 0000000000..5cb4a6c440 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/GLTF/LoadGLTFSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 780fe439d271439e992facf3e6863318 +timeCreated: 1721074735 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/IAssetData.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/IAssetData.cs new file mode 100644 index 0000000000..824fded3ec --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/IAssetData.cs @@ -0,0 +1,9 @@ +using System; + +namespace ECS.StreamableLoading +{ + public interface IAssetData : IDisposable + { + void Dereference() { } + } +} diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/IAssetData.cs.meta b/Explorer/Assets/Scripts/ECS/StreamableLoading/IAssetData.cs.meta new file mode 100644 index 0000000000..43407b3bdd --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/IAssetData.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 43771e6b80664f62941fa6b6643c3175 +timeCreated: 1721408172 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/NFTShapes/LoadNFTShapeSystem.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/NFTShapes/LoadNFTShapeSystem.cs index af650b4d78..90ea07db39 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/NFTShapes/LoadNFTShapeSystem.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/NFTShapes/LoadNFTShapeSystem.cs @@ -36,7 +36,7 @@ protected override async UniTask<StreamableLoadingResult<Texture2D>> FlowInterna bool isOkSize = await webContentSizes.IsOkSizeAsync(imageUrl, ct); if (isOkSize == false) - return new StreamableLoadingResult<Texture2D>(new Exception("Image size is too big")); + return new StreamableLoadingResult<Texture2D>(GetReportCategory(), new Exception("Image size is too big")); // texture request // Attempts should be always 1 as there is a repeat loop in `LoadSystemBase` @@ -45,7 +45,7 @@ protected override async UniTask<StreamableLoadingResult<Texture2D>> FlowInterna new GetTextureArguments(false), new GetTextureWebRequest.CreateTextureOp(TextureWrapMode.Clamp, FilterMode.Bilinear), ct, - reportCategory: GetReportCategory() + GetReportData() ); return new StreamableLoadingResult<Texture2D>(result); @@ -53,7 +53,7 @@ protected override async UniTask<StreamableLoadingResult<Texture2D>> FlowInterna private async UniTask<string> ImageUrlAsync(CommonArguments commonArguments, CancellationToken ct) { - var infoRequest = webRequestController.GetAsync(commonArguments, ct, GetReportCategory()); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> infoRequest = webRequestController.GetAsync(commonArguments, ct, GetReportData()); var nft = await infoRequest.CreateFromJson<NftInfoDto>(WRJsonParser.Unity, WRThreadFlags.SwitchBackToMainThread); return nft.ImageUrl(); } diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Tests/StreamableLoading.Tests.asmdef b/Explorer/Assets/Scripts/ECS/StreamableLoading/Tests/StreamableLoading.Tests.asmdef index 0850251cbd..375ca45579 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Tests/StreamableLoading.Tests.asmdef +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/Tests/StreamableLoading.Tests.asmdef @@ -18,7 +18,9 @@ "GUID:5ab29fa8ae5769b49ab29e390caca7a4", "GUID:54660b0fae444b4cbfdafa9d68108f04", "GUID:0f4c0f120707fb74497f5d581b9858f8", - "GUID:91cf8206af184dac8e30eb46747e9939" + "GUID:91cf8206af184dac8e30eb46747e9939", + "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:27619889b8ba8c24980f49ee34dbb44a" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/Textures/LoadTextureSystem.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/Textures/LoadTextureSystem.cs index be3d1fa518..eabf21f22c 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/Textures/LoadTextureSystem.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/Textures/LoadTextureSystem.cs @@ -33,7 +33,7 @@ protected override async UniTask<StreamableLoadingResult<Texture2D>> FlowInterna new GetTextureArguments(intention.IsReadable), GetTextureWebRequest.CreateTexture(intention.WrapMode, intention.FilterMode), ct, - reportCategory: ReportCategory.TEXTURES); + GetReportData()); return new StreamableLoadingResult<Texture2D>(result); } diff --git a/Explorer/Assets/Scripts/ECS/TestSuite/ECS.TestSuite.asmdef b/Explorer/Assets/Scripts/ECS/TestSuite/ECS.TestSuite.asmdef index a1043c9f53..cafe601948 100644 --- a/Explorer/Assets/Scripts/ECS/TestSuite/ECS.TestSuite.asmdef +++ b/Explorer/Assets/Scripts/ECS/TestSuite/ECS.TestSuite.asmdef @@ -18,7 +18,8 @@ "GUID:5ab29fa8ae5769b49ab29e390caca7a4", "GUID:7f6c11dd1400cef4f838168f18ce244a", "GUID:3c7b57a14671040bd8c549056adc04f5", - "GUID:0f4c0f120707fb74497f5d581b9858f8" + "GUID:0f4c0f120707fb74497f5d581b9858f8", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [ "Editor" diff --git a/Explorer/Assets/Scripts/ECS/TestSuite/UnitySystemTestBase.cs b/Explorer/Assets/Scripts/ECS/TestSuite/UnitySystemTestBase.cs index ee3d1b2f32..3a22b8af21 100644 --- a/Explorer/Assets/Scripts/ECS/TestSuite/UnitySystemTestBase.cs +++ b/Explorer/Assets/Scripts/ECS/TestSuite/UnitySystemTestBase.cs @@ -1,19 +1,33 @@ using Arch.Core; +using DCL.Diagnostics; using DCL.ECSComponents; using DCL.SDKComponents.SceneUI.Components; using ECS.Abstract; using ECS.Unity.Transforms.Components; using NUnit.Framework; +using UnityEngine; using UnityEngine.UIElements; namespace ECS.TestSuite { public abstract class UnitySystemTestBase<TSystem> where TSystem: BaseUnityLoopSystem { - protected TSystem system; - private World cachedWorld; + protected TSystem? system; + private World? cachedWorld; - protected World world => cachedWorld ??= World.Create(); + protected World world + { + get + { + if (cachedWorld != null) + return cachedWorld; + + cachedWorld = World.Create(); + cachedWorld.Create(new SceneShortInfo(Vector2Int.zero, "TEST")); + + return cachedWorld; + } + } [TearDown] public void DestroyWorld() @@ -23,8 +37,8 @@ public void DestroyWorld() cachedWorld = null; } - protected TransformComponent AddTransformToEntity(in Entity entity, bool isDirty = false) => - EcsTestsUtils.AddTransformToEntity(world, entity, isDirty); + protected TransformComponent AddTransformToEntity(in Entity entity, bool isDirty = false, World world = null) => + EcsTestsUtils.AddTransformToEntity(world ?? this.world, entity, isDirty); protected UITransformComponent AddUITransformToEntity(in Entity entity, bool isDirty = false) { diff --git a/Explorer/Assets/Scripts/ECS/TestSuite/csc.rsp b/Explorer/Assets/Scripts/ECS/TestSuite/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/TestSuite/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/TestSuite/csc.rsp.meta b/Explorer/Assets/Scripts/ECS/TestSuite/csc.rsp.meta new file mode 100644 index 0000000000..691fc7c92a --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/TestSuite/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a462c0787d904ac6b97cb0e346a3db3d +timeCreated: 1724831196 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/Unity/ECS.Unity.asmdef b/Explorer/Assets/Scripts/ECS/Unity/ECS.Unity.asmdef index d688b04937..bef57bc18e 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/ECS.Unity.asmdef +++ b/Explorer/Assets/Scripts/ECS/Unity/ECS.Unity.asmdef @@ -30,7 +30,8 @@ "GUID:c80c82a8f4e04453b85fbab973d6774a", "GUID:d8b63aba1907145bea998dd612889d6b", "GUID:2665a8d13d1b3f18800f46e256720795", - "GUID:91cf8206af184dac8e30eb46747e9939" + "GUID:91cf8206af184dac8e30eb46747e9939", + "GUID:a42927d1d4a3b4cda9b076a7adecb9cc" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Components/GltfContainerAsset.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Components/GltfContainerAsset.cs index f494789999..d5103cd433 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Components/GltfContainerAsset.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Components/GltfContainerAsset.cs @@ -1,6 +1,6 @@ using DCL.Optimization.Pools; using DCL.Profiling; -using ECS.StreamableLoading.AssetBundles; +using ECS.StreamableLoading; using ECS.Unity.SceneBoundsChecker; using System; using System.Collections.Generic; @@ -53,13 +53,13 @@ public struct VisibleMeshCollider /// </summary> public List<SDKCollider>? DecodedVisibleSDKColliders; - private AssetBundleData assetBundleReference; + private IAssetData assetData; - private GltfContainerAsset(GameObject root, AssetBundleData assetBundleReference, List<SDKCollider> invisibleColliders, + private GltfContainerAsset(GameObject root, IAssetData assetData, List<SDKCollider> invisibleColliders, List<VisibleMeshCollider> visibleColliderMeshes, List<Renderer> renderers, List<Animation> animations, List<Animator> animators) { - this.assetBundleReference = assetBundleReference; + this.assetData = assetData; Root = root; InvisibleColliders = invisibleColliders; @@ -73,8 +73,9 @@ private GltfContainerAsset(GameObject root, AssetBundleData assetBundleReference public void Dispose() { - assetBundleReference.Dereference(); - assetBundleReference = null; + assetData.Dereference(); + assetData.Dispose(); + assetData = null; COLLIDERS_POOL.Release(InvisibleColliders); VISIBLE_MESH_COLLIDERS_POOL.Release(VisibleColliderMeshes); @@ -90,7 +91,7 @@ public void Dispose() ProfilingCounters.GltfContainerAssetsAmount.Value--; } - public static GltfContainerAsset Create(GameObject root, AssetBundleData assetBundleReference) => - new (root, assetBundleReference, COLLIDERS_POOL.Get(), VISIBLE_MESH_COLLIDERS_POOL.Get(), RENDERERS_POOL.Get(), ANIMATIONS_POOL.Get(), ANIMATORS_POOL.Get()); + public static GltfContainerAsset Create(GameObject root, IAssetData assetData) => + new (root, assetData, COLLIDERS_POOL.Get(), VISIBLE_MESH_COLLIDERS_POOL.Get(), RENDERERS_POOL.Get(), ANIMATIONS_POOL.Get(), ANIMATORS_POOL.Get()); } } diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromAssetBundleSystem.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromAssetBundleSystem.cs index b85b04def2..d4ec3af30d 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromAssetBundleSystem.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromAssetBundleSystem.cs @@ -57,7 +57,7 @@ private void ConvertFromAssetBundle(in Entity entity, ref GetGltfContainerAssetI if (!assetBundleResult.Succeeded) { // Just propagate an exception, we can't do anything - World.Add(entity, new StreamableLoadingResult<GltfContainerAsset>(CreateException(assetBundleResult.Exception))); + World.Add(entity, new StreamableLoadingResult<GltfContainerAsset>(GetReportCategory(), CreateException(assetBundleResult.Exception))); return; } @@ -88,14 +88,14 @@ private static GltfContainerAsset CreateGltfObject(AssetBundleData assetBundleDa } // Collect all Animations as they are used in Animation System (only for legacy support, as all of them will eventually be converted to Animators) - using PoolExtensions.Scope<List<Animation>> animationScope = GltfContainerAsset.ANIMATIONS_POOL.AutoScope(); + using (PoolExtensions.Scope<List<Animation>> animationScope = GltfContainerAsset.ANIMATIONS_POOL.AutoScope()) { instance.GetComponentsInChildren(true, animationScope.Value); result.Animations.AddRange(animationScope.Value); } // Collect all Animators as they are used in Animation System - using PoolExtensions.Scope<List<Animator>> animatorScope = GltfContainerAsset.ANIMATORS_POOL.AutoScope(); + using (PoolExtensions.Scope<List<Animator>> animatorScope = GltfContainerAsset.ANIMATORS_POOL.AutoScope()) { instance.GetComponentsInChildren(true, animatorScope.Value); result.Animators.AddRange(animatorScope.Value); @@ -116,6 +116,7 @@ private static GltfContainerAsset CreateGltfObject(AssetBundleData assetBundleDa if (go.GetComponent<Renderer>()) AddVisibleMeshCollider(result, go, meshFilter.sharedMesh); else + // Gather invisible colliders CreateAndAddMeshCollider(result.InvisibleColliders, go, meshFilter.sharedMesh); } @@ -139,6 +140,11 @@ private static GltfContainerAsset CreateGltfObject(AssetBundleData assetBundleDa return result; } + // If we update AddVisibleMeshCollider and/or CreateAndAddMeshCollider please check and update them in CreateGltfAssetFromRawGltfSystem.cs + // As a tech-debt we might want to move these functions elsewhere to avoid repetition, but for now it's acceptable since the other one is only for local development + +#region Helper Collider Methods + private static void AddVisibleMeshCollider(GltfContainerAsset result, GameObject go, Mesh mesh) { result.VisibleColliderMeshes.Add(new VisibleMeshCollider @@ -183,5 +189,6 @@ static bool IsNamedAsCollider(GameObject go) || go.transform.parent.name.Contains(COLLIDER_SUFFIX, IGNORE_CASE); } } +#endregion } } diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromRawGltfSystem.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromRawGltfSystem.cs new file mode 100644 index 0000000000..7e9a6a4638 --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromRawGltfSystem.cs @@ -0,0 +1,170 @@ +using Arch.Core; +using Arch.System; +using Arch.SystemGroups; +using DCL.Diagnostics; +using DCL.Optimization.PerformanceBudgeting; +using DCL.Optimization.Pools; +using ECS.Abstract; +using ECS.StreamableLoading; +using ECS.StreamableLoading.Common.Components; +using ECS.StreamableLoading.GLTF; +using ECS.Unity.GLTFContainer.Asset.Components; +using ECS.Unity.SceneBoundsChecker; +using System; +using System.Collections.Generic; +using UnityEngine; +using Utility; + +namespace ECS.Unity.GLTFContainer.Asset.Systems +{ + [UpdateInGroup(typeof(StreamableLoadingGroup))] + [LogCategory(ReportCategory.GLTF_CONTAINER)] + public partial class CreateGltfAssetFromRawGltfSystem : BaseUnityLoopSystem + { + private const string COLLIDER_SUFFIX = "_collider"; + private const StringComparison IGNORE_CASE = StringComparison.CurrentCultureIgnoreCase; + private readonly IPerformanceBudget instantiationFrameTimeBudget; + private readonly IPerformanceBudget memoryBudget; + + internal CreateGltfAssetFromRawGltfSystem(World world, IPerformanceBudget instantiationFrameTimeBudget, IPerformanceBudget memoryBudget) : base(world) + { + this.instantiationFrameTimeBudget = instantiationFrameTimeBudget; + this.memoryBudget = memoryBudget; + } + + protected override void Update(float t) + { + ConvertFromGLTFDataQuery(World); + } + + [Query] + [None(typeof(StreamableLoadingResult<GltfContainerAsset>))] + private void ConvertFromGLTFData(in Entity entity, + ref GetGltfContainerAssetIntention assetIntention, + ref StreamableLoadingResult<GLTFData> gltfDataResult) + { + if (!instantiationFrameTimeBudget.TrySpendBudget() || !memoryBudget.TrySpendBudget()) + return; + + if (assetIntention.CancellationTokenSource.IsCancellationRequested || gltfDataResult.Asset == null) + return; + + World.Add(entity, new StreamableLoadingResult<GltfContainerAsset>(CreateGltfObject(gltfDataResult.Asset))); + } + + private static GltfContainerAsset CreateGltfObject(GLTFData gltfData) + { + var result = GltfContainerAsset.Create(gltfData.containerGameObject, gltfData); + + using (PoolExtensions.Scope<List<Renderer>> instanceRenderers = GltfContainerAsset.RENDERERS_POOL.AutoScope()) + { + gltfData.containerGameObject.GetComponentsInChildren(true, instanceRenderers.Value); + result.Renderers.AddRange(instanceRenderers.Value); + } + + // Collect all Animations as they are used in Animation System (only for legacy support, as all of them will eventually be converted to Animators) + using (PoolExtensions.Scope<List<Animation>> animationScope = GltfContainerAsset.ANIMATIONS_POOL.AutoScope()) + { + gltfData.containerGameObject.GetComponentsInChildren(true, animationScope.Value); + result.Animations.AddRange(animationScope.Value); + } + + // Collect all Animators as they are used in Animation System + using (PoolExtensions.Scope<List<Animator>> animatorScope = GltfContainerAsset.ANIMATORS_POOL.AutoScope()) + { + gltfData.containerGameObject.GetComponentsInChildren(true, animatorScope.Value); + result.Animators.AddRange(animatorScope.Value); + } + + using (PoolExtensions.Scope<List<MeshFilter>> meshFilterScope = GltfContainerAsset.MESH_FILTERS_POOL.AutoScope()) + { + List<MeshFilter> list = meshFilterScope.Value; + gltfData.containerGameObject.GetComponentsInChildren(true, list); + + foreach (MeshFilter meshFilter in list) + { + GameObject go = meshFilter.gameObject; + + // This treatment mimics what's being done in the AB converter + if (meshFilter.name.Contains(COLLIDER_SUFFIX, IGNORE_CASE)) + { + MeshCollider newCollider = AddMeshCollider(meshFilter, go); + result.InvisibleColliders.Add(new SDKCollider(newCollider)); + } + else + { + // Note from Alejandro Alvarez Melucci <alejandro.alvarez@decentraland.org>: + // I'm not sure why on the AssetBundle flow there's this check, + // I introduced it here just in case it's needed. I already reached out to Nico Lorusso to investigate further + + // Consider it a visible collider when it has a renderer on it + if (go.GetComponent<Renderer>()) + AddVisibleMeshCollider(result.VisibleColliderMeshes, go, meshFilter.sharedMesh); + else + + // Gather invisible colliders + CreateAndAddMeshCollider(result.InvisibleColliders, go); + } + } + } + + // Collect colliders from skinned mesh renderers + using (PoolExtensions.Scope<List<SkinnedMeshRenderer>> instanceRenderers = GltfContainerAsset.SKINNED_RENDERERS_POOL.AutoScope()) + { + gltfData.containerGameObject.GetComponentsInChildren(true, instanceRenderers.Value); + + foreach (SkinnedMeshRenderer skinnedMeshRenderer in instanceRenderers.Value) + { + GameObject go = skinnedMeshRenderer.gameObject; + + // Always considered as visible collider + AddVisibleMeshCollider(result.VisibleColliderMeshes, go, skinnedMeshRenderer.sharedMesh); + } + } + + return result; + } + + + // If we update AddVisibleMeshCollider and/or CreateAndAddMeshCollider please check and update them in CreateGltfAssetFromAssetBundleSystem.cs + // As a tech-debt we might want to move these functions elsewhere to avoid repetition, but for now it's acceptable since this is only for local development + +#region Helper Collider Methods + private static void AddVisibleMeshCollider(List<GltfContainerAsset.VisibleMeshCollider> result, GameObject go, Mesh mesh) + { + result.Add(new GltfContainerAsset.VisibleMeshCollider + { + GameObject = go, + Mesh = mesh, + }); + } + + private static void CreateAndAddMeshCollider(List<SDKCollider> result, GameObject go) + { + // Asset Bundle converter creates Colliders during the processing in some cases + Collider collider = go.GetComponent<Collider>(); + + if (collider) + { + // Disable it as its activity controlled by another system based on PBGltfContainer component + collider.enabled = false; + + result.Add(new SDKCollider(collider)); + } + } + + private static MeshCollider AddMeshCollider(MeshFilter meshFilter, GameObject go) + { + Physics.BakeMesh(meshFilter.sharedMesh.GetInstanceID(), false); + MeshCollider newCollider = go.AddComponent<MeshCollider>(); + var renderer = go.GetComponent<MeshRenderer>(); + + if (renderer) + renderer.enabled = false; + + UnityObjectUtils.SafeDestroy(meshFilter); + return newCollider; + } +#endregion + } +} diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromRawGltfSystem.cs.meta b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromRawGltfSystem.cs.meta new file mode 100644 index 0000000000..ae49e1955b --- /dev/null +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/CreateGltfAssetFromRawGltfSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 082153a82b2a478694627186b4a8daae +timeCreated: 1721072734 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/PrepareGltfAssetLoadingSystem.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/PrepareGltfAssetLoadingSystem.cs index be253da949..6e278dd58b 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/PrepareGltfAssetLoadingSystem.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/PrepareGltfAssetLoadingSystem.cs @@ -5,8 +5,8 @@ using ECS.Abstract; using ECS.StreamableLoading; using ECS.StreamableLoading.AssetBundles; -using ECS.StreamableLoading.Cache; using ECS.StreamableLoading.Common.Components; +using ECS.StreamableLoading.GLTF; using ECS.Unity.GLTFContainer.Asset.Cache; using ECS.Unity.GLTFContainer.Asset.Components; using UnityEngine; @@ -23,10 +23,14 @@ namespace ECS.Unity.GLTFContainer.Asset.Systems public partial class PrepareGltfAssetLoadingSystem : BaseUnityLoopSystem { private readonly IGltfContainerAssetsCache cache; + private readonly bool localSceneDevelopment; + private readonly bool useRemoteAssetBundles; - internal PrepareGltfAssetLoadingSystem(World world, IGltfContainerAssetsCache cache) : base(world) + internal PrepareGltfAssetLoadingSystem(World world, IGltfContainerAssetsCache cache, bool localSceneDevelopment, bool useRemoteAssetBundles) : base(world) { this.cache = cache; + this.localSceneDevelopment = localSceneDevelopment; + this.useRemoteAssetBundles = useRemoteAssetBundles; } protected override void Update(float t) @@ -35,19 +39,22 @@ protected override void Update(float t) } [Query] - [None(typeof(StreamableLoadingResult<GltfContainerAsset>), typeof(GetAssetBundleIntention))] + [None(typeof(StreamableLoadingResult<GltfContainerAsset>), typeof(GetAssetBundleIntention), typeof(GetGLTFIntention))] private void Prepare(in Entity entity, ref GetGltfContainerAssetIntention intention) { // Try load from cache - if (cache.TryGet(intention.Hash, out GltfContainerAsset asset)) + if (cache.TryGet(intention.Hash, out GltfContainerAsset? asset)) { // construct the result immediately World.Add(entity, new StreamableLoadingResult<GltfContainerAsset>(asset)); return; } - // If not in cache, try load from asset bundle - World.Add(entity, GetAssetBundleIntention.Create(typeof(GameObject), $"{intention.Hash}{PlatformUtils.GetPlatform()}", intention.Name)); + if (localSceneDevelopment && !useRemoteAssetBundles) + World.Add(entity, GetGLTFIntention.Create(intention.Name, intention.Hash)); + else + // If not in cache, try load from asset bundle + World.Add(entity, GetAssetBundleIntention.Create(typeof(GameObject), $"{intention.Hash}{PlatformUtils.GetCurrentPlatform()}", intention.Name)); } } } diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/ReportGltfErrorsSystem.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/ReportGltfErrorsSystem.cs deleted file mode 100644 index 6bb4d82855..0000000000 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/ReportGltfErrorsSystem.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Arch.Core; -using Arch.SystemGroups; -using DCL.Diagnostics; -using ECS.StreamableLoading; -using ECS.StreamableLoading.Common.Systems; -using ECS.Unity.GLTFContainer.Asset.Components; - -namespace ECS.Unity.GLTFContainer.Asset.Systems -{ - [UpdateInGroup(typeof(StreamableLoadingGroup))] - [UpdateAfter(typeof(CreateGltfAssetFromAssetBundleSystem))] - [LogCategory(ReportCategory.GLTF_CONTAINER)] - public partial class ReportGltfErrorsSystem : ReportStreamableLoadingErrorSystem<GetGltfContainerAssetIntention, GltfContainerAsset> - { - internal ReportGltfErrorsSystem(World world, IReportsHandlingSettings settings) : base(world, settings) { } - } -} diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/ReportGltfErrorsSystem.cs.meta b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/ReportGltfErrorsSystem.cs.meta deleted file mode 100644 index 09c2ba21ec..0000000000 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Systems/ReportGltfErrorsSystem.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 0edbcb88e35445728a8d11671b034b94 -timeCreated: 1687786432 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/CreateGltfAssetFromAssetBundleSystemShould.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/CreateGltfAssetFromAssetBundleSystemShould.cs index 2d466f4ebf..2c04828b43 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/CreateGltfAssetFromAssetBundleSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/CreateGltfAssetFromAssetBundleSystemShould.cs @@ -11,6 +11,7 @@ using System; using System.Threading; using System.Threading.Tasks; +using UnityEngine.TestTools; namespace ECS.Unity.GLTFContainer.Asset.Tests { @@ -90,6 +91,8 @@ public async Task ResolveSceneWithColliders() [Test] public async Task DoNothingIfCancelled() { + LogAssert.ignoreFailingMessages = true; + StreamableLoadingResult<AssetBundleData> ab = await resources.LoadAssetBundle(GltfContainerTestResources.RENDERER_WITH_LEGACY_ANIM_HASH); var canceledSource = new CancellationTokenSource(); @@ -106,6 +109,8 @@ public async Task DoNothingIfCancelled() [Test] public async Task ResolveExceptionIfNoGameObjects() { + LogAssert.ignoreFailingMessages = true; + StreamableLoadingResult<AssetBundleData> ab = await resources.LoadAssetBundle(GltfContainerTestResources.NO_GAME_OBJECTS); Entity e = world.Create(new GetGltfContainerAssetIntention(GltfContainerTestResources.NO_GAME_OBJECTS, GltfContainerTestResources.NO_GAME_OBJECTS, new CancellationTokenSource()), ab); @@ -120,10 +125,12 @@ public async Task ResolveExceptionIfNoGameObjects() [Test] public void PropagateAssetBundleException() { + LogAssert.ignoreFailingMessages = true; + var exception = new ArgumentException(); Entity e = world.Create(new GetGltfContainerAssetIntention(GltfContainerTestResources.RENDERER_WITH_LEGACY_ANIM_NAME, GltfContainerTestResources.RENDERER_WITH_LEGACY_ANIM_HASH, new CancellationTokenSource()), - new StreamableLoadingResult<AssetBundleData>(exception)); + new StreamableLoadingResult<AssetBundleData>(ReportData.UNSPECIFIED, exception)); system.Update(0); diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/GltfContainerTestResources.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/GltfContainerTestResources.cs index 02f15205f8..077ce9fddd 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/GltfContainerTestResources.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/GltfContainerTestResources.cs @@ -13,18 +13,15 @@ public class GltfContainerTestResources { public const string ANIMATION = "shark"; - // 1 Collider, 196 Mesh Renderers, 0 Animations internal const string SCENE_WITH_COLLIDER_HASH = "bafybeigwxyfyyarzmvqz262vet65xa2ovetct6hcnm27uwge7yxpmhfvoe"; - - internal const string SCENE_WITH_COLLIDER_NAME = "SCENE_WITH_COLLIDER_NAME"; + internal const string SCENE_WITH_COLLIDER_NAME = "SCENE_WITH_COLLIDER_NAME"; // 1 Mesh Renderer // 1 Animation public const string RENDERER_WITH_LEGACY_ANIM_HASH = "bafkreif6qazpaiulr6kcqgukopkw6r26lawpnisdjdoddaqeujd5ytaezy"; - - public const string RENDERER_WITH_LEGACY_ANIM_NAME = "RENDERER_WITH_LEGACY_NAME"; + public const string RENDERER_WITH_LEGACY_ANIM_NAME = "RENDERER_WITH_LEGACY_NAME"; internal const string NO_GAME_OBJECTS = "bafkreid3xecd44iujaz5qekbdrt5orqdqj3wivg5zc5mya3zkorjhyrkda"; @@ -40,13 +37,10 @@ public async UniTask<StreamableLoadingResult<AssetBundleData>> LoadAssetBundle(s try { - return await LoadAssetBundleSystem.CreateAssetBundleDataAsync(assetBundle, null, typeof(GameObject), "",new AssetBundleLoadingMutex(), Array.Empty<AssetBundleData>(), + return await LoadAssetBundleSystem.CreateAssetBundleDataAsync(assetBundle, null, typeof(GameObject), "", new AssetBundleLoadingMutex(), Array.Empty<AssetBundleData>(), ReportCategory.ASSET_BUNDLES, "", "", CancellationToken.None); } - catch (Exception e) - { - return new StreamableLoadingResult<AssetBundleData>(e); - } + catch (Exception e) { return new StreamableLoadingResult<AssetBundleData>(ReportCategory.ASSET_BUNDLES, e); } } public void UnloadBundle() diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/PrepareGltfAssetLoadingSystemShould.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/PrepareGltfAssetLoadingSystemShould.cs index eff69a50e2..9f4adb0b82 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/PrepareGltfAssetLoadingSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Asset/Tests/PrepareGltfAssetLoadingSystemShould.cs @@ -1,6 +1,5 @@ using Arch.Core; using ECS.StreamableLoading.AssetBundles; -using ECS.StreamableLoading.Cache; using ECS.StreamableLoading.Common.Components; using ECS.TestSuite; using ECS.Unity.GLTFContainer.Asset.Cache; @@ -20,7 +19,7 @@ public class PrepareGltfAssetLoadingSystemShould : UnitySystemTestBase<PrepareGl [SetUp] public void SetUp() { - system = new PrepareGltfAssetLoadingSystem(world, cache = Substitute.For<IGltfContainerAssetsCache>()); + system = new PrepareGltfAssetLoadingSystem(world, cache = Substitute.For<IGltfContainerAssetsCache>(), false, false); } private IGltfContainerAssetsCache cache; @@ -35,13 +34,13 @@ public void CreateAssetBundleIntention() Assert.That(world.Has<StreamableLoadingResult<GltfContainerAsset>>(e), Is.False); Assert.That(world.TryGet(e, out GetAssetBundleIntention result), Is.True); - Assert.That(result.Hash, Is.EqualTo($"TEST_HASH{PlatformUtils.GetPlatform()}")); + Assert.That(result.Hash, Is.EqualTo($"TEST_HASH{PlatformUtils.GetCurrentPlatform()}")); } [Test] public void LoadFromCache() { - var asset = GltfContainerAsset.Create(new GameObject("GLTF_ROOT"), null); + var asset = GltfContainerAsset.Create(new GameObject("GLTF_ROOT"), assetData: null); cache.TryGet("TEST_HASH", out Arg.Any<GltfContainerAsset>()) .Returns(c => diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Components/GltfContainerComponent.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Components/GltfContainerComponent.cs index 48c75bb4ee..4ed0129a7d 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Components/GltfContainerComponent.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Components/GltfContainerComponent.cs @@ -1,3 +1,4 @@ +using DCL.Diagnostics; using System; using DCL.ECSComponents; using ECS.StreamableLoading.Common; @@ -26,20 +27,20 @@ public GltfContainerComponent(ColliderLayer visibleMeshesCollisionMask, Collider State = LoadingState.Unknown; } - public static GltfContainerComponent CreateFaulty(Exception exception) + public static GltfContainerComponent CreateFaulty(ReportData reportData, Exception exception) { GltfContainerComponent component = new GltfContainerComponent(); - component.SetFaulty(exception); + component.SetFaulty(reportData, exception); return component; } - public void SetFaulty(Exception exception) + public void SetFaulty(ReportData reportData, Exception exception) { State = LoadingState.FinishedWithError; + Promise = AssetPromise<GltfContainerAsset, GetGltfContainerAssetIntention>.CreateFinalized( default, - new StreamableLoadingResult<GltfContainerAsset>(exception)); + new StreamableLoadingResult<GltfContainerAsset>(reportData, exception)); } - } } diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Systems/LoadGltfContainerSystem.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Systems/LoadGltfContainerSystem.cs index 83d07c6681..3b39eab21c 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Systems/LoadGltfContainerSystem.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Systems/LoadGltfContainerSystem.cs @@ -12,7 +12,6 @@ using ECS.Unity.GLTFContainer.Components; using ECS.Unity.GLTFContainer.Components.Defaults; using System.Threading; -using DCL.Diagnostics; using DCL.Interaction.Utility; using SceneRunner.Scene; using UnityEngine.Assertions; @@ -50,22 +49,25 @@ protected override void Update(float t) private void StartLoading(in Entity entity, ref PBGltfContainer sdkComponent, ref PartitionComponent partitionComponent) { GltfContainerComponent component; + if (!sceneData.TryGetHash(sdkComponent.Src, out string hash)) { - var exception = new ArgumentException($"GLTF source {sdkComponent.Src} not found in the content"); - ReportHub.LogException(exception, GetReportCategory()); - component = GltfContainerComponent.CreateFaulty(exception); + component = GltfContainerComponent.CreateFaulty( + GetReportData(), + new ArgumentException($"GLTF source {sdkComponent.Src} not found in the content") + ); + World.Add(entity, component); } else { // It's not the best idea to pass Transform directly but we rely on cancellation source to cancel if the entity dies - var promise = Promise.Create(World, new GetGltfContainerAssetIntention(sdkComponent.Src, hash ,new CancellationTokenSource()), partitionComponent); + var promise = Promise.Create(World, new GetGltfContainerAssetIntention(sdkComponent.Src, hash, new CancellationTokenSource()), partitionComponent); component = new GltfContainerComponent(sdkComponent.GetVisibleMeshesCollisionMask(), sdkComponent.GetInvisibleMeshesCollisionMask(), promise); component.State = LoadingState.Loading; World.Add(entity, component); - } + eventsBuffer.Add(entity, component); } @@ -81,17 +83,17 @@ private void ReconfigureGltfContainer(Entity entity, ref GltfContainerComponent // The source is changed, should start downloading over again case LoadingState.Unknown: if (!sceneData.TryGetHash(sdkComponent.Src, out string hash)) - { - var exception = new ArgumentException($"GLTF source {sdkComponent.Src} not found in the content"); - ReportHub.LogException(exception, GetReportCategory()); - component.SetFaulty(exception); - } + component.SetFaulty( + GetReportData(), + new ArgumentException($"GLTF source {sdkComponent.Src} not found in the content") + ); else { - var promise = Promise.Create(World, new GetGltfContainerAssetIntention(sdkComponent.Src,hash, new CancellationTokenSource()), partitionComponent); + var promise = Promise.Create(World, new GetGltfContainerAssetIntention(sdkComponent.Src, hash, new CancellationTokenSource()), partitionComponent); component.Promise = promise; component.State = LoadingState.Loading; } + eventsBuffer.Add(entity, component); return; @@ -127,6 +129,5 @@ private void ReconfigureGltfContainer(Entity entity, ref GltfContainerComponent return; } } - } } diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/CleanUpGltfContainerSystemShould.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/CleanUpGltfContainerSystemShould.cs index 98d853d39b..c8b8a9147d 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/CleanUpGltfContainerSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/CleanUpGltfContainerSystemShould.cs @@ -37,7 +37,7 @@ public void Release() { var c = new GltfContainerComponent(); c.Promise = AssetPromise<GltfContainerAsset, GetGltfContainerAssetIntention>.Create(world, new GetGltfContainerAssetIntention("1", "1_Hash", new CancellationTokenSource()), PartitionComponent.TOP_PRIORITY); - var asset = GltfContainerAsset.Create(new GameObject(), null); + var asset = GltfContainerAsset.Create(new GameObject(), assetData: null); asset.DecodedVisibleSDKColliders = new List<SDKCollider> { new (), new () }; world.Add(c.Promise.Entity, new StreamableLoadingResult<GltfContainerAsset>(asset)); diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/FinalizeGltfContainerLoadingSystemShould.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/FinalizeGltfContainerLoadingSystemShould.cs index 52879b2a41..7735628e44 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/FinalizeGltfContainerLoadingSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/FinalizeGltfContainerLoadingSystemShould.cs @@ -2,6 +2,7 @@ using CRDT; using CrdtEcsBridge.Components.Special; using CrdtEcsBridge.Physics; +using DCL.Diagnostics; using DCL.ECSComponents; using DCL.Interaction.Utility; using DCL.Optimization.PerformanceBudgeting; @@ -45,9 +46,11 @@ public void SetUp() releasablePerformanceBudget.TrySpendBudget().Returns(true); ISceneData sceneData = Substitute.For<ISceneData>(); sceneData.Geometry.Returns(ParcelMathHelper.UNDEFINED_SCENE_GEOMETRY); + system = new FinalizeGltfContainerLoadingSystem( world, world.Reference(sceneRoot), releasablePerformanceBudget, NullEntityCollidersSceneCache.INSTANCE, sceneData, eventBuffer = new EntityEventBuffer<GltfContainerComponent>(1)); + IReleasablePerformanceBudget budget = Substitute.For<IReleasablePerformanceBudget>(); budget.TrySpendBudget().Returns(true); createGltfAssetFromAssetBundleSystem = new CreateGltfAssetFromAssetBundleSystem(world, budget, budget); @@ -71,13 +74,15 @@ private async Task InstantiateAssetBundle(string hash, Entity promiseEntity) [Test] public void FinalizeWithError() { + LogAssert.ignoreFailingMessages = true; + var component = new GltfContainerComponent(ColliderLayer.ClPhysics, ColliderLayer.ClPointer, AssetPromise<GltfContainerAsset, GetGltfContainerAssetIntention>.Create(world, new GetGltfContainerAssetIntention(), PartitionComponent.TOP_PRIORITY)); component.State = LoadingState.Loading; Entity e = world.Create(component, new CRDTEntity(100), new TransformComponent(), new PBGltfContainer()); - world.Add(component.Promise.Entity, new StreamableLoadingResult<GltfContainerAsset>(new Exception())); + world.Add(component.Promise.Entity, new StreamableLoadingResult<GltfContainerAsset>(ReportData.UNSPECIFIED, new Exception())); LogAssert.ignoreFailingMessages = true; @@ -106,6 +111,7 @@ public async Task FinalizeWithSuccess() component = world.Get<GltfContainerComponent>(e); Assert.That(component.State, Is.EqualTo(LoadingState.Finished)); + // Check events buffer Assert.That(eventBuffer.Relations, Contains.Item(new EntityRelation<GltfContainerComponent>(e, component))); @@ -141,7 +147,7 @@ public async Task EnableInvisibleColliders() { var component = new GltfContainerComponent(ColliderLayer.ClNone, ColliderLayer.ClPointer, AssetPromise<GltfContainerAsset, GetGltfContainerAssetIntention>.Create( - world, new GetGltfContainerAssetIntention(GltfContainerTestResources.SCENE_WITH_COLLIDER_NAME, GltfContainerTestResources.SCENE_WITH_COLLIDER_HASH,new CancellationTokenSource()), PartitionComponent.TOP_PRIORITY)); + world, new GetGltfContainerAssetIntention(GltfContainerTestResources.SCENE_WITH_COLLIDER_NAME, GltfContainerTestResources.SCENE_WITH_COLLIDER_HASH, new CancellationTokenSource()), PartitionComponent.TOP_PRIORITY)); component.State = LoadingState.Loading; diff --git a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/ResetGltfContainerSystemShould.cs b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/ResetGltfContainerSystemShould.cs index 2d5bf26f76..7633e369e6 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/ResetGltfContainerSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/GLTFContainer/Tests/ResetGltfContainerSystemShould.cs @@ -45,7 +45,7 @@ public void InvalidatePromiseIfSourceChanged() var sdkComponent = new PBGltfContainer { IsDirty = true, Src = "2" }; var c = new GltfContainerComponent(); c.Promise = AssetPromise<GltfContainerAsset, GetGltfContainerAssetIntention>.Create(world, new GetGltfContainerAssetIntention("1","1_Hash", new CancellationTokenSource()), PartitionComponent.TOP_PRIORITY); - var asset = GltfContainerAsset.Create(new GameObject(), null); + var asset = GltfContainerAsset.Create(new GameObject(), assetData: null); asset.DecodedVisibleSDKColliders = new List<SDKCollider> { new () }; world.Add(c.Promise.Entity, new StreamableLoadingResult<GltfContainerAsset>(asset)); c.State = LoadingState.Finished; @@ -69,7 +69,7 @@ public void ReleaseIfComponentRemoved() var c = new GltfContainerComponent(); c.Promise = AssetPromise<GltfContainerAsset, GetGltfContainerAssetIntention>.Create(world, new GetGltfContainerAssetIntention("1","1_Hash", new CancellationTokenSource()), PartitionComponent.TOP_PRIORITY); - var asset = GltfContainerAsset.Create(new GameObject(), null); + var asset = GltfContainerAsset.Create(new GameObject(), assetData: null); asset.DecodedVisibleSDKColliders = new List<SDKCollider> { new () }; world.Add(c.Promise.Entity, new StreamableLoadingResult<GltfContainerAsset>(asset)); diff --git a/Explorer/Assets/Scripts/ECS/Unity/Materials/Systems/StartMaterialsLoadingSystem.cs b/Explorer/Assets/Scripts/ECS/Unity/Materials/Systems/StartMaterialsLoadingSystem.cs index 87022198b8..56b971f101 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/Materials/Systems/StartMaterialsLoadingSystem.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/Materials/Systems/StartMaterialsLoadingSystem.cs @@ -205,7 +205,7 @@ private bool TryCreateGetTexturePromise(Entity entity, private StreamableLoadingResult<Texture2D>? GetOrAddVideoTextureResult(in TextureComponent textureComponent, Entity materialEntity) => textureComponent.TryAddConsumer(entitiesMap, materialEntity, videoTexturesPool, World, out Texture2D? tex) ? new StreamableLoadingResult<Texture2D>(tex!) - : new StreamableLoadingResult<Texture2D>(CreateException(new EcsEntityNotFoundException(textureComponent.VideoPlayerEntity, $"Entity {textureComponent.VideoPlayerEntity} not found!. VideoTexture will not be created."))); + : new StreamableLoadingResult<Texture2D>(GetReportCategory(), CreateException(new EcsEntityNotFoundException(textureComponent.VideoPlayerEntity, $"Entity {textureComponent.VideoPlayerEntity} not found!. VideoTexture will not be created."))); private bool ResolveTexturesEquality(Entity entity, in TextureComponent? oldTextureComponent, in TextureComponent textureComponent) { diff --git a/Explorer/Assets/Scripts/ECS/Unity/Transforms/Systems/ParentingTransformSystem.cs b/Explorer/Assets/Scripts/ECS/Unity/Transforms/Systems/ParentingTransformSystem.cs index 8bdebafce2..2d2944b629 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/Transforms/Systems/ParentingTransformSystem.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/Transforms/Systems/ParentingTransformSystem.cs @@ -22,12 +22,10 @@ public partial class ParentingTransformSystem : BaseUnityLoopSystem { private readonly Entity sceneRoot; private readonly IReadOnlyDictionary<CRDTEntity, Entity> entitiesMap; - private readonly SceneShortInfo sceneShortInfo; - public ParentingTransformSystem(World world, IReadOnlyDictionary<CRDTEntity, Entity> entitiesMap, Entity sceneRoot, SceneShortInfo sceneShortInfo) : base(world) + public ParentingTransformSystem(World world, IReadOnlyDictionary<CRDTEntity, Entity> entitiesMap, Entity sceneRoot) : base(world) { this.sceneRoot = sceneRoot; - this.sceneShortInfo = sceneShortInfo; this.entitiesMap = entitiesMap; } @@ -46,7 +44,7 @@ private void DereferenceParentingOfDeletedEntity(in Entity entity, ref Transform if (exists && parentTransform.Children.Remove(World.Reference(entity)) == false) ReportHub.LogError( - GetReportCategory(), + GetReportData(), $"Entity {entity} is not a child of its parent {transformComponentToBeDeleted.Parent}" ); } @@ -101,7 +99,7 @@ private void SetNewChild(ref TransformComponent childComponent, EntityReference if (!World.IsAlive(parentEntity)) { - ReportHub.LogError(new ReportData(GetReportCategory(), sceneShortInfo: sceneShortInfo), $"Trying to parent entity {childEntityReference.Entity} ({childCRDTEntity}) to a dead entity parent"); + ReportHub.LogError(GetReportData(), $"Trying to parent entity {childEntityReference.Entity} ({childCRDTEntity}) to a dead entity parent"); return; } @@ -109,7 +107,7 @@ private void SetNewChild(ref TransformComponent childComponent, EntityReference if (!success) { - ReportHub.LogError(new ReportData(GetReportCategory(), sceneShortInfo: sceneShortInfo), $"Trying to parent entity {childEntityReference.Entity} ({childCRDTEntity}) to parent {parentEntity} ({parentId}) that doesn't have a TransformComponent"); + ReportHub.LogError(GetReportData(), $"Trying to parent entity {childEntityReference.Entity} ({childCRDTEntity}) to parent {parentEntity} ({parentId}) that doesn't have a TransformComponent"); return; } diff --git a/Explorer/Assets/Scripts/ECS/Unity/Transforms/Systems/SyncGlobalTransformSystem.cs b/Explorer/Assets/Scripts/ECS/Unity/Transforms/Systems/SyncGlobalTransformSystem.cs index f0bc36ac3c..2d25615a23 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/Transforms/Systems/SyncGlobalTransformSystem.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/Transforms/Systems/SyncGlobalTransformSystem.cs @@ -1,9 +1,5 @@ using Arch.Core; -using Arch.System; using Arch.SystemGroups; -using Arch.SystemGroups.Throttling; -using DCL.Character; -using DCL.Character.Components; using DCL.CharacterCamera; using ECS.Abstract; using ECS.Groups; diff --git a/Explorer/Assets/Scripts/ECS/Unity/Transforms/Tests/ParentingTransformSystemShould.cs b/Explorer/Assets/Scripts/ECS/Unity/Transforms/Tests/ParentingTransformSystemShould.cs index 38477490a9..d98d8b9e63 100644 --- a/Explorer/Assets/Scripts/ECS/Unity/Transforms/Tests/ParentingTransformSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/Unity/Transforms/Tests/ParentingTransformSystemShould.cs @@ -49,7 +49,7 @@ public void SetUp() { childCRDTEntity, childEntity }, }; - system = new ParentingTransformSystem(world, crdtToEntityDict, world.Reference(rootEntity), new SceneShortInfo(Vector2Int.zero, "TEST")); + system = new ParentingTransformSystem(world, crdtToEntityDict, world.Reference(rootEntity)); } private SDKTransform parentSDKTransform; diff --git a/Explorer/Assets/Scripts/Global/AppArgs/ApplicationParametersParser.cs b/Explorer/Assets/Scripts/Global/AppArgs/ApplicationParametersParser.cs index d4a2248a5c..049b1a2644 100644 --- a/Explorer/Assets/Scripts/Global/AppArgs/ApplicationParametersParser.cs +++ b/Explorer/Assets/Scripts/Global/AppArgs/ApplicationParametersParser.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text.RegularExpressions; @@ -93,9 +92,17 @@ private void ProcessDeepLinkParameters(string deepLinkString) appParameters[uriQueryKey] = uriQuery.Get(uriQueryKey); } - // Patch for WinOS sometimes affecting the 'realm' parameter in deep links putting a '/' at the end - if (appParameters.TryGetValue(REALM_PARAM, out string? realmParamValue) && realmParamValue.EndsWith('/')) - appParameters[REALM_PARAM] = realmParamValue.Remove(realmParamValue.Length - 1); + if (appParameters.TryGetValue(REALM_PARAM, out string? realmParamValue)) + { + // Patch for WinOS sometimes affecting the 'realm' parameter in deep links putting a '/' at the end + if (realmParamValue.EndsWith('/')) + realmParamValue = realmParamValue.Remove(realmParamValue.Length - 1); + + // Patch for MacOS removing the ':' from the realm parameter protocol + realmParamValue = Regex.Replace(realmParamValue, @"(https?)//(.*?)$", @"$1://$2"); + + appParameters[REALM_PARAM] = realmParamValue; + } } } } diff --git a/Explorer/Assets/Scripts/Global/ComponentsContainer.cs b/Explorer/Assets/Scripts/Global/ComponentsContainer.cs index 186b3f3a5f..3c69ac9704 100644 --- a/Explorer/Assets/Scripts/Global/ComponentsContainer.cs +++ b/Explorer/Assets/Scripts/Global/ComponentsContainer.cs @@ -114,7 +114,7 @@ public static ComponentsContainer Create() .Add(SDKComponentBuilder<PBBillboard>.Create(ComponentID.BILLBOARD).AsProtobufComponent()) .Add(SDKComponentBuilder<PBEngineInfo>.Create(ComponentID.ENGINE_INFO).AsProtobufResult()) .Add(SDKComponentBuilder<PBVisibilityComponent>.Create(ComponentID.VISIBILITY_COMPONENT).AsProtobufComponent()) - .Add(SDKComponentBuilder<PBGltfContainerLoadingState>.Create(ComponentID.GLTF_CONTAINER_LOADING_STATE).AsProtobufComponent()) + .Add(SDKComponentBuilder<PBGltfContainerLoadingState>.Create(ComponentID.GLTF_CONTAINER_LOADING_STATE).AsProtobufResult()) .Add(SDKComponentBuilder<PBAvatarShape>.Create(ComponentID.AVATAR_SHAPE).AsProtobufComponent()) .Add(SDKComponentBuilder<PBAudioSource>.Create(ComponentID.AUDIO_SOURCE).AsProtobufComponent()) .Add(SDKComponentBuilder<PBAudioStream>.Create(ComponentID.AUDIO_STREAM).AsProtobufComponent()) @@ -130,7 +130,10 @@ public static ComponentsContainer Create() .Add(SDKComponentBuilder<PBAvatarEquippedData>.Create(ComponentID.AVATAR_EQUIPPED_DATA).AsProtobufComponent()) .Add(SDKComponentBuilder<PBAvatarEmoteCommand>.Create(ComponentID.AVATAR_EMOTE_COMMAND).AsProtobufComponent()) .Add(SDKComponentBuilder<PBRealmInfo>.Create(ComponentID.REALM_INFO).AsProtobufResult()) - .Add(SDKComponentBuilder<PBMapPin>.Create(ComponentID.MAP_PIN).AsProtobufComponent()); + .Add(SDKComponentBuilder<PBMapPin>.Create(ComponentID.MAP_PIN).AsProtobufComponent()) + .Add(SDKComponentBuilder<PBInputModifier>.Create(ComponentID.INPUT_MODIFIER).AsProtobufComponent()) + .Add(SDKComponentBuilder<PBMainCamera>.Create(ComponentID.MAIN_CAMERA).AsProtobufComponent()) + .Add(SDKComponentBuilder<PBVirtualCamera>.Create(ComponentID.VIRTUAL_CAMERA).AsProtobufComponent()); Transform rootContainer = new GameObject("ROOT_POOL_CONTAINER").transform; diff --git a/Explorer/Assets/Scripts/Global/Dynamic/BootstrapAnalyticsDecorator.cs b/Explorer/Assets/Scripts/Global/Dynamic/BootstrapAnalyticsDecorator.cs index 885c46ddd2..0574e7589d 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/BootstrapAnalyticsDecorator.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/BootstrapAnalyticsDecorator.cs @@ -44,9 +44,9 @@ public void PreInitializeSetup(UIDocument cursorRoot, UIDocument debugUiRoot, IS core.PreInitializeSetup(cursorRoot, debugUiRoot, splashScreen, ct); } - public async UniTask<(StaticContainer?, bool)> LoadStaticContainerAsync(BootstrapContainer bootstrapContainer, PluginSettingsContainer globalPluginSettingsContainer, DebugViewsCatalog debugViewsCatalog, CancellationToken ct) + public async UniTask<(StaticContainer?, bool)> LoadStaticContainerAsync(BootstrapContainer bootstrapContainer, PluginSettingsContainer globalPluginSettingsContainer, DebugViewsCatalog debugViewsCatalog, Entity playerEntity, CancellationToken ct) { - (StaticContainer? container, bool isSuccess) result = await core.LoadStaticContainerAsync(bootstrapContainer, globalPluginSettingsContainer, debugViewsCatalog, ct); + (StaticContainer? container, bool isSuccess) result = await core.LoadStaticContainerAsync(bootstrapContainer, globalPluginSettingsContainer, debugViewsCatalog, playerEntity, ct); analytics.SetCommonParam(result.container!.RealmData, bootstrapContainer.IdentityCache, result.container.CharacterContainer.Transform); @@ -90,8 +90,8 @@ public UniTask InitializeFeatureFlagsAsync(IWeb3Identity? identity, IDecentralan return result; } - public Entity CreatePlayerEntity(StaticContainer staticContainer) => - core.CreatePlayerEntity(staticContainer); + public void InitializePlayerEntity(StaticContainer staticContainer, Entity playerEntity) => + core.InitializePlayerEntity(staticContainer, playerEntity); public async UniTask<bool> InitializePluginsAsync(StaticContainer staticContainer, DynamicWorldContainer dynamicWorldContainer, PluginSettingsContainer scenePluginSettingsContainer, PluginSettingsContainer globalPluginSettingsContainer, CancellationToken ct) { diff --git a/Explorer/Assets/Scripts/Global/Dynamic/BootstrapContainer.cs b/Explorer/Assets/Scripts/Global/Dynamic/BootstrapContainer.cs index e62528927a..25de3c21cf 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/BootstrapContainer.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/BootstrapContainer.cs @@ -4,6 +4,7 @@ using DCL.Browser; using DCL.Browser.DecentralandUrls; using DCL.Diagnostics; +using DCL.Diagnostics.Sentry; using DCL.Multiplayer.Connections.DecentralandUrls; using DCL.PerformanceAndDiagnostics.Analytics; using DCL.PluginSystem; @@ -12,8 +13,10 @@ using DCL.Web3.Accounts.Factory; using DCL.Web3.Authenticators; using DCL.Web3.Identities; +using ECS.SceneLifeCycle.Realm; using Global.AppArgs; using Segment.Analytics; +using Sentry; using System; using System.Collections.Generic; using System.Threading; @@ -25,9 +28,9 @@ namespace Global.Dynamic public class BootstrapContainer : DCLGlobalContainer<BootstrapSettings> { private ProvidedAsset<ReportsHandlingSettings> reportHandlingSettings; - private DiagnosticsContainer? diagnosticsContainer; private bool enableAnalytics; + public DiagnosticsContainer DiagnosticsContainer { get; private set; } public IDecentralandUrlsSource DecentralandUrlsSource { get; private set; } public IWebBrowser WebBrowser { get; private set; } public IWeb3AccountFactory Web3AccountFactory { get; private set; } @@ -40,12 +43,14 @@ public class BootstrapContainer : DCLGlobalContainer<BootstrapSettings> public IDebugSettings DebugSettings { get; private set; } public IReportsHandlingSettings ReportHandlingSettings => reportHandlingSettings.Value; public IAppArgs ApplicationParametersParser { get; private set; } + public bool LocalSceneDevelopment { get; private set; } + public bool UseRemoteAssetBundles { get; private set; } public override void Dispose() { base.Dispose(); - diagnosticsContainer?.Dispose(); + DiagnosticsContainer?.Dispose(); reportHandlingSettings.Dispose(); Web3Authenticator?.Dispose(); VerifiedEthereumApi?.Dispose(); @@ -71,8 +76,10 @@ public static async UniTask<BootstrapContainer> CreateAsync( AssetsProvisioner = new AddressablesProvisioner(), DecentralandUrlsSource = decentralandUrlsSource, WebBrowser = browser, + LocalSceneDevelopment = realmLaunchSettings.IsLocalSceneDevelopmentRealm || realmLaunchSettings.GetStartingRealm(decentralandUrlsSource) == IRealmNavigator.LOCALHOST, + UseRemoteAssetBundles = realmLaunchSettings.useRemoteAssetsBundles, ApplicationParametersParser = applicationParametersParser, - DebugSettings = debugSettings + DebugSettings = debugSettings, }; await bootstrapContainer.InitializeContainerAsync<BootstrapContainer, BootstrapSettings>(settingsContainer, ct, async container => @@ -81,9 +88,17 @@ await bootstrapContainer.InitializeContainerAsync<BootstrapContainer, BootstrapS (container.Bootstrap, container.Analytics) = await CreateBootstrapperAsync(debugSettings, applicationParametersParser, container, container.settings, realmLaunchSettings, world, ct); (container.IdentityCache, container.VerifiedEthereumApi, container.Web3Authenticator) = CreateWeb3Dependencies(sceneLoaderSettings, web3AccountFactory, browser, container, decentralandUrlsSource); - container.diagnosticsContainer = container.enableAnalytics + container.DiagnosticsContainer = container.enableAnalytics ? DiagnosticsContainer.Create(container.ReportHandlingSettings, realmLaunchSettings.IsLocalSceneDevelopmentRealm, (ReportHandler.DebugLog, new CriticalLogsAnalyticsHandler(container.Analytics))) : DiagnosticsContainer.Create(container.ReportHandlingSettings); + + container.DiagnosticsContainer.AddSentryScopeConfigurator(AddIdentityToSentryScope); + + void AddIdentityToSentryScope(Scope scope) + { + if (container.IdentityCache.Identity != null) + container.DiagnosticsContainer.Sentry!.AddIdentityToScope(scope, container.IdentityCache.Identity.Address); + } }); return bootstrapContainer; diff --git a/Explorer/Assets/Scripts/Global/Dynamic/Bootstraper.cs b/Explorer/Assets/Scripts/Global/Dynamic/Bootstraper.cs index 1fbcdb430f..722445dd66 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/Bootstraper.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/Bootstraper.cs @@ -16,6 +16,7 @@ using DCL.Web3.Identities; using Global.AppArgs; using MVC; +using PortableExperiences.Controller; using SceneRunner.Debugging; using System; using System.Threading; @@ -70,9 +71,9 @@ public void PreInitializeSetup(UIDocument cursorRoot, DotNetLoggingPlugin.Initialize(); } - public async UniTask<(StaticContainer?, bool)> LoadStaticContainerAsync(BootstrapContainer bootstrapContainer, PluginSettingsContainer globalPluginSettingsContainer, DebugViewsCatalog debugViewsCatalog, CancellationToken ct) => + public async UniTask<(StaticContainer?, bool)> LoadStaticContainerAsync(BootstrapContainer bootstrapContainer, PluginSettingsContainer globalPluginSettingsContainer, DebugViewsCatalog debugViewsCatalog, Entity playerEntity, CancellationToken ct) => await StaticContainer.CreateAsync(bootstrapContainer.DecentralandUrlsSource, bootstrapContainer.AssetsProvisioner, bootstrapContainer.ReportHandlingSettings, appArgs, debugViewsCatalog, globalPluginSettingsContainer, - bootstrapContainer.IdentityCache, bootstrapContainer.VerifiedEthereumApi, world, ct); + bootstrapContainer.DiagnosticsContainer, bootstrapContainer.IdentityCache, bootstrapContainer.VerifiedEthereumApi, bootstrapContainer.LocalSceneDevelopment, bootstrapContainer.UseRemoteAssetBundles, world, playerEntity, ct); public async UniTask<(DynamicWorldContainer?, bool)> LoadDynamicWorldContainerAsync( BootstrapContainer bootstrapContainer, @@ -121,6 +122,7 @@ CancellationToken ct AppParameters = appArgs, }, backgroundMusic, + staticContainer.PortableExperiencesController, world, playerEntity, ct); @@ -181,8 +183,10 @@ Entity playerEntity return globalWorld; } - public Entity CreatePlayerEntity(StaticContainer staticContainer) => - staticContainer.CharacterContainer.CreatePlayerEntity(world); + public void InitializePlayerEntity(StaticContainer staticContainer, Entity playerEntity) + { + staticContainer.CharacterContainer.InitializePlayerEntity(world, playerEntity); + } public async UniTask LoadStartingRealmAsync(DynamicWorldContainer dynamicWorldContainer, CancellationToken ct) { diff --git a/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/KillPortableExperienceChatCommand.cs b/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/KillPortableExperienceChatCommand.cs new file mode 100644 index 0000000000..af4b7f9900 --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/KillPortableExperienceChatCommand.cs @@ -0,0 +1,53 @@ +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using DCL.Chat.Commands; +using DCL.FeatureFlags; +using PortableExperiences.Controller; +using System.Text.RegularExpressions; +using System.Threading; + +namespace Global.Dynamic.ChatCommands +{ + public class KillPortableExperienceChatCommand : IChatCommand + { + private const string COMMAND_PX = "killpx"; + private const string ENS_SUFFIX = ".dcl.eth"; + + private const string NAME_PATTERN = @"\s+(?<name>\w+)"; + private static readonly string COMMAND_PATTERN = $"^/(?<command>{Regex.Escape(COMMAND_PX)})"; + private static readonly string OPTIONAL_SUFFIX_PATTERN = $"(?<suffix>{Regex.Escape(ENS_SUFFIX)})?"; + + public static readonly Regex REGEX = new($"{COMMAND_PATTERN}{NAME_PATTERN}{OPTIONAL_SUFFIX_PATTERN}$", RegexOptions.Compiled); + + private readonly IPortableExperiencesController portableExperiencesController; + private readonly FeatureFlagsCache featureFlagsCache; + + private string? pxName; + + public KillPortableExperienceChatCommand(IPortableExperiencesController portableExperiencesController, FeatureFlagsCache featureFlagsCache) + { + this.portableExperiencesController = portableExperiencesController; + this.featureFlagsCache = featureFlagsCache; + } + + public async UniTask<string> ExecuteAsync(Match match, CancellationToken ct) + { + if (!featureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.PORTABLE_EXPERIENCE_CHAT_COMMANDS)) + return "🔴 Error. Portable Experiences Chat Commands are disabled"; + + pxName = match.Groups["name"].Value + ENS_SUFFIX; + + await UniTask.SwitchToMainThread(ct); + + var response = portableExperiencesController.UnloadPortableExperienceByEns(new ENS(pxName)); + + bool isSuccess = response.status; + + if (ct.IsCancellationRequested) + return "🔴 Error. The operation was canceled!"; + + return isSuccess ? $"🟢 The Portable Experience {pxName} has been Killed" : + $"🔴 Error. Could not Kill the Portable Experience {pxName}"; + } + } +} diff --git a/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/KillPortableExperienceChatCommand.cs.meta b/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/KillPortableExperienceChatCommand.cs.meta new file mode 100644 index 0000000000..1d57cad3cb --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/KillPortableExperienceChatCommand.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ff9915e6540d41219b3bd12cfee88bb7 +timeCreated: 1725968219 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/LoadPortableExperienceChatCommand.cs b/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/LoadPortableExperienceChatCommand.cs new file mode 100644 index 0000000000..1dd6ef058f --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/LoadPortableExperienceChatCommand.cs @@ -0,0 +1,66 @@ +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using DCL.Chat.Commands; +using DCL.Diagnostics; +using DCL.FeatureFlags; +using DCL.Utilities.Extensions; +using PortableExperiences.Controller; +using System.Text.RegularExpressions; +using System.Threading; + +namespace Global.Dynamic.ChatCommands +{ + /// <summary> + /// <example> + /// Commands could be: + /// "/loadpx globalpx" + /// "/loadpx olavra.dcl.eth" + ///This will load any world as a Global PX + /// </example> + /// </summary> + public class LoadPortableExperienceChatCommand : IChatCommand + { + private const string COMMAND_PX = "loadpx"; + private const string ENS_SUFFIX = ".dcl.eth"; + + private const string NAME_PATTERN = @"\s+(?<name>\w+)"; + private static readonly string COMMAND_PATTERN = $"^/(?<command>{Regex.Escape(COMMAND_PX)})"; + private static readonly string OPTIONAL_SUFFIX_PATTERN = $"(?<suffix>{Regex.Escape(ENS_SUFFIX)})?"; + + public static readonly Regex REGEX = new($"{COMMAND_PATTERN}{NAME_PATTERN}{OPTIONAL_SUFFIX_PATTERN}$", RegexOptions.Compiled); + + private readonly IPortableExperiencesController portableExperiencesController; + private readonly FeatureFlagsCache featureFlagsCache; + + private string? pxName; + + public LoadPortableExperienceChatCommand(IPortableExperiencesController portableExperiencesController, FeatureFlagsCache featureFlagsCache) + { + this.portableExperiencesController = portableExperiencesController; + this.featureFlagsCache = featureFlagsCache; + } + + public async UniTask<string> ExecuteAsync(Match match, CancellationToken ct) + { + if (!featureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.PORTABLE_EXPERIENCE_CHAT_COMMANDS)) + return "🔴 Error. Portable Experiences Chat Commands are disabled"; + + //In this case as we are matching the suffix, either if it's present or not we need to append it to the string, so we can avoid the check and just add it always. + pxName = match.Groups["name"].Value + ENS_SUFFIX; + + await UniTask.SwitchToMainThread(ct); + + var result = await portableExperiencesController. + CreatePortableExperienceByEnsAsync(new ENS(pxName), ct, true, true). + SuppressAnyExceptionWithFallback(new IPortableExperiencesController.SpawnResponse(), ReportCategory.PORTABLE_EXPERIENCE); + + bool isSuccess = !string.IsNullOrEmpty(result.ens); + + if (ct.IsCancellationRequested) + return "🔴 Error. The operation was canceled!"; + + return isSuccess ? $"🟢 The Portable Experience {pxName} has started loading" : + $"🔴 Error. Could not load {pxName} as a Portable Experience"; + } + } +} diff --git a/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/LoadPortableExperienceChatCommand.cs.meta b/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/LoadPortableExperienceChatCommand.cs.meta new file mode 100644 index 0000000000..49ed2861f1 --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/ChatCommands/LoadPortableExperienceChatCommand.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3c2e2ea360147334bb074243c7a586fd +timeCreated: 1712245249 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/Global/Dynamic/DynamicWorldContainer.cs b/Explorer/Assets/Scripts/Global/Dynamic/DynamicWorldContainer.cs index 7e7f36a91a..c21f1aa5fc 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/DynamicWorldContainer.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/DynamicWorldContainer.cs @@ -10,6 +10,7 @@ using DCL.AvatarRendering.Wearables.Helpers; using DCL.AvatarRendering.Wearables.ThirdParty; using DCL.Backpack.BackpackBus; +using DCL.BadgesAPIService; using DCL.Browser; using DCL.CharacterPreview; using DCL.Chat; @@ -75,7 +76,9 @@ using LiveKit.Proto; using MVC; using MVC.PopupsController.PopupCloser; +using PortableExperiences.Controller; using SceneRunner.Debugging.Hub; +using SceneRunner.Scene; using System; using System.Buffers; using System.Collections.Generic; @@ -131,7 +134,7 @@ public class DynamicWorldContainer : DCLWorldContainer<DynamicWorldSettings> public RealFlowLoadingStatus RealFlowLoadingStatus { get; private set; } = null!; - private MultiplayerMovementMessageBus multiplayerMovementMessageBus; + private MultiplayerMovementMessageBus? multiplayerMovementMessageBus; public override void Dispose() { @@ -161,6 +164,7 @@ private static void BuildReloadSceneWidget(IDebugContainerBuilder debugBuilder, DynamicWorldDependencies dynamicWorldDependencies, DynamicWorldParams dynamicWorldParams, AudioClipConfig backgroundMusic, + IPortableExperiencesController portableExperiencesController, World globalWorld, Entity playerEntity, CancellationToken ct) @@ -170,7 +174,6 @@ private static void BuildReloadSceneWidget(IDebugContainerBuilder debugBuilder, StaticContainer staticContainer = dynamicWorldDependencies.StaticContainer; IWeb3IdentityCache identityCache = dynamicWorldDependencies.Web3IdentityCache; IAssetsProvisioner assetsProvisioner = dynamicWorldDependencies.AssetsProvisioner; - IDebugContainerBuilder debugBuilder = dynamicWorldDependencies.DebugContainerBuilder; // If we have many undesired delays when using the third-party providers, it might be useful to cache it at app's bootstrap @@ -225,7 +228,7 @@ async UniTask InitializeContainersAsync(IPluginSettingsContainer settingsContain container.ParcelServiceContainer = parcelServiceContainer; var nftInfoAPIClient = new OpenSeaAPIClient(staticContainer.WebRequestsContainer.WebRequestController, bootstrapContainer.DecentralandUrlsSource); - var wearableCatalog = new WearableCache(); + var wearableCatalog = new WearableStorage(); container.wearablesProvider = new ECSWearablesProvider(identityCache, globalWorld); var characterPreviewFactory = new CharacterPreviewFactory(staticContainer.ComponentsContainer.ComponentPoolsRegistry); IWebBrowser webBrowser = bootstrapContainer.WebBrowser; @@ -243,15 +246,15 @@ async UniTask InitializeContainersAsync(IPluginSettingsContainer settingsContain var satelliteView = new SatelliteFloor(); var landscapePlugin = new LandscapePlugin(satelliteView, genesisTerrain, worldsTerrain, assetsProvisioner, debugBuilder, container.MapRendererContainer.TextureContainer, staticContainer.WebRequestsContainer.WebRequestController, dynamicWorldParams.EnableLandscape); - Func<IMultiPool> multiPoolFactory = () => new DCLMultiPool(); + IMultiPool MultiPoolFactory() => + new DCLMultiPool(); - var multiPool = multiPoolFactory(); var memoryPool = new ArrayMemoryPool(ArrayPool<byte>.Shared!); container.RealFlowLoadingStatus = new RealFlowLoadingStatus(); var assetBundlesURL = URLDomain.FromString(bootstrapContainer.DecentralandUrlsSource.Url(DecentralandUrl.AssetBundlesCDN)); - var emotesCache = new MemoryEmotesCache(); + var emotesCache = new MemoryEmotesStorage(); staticContainer.CacheCleaner.Register(emotesCache); var equippedWearables = new EquippedWearables(); var equippedEmotes = new EquippedEmotes(); @@ -268,7 +271,7 @@ async UniTask InitializeContainersAsync(IPluginSettingsContainer settingsContain var archipelagoIslandRoom = IArchipelagoIslandRoom.NewDefault( identityCache, - multiPool, + MultiPoolFactory(), staticContainer.CharacterContainer.CharacterObject, currentAdapterAddress, staticContainer.WebRequestsContainer.WebRequestController @@ -293,7 +296,7 @@ async UniTask InitializeContainersAsync(IPluginSettingsContainer settingsContain container.localSceneDevelopmentController = new LocalSceneDevelopmentController(container.reloadSceneController, dynamicWorldParams.LocalSceneDevelopmentRealm); container.RoomHub = localSceneDevelopment ? NullRoomHub.INSTANCE : new RoomHub(archipelagoIslandRoom, gateKeeperSceneRoom); - container.MessagePipesHub = new MessagePipesHub(container.RoomHub, multiPoolFactory()!, multiPoolFactory()!, memoryPool); + container.MessagePipesHub = new MessagePipesHub(container.RoomHub, MultiPoolFactory(), MultiPoolFactory(), memoryPool); RoomsStatus roomsStatus = new RoomsStatus( container.RoomHub, @@ -393,6 +396,8 @@ async UniTask InitializeContainersAsync(IPluginSettingsContainer settingsContain { ShowEntityInfoChatCommand.REGEX, () => new ShowEntityInfoChatCommand(worldInfoHub) }, { ClearChatCommand.REGEX, () => new ClearChatCommand(chatHistory) }, { ReloadSceneChatCommand.REGEX, () => new ReloadSceneChatCommand(container.reloadSceneController) }, + { LoadPortableExperienceChatCommand.REGEX, () => new LoadPortableExperienceChatCommand(portableExperiencesController, staticContainer.FeatureFlagsCache)}, + { KillPortableExperienceChatCommand.REGEX, () => new KillPortableExperienceChatCommand(portableExperiencesController, staticContainer.FeatureFlagsCache)}, }; IChatMessagesBus coreChatMessageBus = new MultiplayerChatMessagesBus(container.MessagePipesHub, container.ProfileRepository, new MessageDeduplication<double>()) @@ -435,6 +440,8 @@ async UniTask InitializeContainersAsync(IPluginSettingsContainer settingsContain container.multiplayerMovementMessageBus = new MultiplayerMovementMessageBus(container.MessagePipesHub, entityParticipantTable, globalWorld); + var badgesAPIClient = new BadgesAPIClient(staticContainer.WebRequestsContainer.WebRequestController, bootstrapContainer.DecentralandUrlsSource); + var globalPlugins = new List<IDCLGlobalPlugin> { new MultiplayerPlugin( @@ -459,7 +466,7 @@ async UniTask InitializeContainersAsync(IPluginSettingsContainer settingsContain ), new WorldInfoPlugin(worldInfoHub, debugBuilder, chatHistory), new CharacterMotionPlugin(assetsProvisioner, staticContainer.CharacterContainer.CharacterObject, debugBuilder, staticContainer.ComponentsContainer.ComponentPoolsRegistry), - new InputPlugin(dclInput, dclCursor, unityEventSystem, assetsProvisioner, dynamicWorldDependencies.CursorUIDocument, multiplayerEmotesMessageBus, container.MvcManager, debugBuilder, dynamicWorldDependencies.RootUIDocument, dynamicWorldDependencies.CursorUIDocument), + new InputPlugin(dclInput, dclCursor, unityEventSystem, assetsProvisioner, dynamicWorldDependencies.CursorUIDocument, multiplayerEmotesMessageBus, container.MvcManager, debugBuilder, dynamicWorldDependencies.RootUIDocument, dynamicWorldDependencies.CursorUIDocument, exposedGlobalDataContainer.ExposedCameraData), new GlobalInteractionPlugin(dclInput, dynamicWorldDependencies.RootUIDocument, assetsProvisioner, staticContainer.EntityCollidersGlobalCache, exposedGlobalDataContainer.GlobalInputEvents, dclCursor, unityEventSystem, container.MvcManager), new CharacterCameraPlugin(assetsProvisioner, realmSamplingData, exposedGlobalDataContainer.ExposedCameraData, debugBuilder, dynamicWorldDependencies.CommandLineArgs, dclInput), new WearablePlugin(assetsProvisioner, staticContainer.WebRequestsContainer.WebRequestController, staticContainer.RealmData, assetBundlesURL, staticContainer.CacheCleaner, wearableCatalog), @@ -579,6 +586,8 @@ async UniTask InitializeContainersAsync(IPluginSettingsContainer settingsContain selfProfile, webBrowser, bootstrapContainer.DecentralandUrlsSource, + badgesAPIClient, + notificationsBusController, staticContainer.InputBlock, globalWorld, playerEntity diff --git a/Explorer/Assets/Scripts/Global/Dynamic/GlobalWorldFactory.cs b/Explorer/Assets/Scripts/Global/Dynamic/GlobalWorldFactory.cs index e3144b108d..5ec40ea87d 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/GlobalWorldFactory.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/GlobalWorldFactory.cs @@ -4,6 +4,7 @@ using CrdtEcsBridge.RestrictedActions; using DCL.AvatarRendering.AvatarShape.Systems; using DCL.DebugUtilities; +using DCL.Diagnostics; using DCL.GlobalPartitioning; using DCL.Ipfs; using DCL.LOD; @@ -36,6 +37,7 @@ using System.Collections.Generic; using System.Threading; using SystemGroups.Visualiser; +using UnityEngine; using Utility; namespace Global.Dynamic @@ -111,6 +113,9 @@ public GlobalWorld Create(ISceneFactory sceneFactory, V8ActiveEngines v8ActiveEn globalSceneStateProvider.State = SceneState.Running; var builder = new ArchSystemsWorldBuilder<World>(world); + + AddShortInfo(world); + builder.InjectCustomGroup(new SyncedPreRenderingSystemGroup(null, globalSceneStateProvider)); IReleasablePerformanceBudget sceneBudget = new ConcurrentLoadingPerformanceBudget(staticSettings.ScenesLoadingBudget); @@ -134,6 +139,7 @@ public GlobalWorld Create(ISceneFactory sceneFactory, V8ActiveEngines v8ActiveEn LoadStaticPointersSystem.InjectToWorld(ref builder); LoadFixedPointersSystem.InjectToWorld(ref builder); + LoadPortableExperiencePointersSystem.InjectToWorld(ref builder); // are replace by increasing radius var jobsMathHelper = new ParcelMathJobifiedHelper(); @@ -163,7 +169,9 @@ public GlobalWorld Create(ISceneFactory sceneFactory, V8ActiveEngines v8ActiveEn OwnAvatarLoaderFromDebugMenuSystem.InjectToWorld(ref builder, playerEntity, debugContainerBuilder, realmData); - UpdateCurrentSceneSystem.InjectToWorld(ref builder, realmData, scenesCache, currentSceneInfo, playerEntity, staticContainer.SingletonSharedDependencies.SceneAssetLock); + UnloadPortableExperiencesSystem.InjectToWorld(ref builder); + + UpdateCurrentSceneSystem.InjectToWorld(ref builder, realmData, scenesCache, currentSceneInfo, playerEntity, staticContainer.SingletonSharedDependencies.SceneAssetLock, debugContainerBuilder); var pluginArgs = new GlobalPluginArguments(playerEntity, v8ActiveEngines); @@ -187,5 +195,10 @@ public GlobalWorld Create(ISceneFactory sceneFactory, V8ActiveEngines v8ActiveEn return globalWorld; } + + private static void AddShortInfo(World world) + { + world.Create(new SceneShortInfo(Vector2Int.zero, "global")); + } } } diff --git a/Explorer/Assets/Scripts/Global/Dynamic/IBootstrap.cs b/Explorer/Assets/Scripts/Global/Dynamic/IBootstrap.cs index 9fdb8c9386..fba30abe51 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/IBootstrap.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/IBootstrap.cs @@ -17,7 +17,7 @@ public interface IBootstrap { void PreInitializeSetup(UIDocument cursorRoot, UIDocument debugUiRoot, ISplashScreen splashScreen, CancellationToken ct); - UniTask<(StaticContainer?, bool)> LoadStaticContainerAsync(BootstrapContainer bootstrapContainer, PluginSettingsContainer globalPluginSettingsContainer, DebugViewsCatalog debugViewsCatalog, CancellationToken ct); + UniTask<(StaticContainer?, bool)> LoadStaticContainerAsync(BootstrapContainer bootstrapContainer, PluginSettingsContainer globalPluginSettingsContainer, DebugViewsCatalog debugViewsCatalog, Entity playerEntity, CancellationToken ct); UniTask<(DynamicWorldContainer?, bool)> LoadDynamicWorldContainerAsync( BootstrapContainer bootstrapContainer, @@ -40,7 +40,7 @@ UniTask<bool> InitializePluginsAsync(StaticContainer staticContainer, DynamicWor UniTask InitializeFeatureFlagsAsync(IWeb3Identity? identity, IDecentralandUrlsSource decentralandUrlsSource, StaticContainer staticContainer, CancellationToken ct); - Entity CreatePlayerEntity(StaticContainer staticContainer); + void InitializePlayerEntity(StaticContainer staticContainer, Entity playerEntity); GlobalWorld CreateGlobalWorld(BootstrapContainer bootstrapContainer, StaticContainer staticContainer, DynamicWorldContainer dynamicWorldContainer, UIDocument debugUiRoot, Entity playerEntity); diff --git a/Explorer/Assets/Scripts/Global/Dynamic/MainSceneLoader.cs b/Explorer/Assets/Scripts/Global/Dynamic/MainSceneLoader.cs index 538f500aca..57f0b8ce44 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/MainSceneLoader.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/MainSceneLoader.cs @@ -1,10 +1,14 @@ using Arch.Core; +using CommunicationData.URLHelpers; +using CRDT; +using CrdtEcsBridge.Components; using Cysharp.Threading.Tasks; using DCL.ApplicationVersionGuard; using DCL.Audio; using DCL.AuthenticationScreenFlow; using DCL.DebugUtilities; using DCL.Diagnostics; +using DCL.FeatureFlags; using DCL.Input.Component; using DCL.PluginSystem; using DCL.PluginSystem.Global; @@ -13,9 +17,11 @@ using DCL.Utilities.Extensions; using Global.AppArgs; using LiveKit.Proto; +using PortableExperiences.Controller; using MVC; using SceneRunner.Debugging; using System; +using System.Collections.Generic; using System.Linq; using System.Threading; using UnityEngine; @@ -25,6 +31,8 @@ namespace Global.Dynamic { public interface IDebugSettings { + string[]? PortableExperiencesEnsToLoad { get; } + bool ShowSplash { get; } bool ShowAuthentication { get; } bool ShowLoading { get; } bool EnableLandscape { get; } @@ -33,6 +41,7 @@ public interface IDebugSettings bool EnableEmulateNoLivekitConnection { get; } bool OverrideConnectionQuality { get; } ConnectionQuality ConnectionQuality { get; } + bool EnableRemotePortableExperiences { get; } } [Serializable] @@ -40,17 +49,28 @@ public class DebugSettings : IDebugSettings { private static readonly DebugSettings RELEASE_SETTINGS = Release(); - [SerializeField] private bool showSplash; - [SerializeField] private bool showAuthentication; - [SerializeField] private bool showLoading; - [SerializeField] private bool enableLandscape; - [SerializeField] private bool enableLOD; + [SerializeField] + private bool showSplash; + [SerializeField] + private bool showAuthentication; + [SerializeField] + private bool showLoading; + [SerializeField] + private bool enableLandscape; + [SerializeField] + private bool enableLOD; [SerializeField] private bool enableVersionUpdateGuard; - [SerializeField] private bool enableEmulateNoLivekitConnection; - + [SerializeField] + private bool enableEmulateNoLivekitConnection; + [SerializeField] [Tooltip("Enable Portable Experiences obtained from Feature Flags from loading at the start of the game")] + private bool enableRemotePortableExperiences; + [SerializeField] [Tooltip("Make sure the ENS put here will be loaded as a GlobalPX (format must be something.dcl.eth)")] + internal string[]? portableExperiencesEnsToLoad; [Space] - [SerializeField] private bool overrideConnectionQuality; - [SerializeField] private ConnectionQuality connectionQuality; + [SerializeField] + private bool overrideConnectionQuality; + [SerializeField] + private ConnectionQuality connectionQuality; public static DebugSettings Release() => new () @@ -61,12 +81,16 @@ public static DebugSettings Release() => enableLandscape = true, enableLOD = true, enableVersionUpdateGuard = true, + portableExperiencesEnsToLoad = null, enableEmulateNoLivekitConnection = false, overrideConnectionQuality = false, - connectionQuality = ConnectionQuality.QualityExcellent + connectionQuality = ConnectionQuality.QualityExcellent, + enableRemotePortableExperiences = true, }; // To avoid configuration issues, force full flow on build (Debug.isDebugBuild is always true in Editor) + public string[]? PortableExperiencesEnsToLoad => Debug.isDebugBuild ? this.portableExperiencesEnsToLoad : RELEASE_SETTINGS.portableExperiencesEnsToLoad; + public bool EnableRemotePortableExperiences => Debug.isDebugBuild ? this.enableRemotePortableExperiences : RELEASE_SETTINGS.enableRemotePortableExperiences; public bool ShowSplash => Debug.isDebugBuild ? this.showSplash : RELEASE_SETTINGS.showSplash; public bool ShowAuthentication => Debug.isDebugBuild ? this.showAuthentication : RELEASE_SETTINGS.showAuthentication; public bool ShowLoading => Debug.isDebugBuild ? this.showLoading : RELEASE_SETTINGS.showLoading; @@ -163,7 +187,8 @@ private async UniTask InitializeFlowAsync(CancellationToken ct) bootstrap.PreInitializeSetup(cursorRoot, debugUiRoot, splashScreen, destroyCancellationToken); bool isLoaded; - (staticContainer, isLoaded) = await bootstrap.LoadStaticContainerAsync(bootstrapContainer, globalPluginSettingsContainer, debugViewsCatalog, ct); + Entity playerEntity = world.Create(new CRDTEntity(SpecialEntitiesID.PLAYER_ENTITY)); + (staticContainer, isLoaded) = await bootstrap.LoadStaticContainerAsync(bootstrapContainer, globalPluginSettingsContainer, debugViewsCatalog, playerEntity, ct); if (!isLoaded) { @@ -171,7 +196,7 @@ private async UniTask InitializeFlowAsync(CancellationToken ct) return; } - Entity playerEntity = bootstrap.CreatePlayerEntity(staticContainer!); + bootstrap.InitializePlayerEntity(staticContainer!, playerEntity); (dynamicWorldContainer, isLoaded) = await bootstrap.LoadDynamicWorldContainerAsync(bootstrapContainer, staticContainer!, scenePluginSettingsContainer, settings, dynamicSettings, uiToolkitRoot, cursorRoot, splashScreen, backgroundMusic, worldInfoTool.EnsureNotNull(), playerEntity, destroyCancellationToken); @@ -200,11 +225,14 @@ private async UniTask InitializeFlowAsync(CancellationToken ct) globalWorld = bootstrap.CreateGlobalWorld(bootstrapContainer, staticContainer!, dynamicWorldContainer!, debugUiRoot, playerEntity); - staticContainer!.PlayerEntityProxy.SetObject(playerEntity); - await bootstrap.LoadStartingRealmAsync(dynamicWorldContainer!, ct); + await bootstrap.UserInitializationAsync(dynamicWorldContainer!, globalWorld, playerEntity, splashScreen, ct); + LoadDebugPortableExperiences(ct); + + LoadRemotePortableExperiences(ct); + RestoreInputs(); } catch (OperationCanceledException) @@ -219,6 +247,34 @@ private async UniTask InitializeFlowAsync(CancellationToken ct) } } + private void LoadRemotePortableExperiences(CancellationToken ct) + { + if (!debugSettings.EnableRemotePortableExperiences) return; + + if (staticContainer!.FeatureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.GLOBAL_PORTABLE_EXPERIENCE, FeatureFlagsStrings.CSV_VARIANT)) + { + if (!staticContainer.FeatureFlagsCache.Configuration.TryGetCsvPayload(FeatureFlagsStrings.GLOBAL_PORTABLE_EXPERIENCE, "csv-variant", out List<List<string>>? csv)) return; + + if (csv?[0] == null) return; + + foreach (string value in csv[0]) { staticContainer.PortableExperiencesController!. + CreatePortableExperienceByEnsAsync(new ENS(value), ct, true, true). + SuppressAnyExceptionWithFallback(new IPortableExperiencesController.SpawnResponse(), ReportCategory.PORTABLE_EXPERIENCE).Forget(); } + } + } + + private void LoadDebugPortableExperiences(CancellationToken ct) + { + if (debugSettings.portableExperiencesEnsToLoad == null) return; + + foreach (string pxEns in debugSettings.portableExperiencesEnsToLoad) + { + staticContainer!.PortableExperiencesController. + CreatePortableExperienceByEnsAsync(new ENS(pxEns), ct, true, true). + SuppressAnyExceptionWithFallback(new IPortableExperiencesController.SpawnResponse(), ReportCategory.PORTABLE_EXPERIENCE).Forget(); + } + } + private async UniTask<bool> DoesApplicationRequireVersionUpdateAsync(CancellationToken ct, SplashScreen splashScreen) { var appVersionGuard = new ApplicationVersionGuard(staticContainer!.WebRequestsContainer.WebRequestController, bootstrapContainer!.WebBrowser); @@ -259,7 +315,7 @@ private void RestoreInputs() { // We enable Inputs through the inputBlock so the block counters can be properly updated and the component Active flags are up-to-date as well // We restore all inputs except EmoteWheel and FreeCamera as they should be disabled by default - staticContainer!.InputBlock.Enable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.Player, InputMapComponent.Kind.Emotes, InputMapComponent.Kind.Camera); + staticContainer!.InputBlock.Enable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.PLAYER, InputMapComponent.Kind.EMOTES, InputMapComponent.Kind.CAMERA); } [ContextMenu(nameof(ValidateSettingsAsync))] diff --git a/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences.meta b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences.meta new file mode 100644 index 0000000000..27958ff5d9 --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +<<<<<<<< HEAD:Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences.meta +guid: 7605cbd0627ba4943930770ffb0a700a +folderAsset: yes +DefaultImporter: +======== +guid: 5879ce12a2ad11c429794b78710df165 +AssemblyDefinitionReferenceImporter: +>>>>>>>> main:Explorer/Assets/DCL/SDKComponents/InputModifier/Systems/DCL.InputModifier.Systems.asmref.meta + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/ECSPortableExperiencesController.cs b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/ECSPortableExperiencesController.cs new file mode 100644 index 0000000000..4dae2360a1 --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/ECSPortableExperiencesController.cs @@ -0,0 +1,155 @@ +using Arch.Core; +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using DCL.CommunicationData.URLHelpers; +using DCL.Diagnostics; +using DCL.FeatureFlags; +using DCL.Ipfs; +using DCL.Web3.Identities; +using DCL.WebRequests; +using ECS; +using ECS.SceneLifeCycle; +using ECS.SceneLifeCycle.SceneDefinition; +using System; +using System.Collections.Generic; +using System.Threading; +using DCL.Utilities.Extensions; +using ECS.LifeCycle.Components; +using SceneRunner.Scene; +using System.Linq; + +namespace PortableExperiences.Controller +{ + public class ECSPortableExperiencesController : IPortableExperiencesController + { + private readonly IWeb3IdentityCache web3IdentityCache; + private readonly IWebRequestController webRequestController; + private readonly IScenesCache scenesCache; + private readonly World globalWorld; + private readonly List<IPortableExperiencesController.SpawnResponse> spawnResponsesList = new (); + private readonly ServerAbout serverAbout = new (); + private readonly FeatureFlagsCache featureFlagsCache; + public Dictionary<ENS, Entity> PortableExperienceEntities { get; } = new (); + + + public ECSPortableExperiencesController( + World globalWorld, + IWeb3IdentityCache web3IdentityCache, + IWebRequestController webRequestController, + IScenesCache scenesCache, + FeatureFlagsCache featureFlagsCache) + { + this.globalWorld = globalWorld; + this.web3IdentityCache = web3IdentityCache; + this.webRequestController = webRequestController; + this.scenesCache = scenesCache; + this.featureFlagsCache = featureFlagsCache; + } + + public async UniTask<IPortableExperiencesController.SpawnResponse> CreatePortableExperienceByEnsAsync(ENS ens, CancellationToken ct, bool isGlobalPortableExperience = false, bool force = false) + { + if (!force) + { + switch (isGlobalPortableExperience) + { + //If it's not a Global PX and common PXs are disabled + case false when !featureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.PORTABLE_EXPERIENCE): + throw new Exception("Portable Experiences are disabled"); + //If it IS a Global PX but Global PXs are disabled + case true when !featureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.GLOBAL_PORTABLE_EXPERIENCE): + throw new Exception("Global Portable Experiences are disabled"); + } + } + + string worldUrl = string.Empty; + + if (ens.IsValid) { worldUrl = ens.ConvertEnsToWorldUrl(); } + + if (!worldUrl.IsValidUrl()) throw new ArgumentException("Invalid Spawn params. Provide a valid ENS name"); + + var portableExperiencePath = URLDomain.FromString(worldUrl); + URLAddress url = portableExperiencePath.Append(new URLPath("/about")); + + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> genericGetRequest = webRequestController.GetAsync(new CommonArguments(url), ct, ReportCategory.REALM); + + ServerAbout result = await genericGetRequest.OverwriteFromJsonAsync(serverAbout, WRJsonParser.Unity); + + if (result.configurations.scenesUrn.Count == 0) + { + //The loaded realm does not have any fixed scene, so it cannot be loaded as a Portable Experience + throw new Exception($"Scene not Available in provided Portable Experience with ens: {ens}"); + } + + var realmData = new RealmData(); + realmData.Reconfigure( + new IpfsRealm(web3IdentityCache, webRequestController, portableExperiencePath, result), + result.configurations.realmName.EnsureNotNull("Realm name not found"), + result.configurations.networkId, + result.comms?.adapter ?? string.Empty, + result.comms?.protocol ?? string.Empty, + portableExperiencePath.Value + ); + + ISceneFacade parentScene = scenesCache.Scenes.FirstOrDefault(s => s.SceneStateProvider.IsCurrent); + string parentSceneName = parentScene != null ? parentScene.Info.Name : "main"; + Entity portableExperienceEntity = globalWorld.Create(new PortableExperienceRealmComponent(realmData, parentSceneName, isGlobalPortableExperience), new PortableExperienceComponent(ens)); + PortableExperienceEntities.Add(ens, portableExperienceEntity); + + return new IPortableExperiencesController.SpawnResponse + { name = realmData.RealmName, ens = ens.ToString(), parent_cid = parentSceneName, pid = portableExperienceEntity.Id.ToString() }; + } + + public bool CanKillPortableExperience(ENS ens) + { + if (!featureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.PORTABLE_EXPERIENCE)) return false; + + ISceneFacade currentSceneFacade = scenesCache.CurrentScene; + if (currentSceneFacade == null) return false; + + if (PortableExperienceEntities.TryGetValue(ens, out Entity portableExperienceEntity)) + { + PortableExperienceRealmComponent portableExperienceRealmComponent = globalWorld.Get<PortableExperienceRealmComponent>(portableExperienceEntity); + + if (portableExperienceRealmComponent.IsGlobalPortableExperience) return false; + + return portableExperienceRealmComponent.ParentSceneId == currentSceneFacade.Info.Name; + } + + return false; + } + + public List<IPortableExperiencesController.SpawnResponse> GetAllPortableExperiences() + { + spawnResponsesList.Clear(); + + foreach (var portableExperience in PortableExperienceEntities) + { + PortableExperienceRealmComponent pxRealmComponent = globalWorld.Get<PortableExperienceRealmComponent>(portableExperience.Value); + + spawnResponsesList.Add(new IPortableExperiencesController.SpawnResponse { + name = pxRealmComponent.RealmData.RealmName, + ens = portableExperience.Key.ToString(), + parent_cid = pxRealmComponent.ParentSceneId, + pid = portableExperience.Value.Id.ToString() }); + } + + return spawnResponsesList; + } + + public IPortableExperiencesController.ExitResponse UnloadPortableExperienceByEns(ENS ens) + { + if (!ens.IsValid) throw new ArgumentException($"The provided ens {ens.ToString()} is invalid"); + + if (PortableExperienceEntities.TryGetValue(ens, out Entity portableExperienceEntity)) + { + globalWorld.Add<DeleteEntityIntention>(portableExperienceEntity); + + PortableExperienceEntities.Remove(ens); + + return new IPortableExperiencesController.ExitResponse { status = true }; + } + + return new IPortableExperiencesController.ExitResponse { status = false }; + } + } +} diff --git a/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/ECSPortableExperiencesController.cs.meta b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/ECSPortableExperiencesController.cs.meta new file mode 100644 index 0000000000..51e43ad2a1 --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/ECSPortableExperiencesController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 897c07427191ecc4ca827e8aaeb9c831 +timeCreated: 1688717251 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/IPortableExperiencesController.cs b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/IPortableExperiencesController.cs new file mode 100644 index 0000000000..9d6c43b728 --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/IPortableExperiencesController.cs @@ -0,0 +1,37 @@ +using Arch.Core; +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Threading; + +namespace PortableExperiences.Controller +{ + public interface IPortableExperiencesController + { + Dictionary<ENS, Entity> PortableExperienceEntities { get; } + + bool CanKillPortableExperience(ENS ens); + + UniTask<SpawnResponse> CreatePortableExperienceByEnsAsync(ENS ens, CancellationToken ct, bool isGlobalPortableExperience = false, bool force = false); + + ExitResponse UnloadPortableExperienceByEns(ENS ens); + + List<SpawnResponse> GetAllPortableExperiences(); + + [SuppressMessage("ReSharper", "InconsistentNaming")] + public struct SpawnResponse + { + public string pid; + public string parent_cid; + public string name; + public string ens; + } + + [SuppressMessage("ReSharper", "InconsistentNaming")] + public struct ExitResponse + { + public bool status; + } + } +} diff --git a/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/IPortableExperiencesController.cs.meta b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/IPortableExperiencesController.cs.meta new file mode 100644 index 0000000000..5ffc0ff5e6 --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/IPortableExperiencesController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a4bd9d4dfb434175942d7e7391251f4a +timeCreated: 1719510027 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/PortableExperiencesController.asmdef b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/PortableExperiencesController.asmdef new file mode 100644 index 0000000000..1a3baba061 --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/PortableExperiencesController.asmdef @@ -0,0 +1,28 @@ +{ + "name": "PortableExperiencesController", + "rootNamespace": "", + "references": [ + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:e25ef972de004615a22937e739de2def", + "GUID:1d2c76eb8b48e0b40940e8b31a679ce1", + "GUID:4a12c0b1b77ec6b418a8d7bd5c925be3", + "GUID:5ab29fa8ae5769b49ab29e390caca7a4", + "GUID:e0eedfa2deb9406daf86fd8368728e39", + "GUID:166b65e6dfc848bb9fb075f53c293a38", + "GUID:8322ea9340a544c59ddc56d4793eac74", + "GUID:286980af24684da6acc1caa413039811", + "GUID:101b8b6ebaf64668909b49c4b7a1420d", + "GUID:1b8e1e1bd01505f478f0369c04a4fb2f", + "GUID:ace653ac543d483ba8abee112a3ba2a6", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/PortableExperiencesController.asmdef.meta b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/PortableExperiencesController.asmdef.meta new file mode 100644 index 0000000000..02ec7dc0d7 --- /dev/null +++ b/Explorer/Assets/Scripts/Global/Dynamic/PortableExperiences/PortableExperiencesController.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f1eaef1b40a68e74cb90cbedebf57bbf +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Scripts/Global/Dynamic/RealmController.cs b/Explorer/Assets/Scripts/Global/Dynamic/RealmController.cs index a03e515b5c..30506f3d6f 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/RealmController.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/RealmController.cs @@ -96,7 +96,7 @@ public async UniTask SetRealmAsync(URLDomain realm, CancellationToken ct) URLAddress url = realm.Append(new URLPath("/about")); - var genericGetRequest = webRequestController.GetAsync(new CommonArguments(url), ct, ReportCategory.REALM); + GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> genericGetRequest = webRequestController.GetAsync(new CommonArguments(url), ct, ReportCategory.REALM); ServerAbout result = await genericGetRequest.OverwriteFromJsonAsync(serverAbout, WRJsonParser.Unity); string hostname = ResolveHostname(realm, result); @@ -136,7 +136,7 @@ public async UniTask RestartRealmAsync(CancellationToken ct) } public async UniTask<bool> IsReachableAsync(URLDomain realm, CancellationToken ct) => - await webRequestController.IsReachableAsync(realm.Append(new URLPath("/about")), ct); + await webRequestController.IsReachableAsync(ReportCategory.REALM, realm.Append(new URLPath("/about")), ct); public async UniTask<AssetPromise<SceneEntityDefinition, GetSceneDefinition>[]> WaitForFixedScenePromisesAsync(CancellationToken ct) { @@ -154,7 +154,7 @@ public void DisposeGlobalWorld() if (globalWorld != null) { - loadedScenes = FindLoadedScenesAndClearSceneCache(); + loadedScenes = FindLoadedScenesAndClearSceneCache(true); // Destroy everything without awaiting as it's Application Quit globalWorld.SafeDispose(ReportCategory.SCENE_LOADING); } @@ -176,7 +176,8 @@ private async UniTask UnloadCurrentRealmAsync() // release pooled entities for (var i = 0; i < globalWorld.FinalizeWorldSystems.Count; i++) - globalWorld.FinalizeWorldSystems[i].FinalizeComponents(world.Query(in CLEAR_QUERY)); + globalWorld.FinalizeWorldSystems[i].FinalizeComponents(world.Query(in CLEAR_QUERY)); + // Clear the world from everything connected to the current realm world.Destroy(in CLEAR_QUERY); @@ -212,13 +213,14 @@ private bool ComplimentWithStaticPointers(World world, Entity realmEntity) return false; } - private List<ISceneFacade> FindLoadedScenesAndClearSceneCache() + private List<ISceneFacade> FindLoadedScenesAndClearSceneCache(bool findPortableExperiences = false) { allScenes.Clear(); allScenes.AddRange(scenesCache.Scenes); + if (findPortableExperiences) allScenes.AddRange(scenesCache.PortableExperiencesScenes); // Dispose all scenes - scenesCache.Clear(); + scenesCache.ClearScenes(findPortableExperiences); return allScenes; } diff --git a/Explorer/Assets/Scripts/Global/Dynamic/RealmLaunchSettings.cs b/Explorer/Assets/Scripts/Global/Dynamic/RealmLaunchSettings.cs index 11ec0f7384..3ea47e5f93 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/RealmLaunchSettings.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/RealmLaunchSettings.cs @@ -35,6 +35,8 @@ public struct PredefinedScenes [SerializeField] internal HybridSceneContentServer remoteHybridSceneContentServer = HybridSceneContentServer.Goerli; [SerializeField] internal bool useRemoteAssetsBundles = true; + [SerializeField] private string[] portableExperiencesEnsToLoadAtGameStart; + public Vector2Int TargetScene => targetScene; private bool isLocalSceneDevelopmentRealm; diff --git a/Explorer/Assets/Scripts/Global/SceneSharedContainer.cs b/Explorer/Assets/Scripts/Global/SceneSharedContainer.cs index 345b12c85b..0f05aa7727 100644 --- a/Explorer/Assets/Scripts/Global/SceneSharedContainer.cs +++ b/Explorer/Assets/Scripts/Global/SceneSharedContainer.cs @@ -66,7 +66,8 @@ public static SceneSharedContainer Create(in StaticContainer staticContainer, webRequestController, roomHub, realmData, - new CommunicationControllerHub(messagePipesHub) + staticContainer.PortableExperiencesController, + new SceneCommunicationPipe(messagePipesHub) ), }; } diff --git a/Explorer/Assets/Scripts/Global/StaticContainer.cs b/Explorer/Assets/Scripts/Global/StaticContainer.cs index b72862d107..de94119384 100644 --- a/Explorer/Assets/Scripts/Global/StaticContainer.cs +++ b/Explorer/Assets/Scripts/Global/StaticContainer.cs @@ -35,8 +35,10 @@ using ECS.SceneLifeCycle.Reporting; using Global.AppArgs; using SceneRunner.Mapping; +using Sentry; using System.Collections.Generic; using System.Threading; +using PortableExperiences.Controller; using UnityEngine; using Utility; using MultiplayerPlugin = DCL.PluginSystem.World.MultiplayerPlugin; @@ -50,7 +52,7 @@ namespace Global /// </summary> public class StaticContainer : IDCLPlugin<StaticSettings> { - public readonly ObjectProxy<Entity> PlayerEntityProxy = new (); + public Entity PlayerEntity { get; set; } public readonly ObjectProxy<DCLInput> InputProxy = new (); public readonly ObjectProxy<AvatarBase> MainPlayerAvatarBaseProxy = new (); public readonly ObjectProxy<IRoomHub> RoomHubProxy = new (); @@ -88,6 +90,7 @@ public class StaticContainer : IDCLPlugin<StaticSettings> public ISceneReadinessReportQueue SceneReadinessReportQueue { get; private set; } public FeatureFlagsCache FeatureFlagsCache { get; private set; } public IFeatureFlagsProvider FeatureFlagsProvider { get; private set; } + public IPortableExperiencesController PortableExperiencesController { get; private set; } public IDebugContainerBuilder DebugContainerBuilder { get; private set; } public void Dispose() @@ -109,16 +112,19 @@ await UniTask.WhenAll( ); } - public static async UniTask<(StaticContainer? container, bool success)> CreateAsync( - IDecentralandUrlsSource decentralandUrlsSource, + public static async UniTask<(StaticContainer? container, bool success)> CreateAsync(IDecentralandUrlsSource decentralandUrlsSource, IAssetsProvisioner assetsProvisioner, IReportsHandlingSettings reportHandlingSettings, IAppArgs appArgs, DebugViewsCatalog debugViewsCatalog, IPluginSettingsContainer settingsContainer, + DiagnosticsContainer diagnosticsContainer, IWeb3IdentityCache web3IdentityProvider, IEthereumApi ethereumApi, + bool localSceneDevelopment, + bool useRemoteAssetBundles, World globalWorld, + Entity playerEntity, CancellationToken ct) { ProfilingCounters.CleanAllCounters(); @@ -128,23 +134,22 @@ await UniTask.WhenAll( var profilingProvider = new Profiler(); var container = new StaticContainer(); - - + container.PlayerEntity = playerEntity; container.DebugContainerBuilder = DebugUtilitiesContainer.Create(debugViewsCatalog, appArgs.HasDebugFlag()).Builder; container.EthereumApi = ethereumApi; container.ScenesCache = new ScenesCache(); container.SceneReadinessReportQueue = new SceneReadinessReportQueue(container.ScenesCache); - container.InputBlock = new ECSInputBlock(globalWorld); - container.assetsProvisioner = assetsProvisioner; + var exposedPlayerTransform = new ExposedTransform(); + container.CharacterContainer = new CharacterContainer(container.assetsProvisioner, exposedGlobalDataContainer.ExposedCameraData, exposedPlayerTransform); bool result = await InitializeContainersAsync(container, settingsContainer, ct); if (!result) - return (null, false)!; + return (null, false); StaticSettings staticSettings = settingsContainer.GetSettings<StaticSettings>(); @@ -162,7 +167,6 @@ await UniTask.WhenAll( container.QualityContainer = await QualityContainer.CreateAsync(settingsContainer, container.assetsProvisioner); container.CacheCleaner = new CacheCleaner(sharedDependencies.FrameTimeBudget); - container.ComponentsContainer = componentsContainer; container.SingletonSharedDependencies = sharedDependencies; container.Profiler = profilingProvider; @@ -170,9 +174,8 @@ await UniTask.WhenAll( container.ExposedGlobalDataContainer = exposedGlobalDataContainer; container.WebRequestsContainer = WebRequestsContainer.Create(web3IdentityProvider, container.DebugContainerBuilder); container.PhysicsTickProvider = new PhysicsTickProvider(); - container.FeatureFlagsCache = new FeatureFlagsCache(); - + container.PortableExperiencesController = new ECSPortableExperiencesController(globalWorld, web3IdentityProvider, container.WebRequestsContainer.WebRequestController, container.ScenesCache, container.FeatureFlagsCache); container.FeatureFlagsProvider = new HttpFeatureFlagsProvider(container.WebRequestsContainer.WebRequestController, container.FeatureFlagsCache); @@ -181,6 +184,12 @@ await UniTask.WhenAll( ExtendedObjectPool<Texture2D> videoTexturePool = VideoTextureFactory.CreateVideoTexturesPool(); + diagnosticsContainer.AddSentryScopeConfigurator(scope => + { + if (container.ScenesCache.CurrentScene != null) + diagnosticsContainer.Sentry!.AddCurrentSceneToScope(scope, container.ScenesCache.CurrentScene.Info); + }); + container.ECSWorldPlugins = new IDCLWorldPlugin[] { new TransformsPlugin(sharedDependencies, exposedPlayerTransform, exposedGlobalDataContainer.ExposedCameraData), @@ -195,18 +204,21 @@ await UniTask.WhenAll( new PrimitivesRenderingPlugin(sharedDependencies), new VisibilityPlugin(), new AudioSourcesPlugin(sharedDependencies, container.WebRequestsContainer.WebRequestController, container.CacheCleaner, container.assetsProvisioner), - assetBundlePlugin, new GltfContainerPlugin(sharedDependencies, container.CacheCleaner, container.SceneReadinessReportQueue, container.SingletonSharedDependencies.SceneAssetLock), + assetBundlePlugin, + new GltfContainerPlugin(sharedDependencies, container.CacheCleaner, container.SceneReadinessReportQueue, container.SingletonSharedDependencies.SceneAssetLock, localSceneDevelopment, useRemoteAssetBundles), new InteractionPlugin(sharedDependencies, profilingProvider, exposedGlobalDataContainer.GlobalInputEvents, componentsContainer.ComponentPoolsRegistry, container.assetsProvisioner), new SceneUIPlugin(sharedDependencies, container.assetsProvisioner, container.InputBlock), container.CharacterContainer.CreateWorldPlugin(componentsContainer.ComponentPoolsRegistry), new AnimatorPlugin(), new TweenPlugin(), new MediaPlayerPlugin(sharedDependencies, videoTexturePool, sharedDependencies.FrameTimeBudget, container.assetsProvisioner, container.WebRequestsContainer.WebRequestController, container.CacheCleaner), - new CharacterTriggerAreaPlugin(globalWorld, container.MainPlayerAvatarBaseProxy, exposedGlobalDataContainer.ExposedCameraData.CameraEntityProxy, container.CharacterContainer.CharacterObject, componentsContainer.ComponentPoolsRegistry, container.assetsProvisioner, container.CacheCleaner), + new CharacterTriggerAreaPlugin(globalWorld, container.MainPlayerAvatarBaseProxy, exposedGlobalDataContainer.ExposedCameraData.CameraEntityProxy, container.CharacterContainer.CharacterObject, componentsContainer.ComponentPoolsRegistry, container.assetsProvisioner, container.CacheCleaner, exposedGlobalDataContainer.ExposedCameraData), new InteractionsAudioPlugin(container.assetsProvisioner), - new MapPinPlugin(globalWorld), + new MapPinPlugin(globalWorld, container.FeatureFlagsCache), new MultiplayerPlugin(), new RealmInfoPlugin(container.RealmData, container.RoomHubProxy), + new InputModifierPlugin(globalWorld, container.PlayerEntity), + new MainCameraPlugin(componentsContainer.ComponentPoolsRegistry, container.assetsProvisioner, container.CacheCleaner, exposedGlobalDataContainer.ExposedCameraData, globalWorld), #if UNITY_EDITOR new GizmosWorldPlugin(), diff --git a/Explorer/Assets/Scripts/Global/Tests/EditMode/RealmLaunchSettingsShould.cs b/Explorer/Assets/Scripts/Global/Tests/EditMode/RealmLaunchSettingsShould.cs index af7919f701..70d4e84d69 100644 --- a/Explorer/Assets/Scripts/Global/Tests/EditMode/RealmLaunchSettingsShould.cs +++ b/Explorer/Assets/Scripts/Global/Tests/EditMode/RealmLaunchSettingsShould.cs @@ -109,5 +109,21 @@ public void IgnoreWindowsRealmInvalidation(string world) Assert.AreEqual(world, realmLaunchSettings.targetWorld); } + + [Test] + [TestCase("127.0.0.1:8000")] + [TestCase("localhost:8000")] + public void IgnoreMacOSRealmInvalidation(string realm) + { + RealmLaunchSettings realmLaunchSettings = new RealmLaunchSettings(); + ApplicationParametersParser applicationParametersParser = new (new[] + { + $"decentraland://realm=http//{realm}", // MacOS removes the ':' from the realm url param + }); + + realmLaunchSettings.ApplyConfig(applicationParametersParser); + + Assert.AreEqual($"http://{realm}", realmLaunchSettings.customRealm); + } } } diff --git a/Explorer/Assets/Scripts/Global/Tests/PlayMode/Integration Tests World Container.asset b/Explorer/Assets/Scripts/Global/Tests/PlayMode/Integration Tests World Container.asset index a28c7c4c43..33b7dcd92c 100644 --- a/Explorer/Assets/Scripts/Global/Tests/PlayMode/Integration Tests World Container.asset +++ b/Explorer/Assets/Scripts/Global/Tests/PlayMode/Integration Tests World Container.asset @@ -22,6 +22,7 @@ MonoBehaviour: - rid: 857448817791336450 - rid: 278567035285012480 - rid: 892605786557251584 + - rid: 9152013866018013188 references: version: 2 RefIds: @@ -95,16 +96,16 @@ MonoBehaviour: - rid: 6784895267130048516 type: {class: MaterialsPlugin/Settings, ns: DCL.PluginSystem.World, asm: DCL.Plugins} data: - basicMaterial: - m_AssetGUID: 0009549658aa1be40bbed401477fbd48 - m_SubObjectName: - m_SubObjectType: - m_EditorAssetChanged: 0 - pbrMaterial: - m_AssetGUID: 60d3d51407bdce5449781acd4ee86781 - m_SubObjectName: - m_SubObjectType: - m_EditorAssetChanged: 0 + basicMaterial: {fileID: 0} + pbrMaterial: {fileID: 0} <LoadingAttemptsCount>k__BackingField: 6 <PoolInitialCapacity>k__BackingField: 256 <PoolMaxSize>k__BackingField: 2048 + - rid: 9152013866018013188 + type: {class: MainCameraPlugin/Settings, ns: DCL.PluginSystem.World, asm: DCL.Plugins} + data: + VirtualCameraPrefab: + m_AssetGUID: 4f24a591312ba473ab5ac65d6658cb94 + m_SubObjectName: + m_SubObjectType: + m_EditorAssetChanged: 0 diff --git a/Explorer/Assets/Scripts/Global/Tests/PlayMode/IntegrationTestsSuite.cs b/Explorer/Assets/Scripts/Global/Tests/PlayMode/IntegrationTestsSuite.cs index 5dc4fc3dec..14a5ffd0de 100644 --- a/Explorer/Assets/Scripts/Global/Tests/PlayMode/IntegrationTestsSuite.cs +++ b/Explorer/Assets/Scripts/Global/Tests/PlayMode/IntegrationTestsSuite.cs @@ -37,15 +37,24 @@ public static class IntegrationTestsSuite IWeb3IdentityCache identityCache = new MemoryWeb3IdentityCache(); + IReportsHandlingSettings? reportSettings = Substitute.For<IReportsHandlingSettings>(); + reportSettings.IsEnabled(ReportHandler.DebugLog).Returns(true); + + var diagnosticsContainer = DiagnosticsContainer.Create(reportSettings); + (StaticContainer? staticContainer, bool success) = await StaticContainer.CreateAsync(dclUrls, assetProvisioner, Substitute.For<IReportsHandlingSettings>(), Substitute.For<IAppArgs>(), new DebugViewsCatalog(), globalSettingsContainer, + diagnosticsContainer, identityCache, Substitute.For<IEthereumApi>(), + false, + false, World.Create(), + new Entity(), ct); if (!success) diff --git a/Explorer/Assets/Scripts/MVC/MVC.asmdef b/Explorer/Assets/Scripts/MVC/MVC.asmdef index 22ded64c93..d9b8aab6dd 100644 --- a/Explorer/Assets/Scripts/MVC/MVC.asmdef +++ b/Explorer/Assets/Scripts/MVC/MVC.asmdef @@ -11,7 +11,8 @@ "GUID:029c1c1b674aaae47a6841a0b89ad80e", "GUID:275e22790c04e9b47a5085d7b0c4432a", "GUID:101b8b6ebaf64668909b49c4b7a1420d", - "GUID:a327cdd867b4c134c92b67c566c92ad7" + "GUID:a327cdd867b4c134c92b67c566c92ad7", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Explorer/Assets/Scripts/MVC/ShowCommandExtensions.cs b/Explorer/Assets/Scripts/MVC/ShowCommandExtensions.cs index f5177afd4a..86ed55ae93 100644 --- a/Explorer/Assets/Scripts/MVC/ShowCommandExtensions.cs +++ b/Explorer/Assets/Scripts/MVC/ShowCommandExtensions.cs @@ -1,6 +1,5 @@ using Cysharp.Threading.Tasks; using System.Threading; -using UnityEngine; namespace MVC { diff --git a/Explorer/Assets/Scripts/MVC/ViewBase.cs b/Explorer/Assets/Scripts/MVC/ViewBase.cs index daad50c230..f3cfd606e9 100644 --- a/Explorer/Assets/Scripts/MVC/ViewBase.cs +++ b/Explorer/Assets/Scripts/MVC/ViewBase.cs @@ -6,8 +6,6 @@ namespace MVC { - //TODO: DAVIDE?! Maybe we can extract some basic logic from ViewBase into a more generic class (UIElementBase??) and only keep in ViewBase the view specific things, - //so we can create proper class hierarchies for View/Controller based UIs and just Elements (without controllers)? public abstract class ViewBase : MonoBehaviour { public event Action? OnViewHidden; diff --git a/Explorer/Assets/Scripts/ProtobufPartialClasses/IDirtyMarker.cs b/Explorer/Assets/Scripts/ProtobufPartialClasses/IDirtyMarker.cs index ec4105088f..335e17ec63 100644 --- a/Explorer/Assets/Scripts/ProtobufPartialClasses/IDirtyMarker.cs +++ b/Explorer/Assets/Scripts/ProtobufPartialClasses/IDirtyMarker.cs @@ -77,11 +77,6 @@ public partial class PBPointerEventsResult : IDirtyMarker public bool IsDirty { get; set; } } - public partial class PBGltfContainerLoadingState : IDirtyMarker - { - public bool IsDirty { get; set; } - } - public partial class PBRaycast : IDirtyMarker { public bool IsDirty { get; set; } @@ -172,6 +167,21 @@ public partial class PBRealmInfo : IDirtyMarker public bool IsDirty { get; set; } } + public partial class PBInputModifier : IDirtyMarker + { + public bool IsDirty { get; set; } + } + + public partial class PBMainCamera : IDirtyMarker + { + public bool IsDirty { get; set; } + } + + public partial class PBVirtualCamera : IDirtyMarker + { + public bool IsDirty { get; set; } + } + public static class DirtyMarkerExtensions { [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/Explorer/Assets/Scripts/SceneRunner/ECSWorld/ECSWorldFactory.cs b/Explorer/Assets/Scripts/SceneRunner/ECSWorld/ECSWorldFactory.cs index 1f9670b6bf..69d1c8a311 100644 --- a/Explorer/Assets/Scripts/SceneRunner/ECSWorld/ECSWorldFactory.cs +++ b/Explorer/Assets/Scripts/SceneRunner/ECSWorld/ECSWorldFactory.cs @@ -55,7 +55,7 @@ public ECSWorldFacade CreateWorld(in ECSWorldFactoryArgs args) IComponentPoolsRegistry componentPoolsRegistry = singletonDependencies.ComponentPoolsRegistry; - PersistentEntities persistentEntities = CreateReservedEntities(world, sharedDependencies); + PersistentEntities persistentEntities = CreateReservedEntities(world, sharedDependencies, in args); // Create all systems and add them to the world var builder = new ArchSystemsWorldBuilder<World>(world, systemGroupsUpdateGate, systemGroupsUpdateGate, @@ -93,14 +93,15 @@ public ECSWorldFacade CreateWorld(in ECSWorldFactoryArgs args) SystemGroupWorld systemsWorld = builder.Finish(singletonDependencies.AggregateFactory, scenePartition).EnsureNotNull(); SystemGroupSnapshot.Instance!.Register(args.SceneData.SceneShortInfo.ToString(), systemsWorld); + singletonDependencies.SceneMapping.Register(args.SceneData.SceneShortInfo.Name, args.SceneData.Parcels, world); return new ECSWorldFacade(systemsWorld, world, persistentEntities, finalizeWorldSystems, isCurrentListeners); } - private static PersistentEntities CreateReservedEntities(World world, ECSWorldInstanceSharedDependencies sharedDependencies) + private static PersistentEntities CreateReservedEntities(World world, ECSWorldInstanceSharedDependencies sharedDependencies, in ECSWorldFactoryArgs worldFactoryArgs) { - Entity sceneRootEntity = world.Create(new CRDTEntity(SpecialEntitiesID.SCENE_ROOT_ENTITY), new SceneRootComponent(), RemovedComponents.CreateDefault()); + Entity sceneRootEntity = world.Create(new CRDTEntity(SpecialEntitiesID.SCENE_ROOT_ENTITY), new SceneRootComponent(), RemovedComponents.CreateDefault(), worldFactoryArgs.SceneData.SceneShortInfo); Entity playerEntity = world.Create(new CRDTEntity(SpecialEntitiesID.PLAYER_ENTITY), RemovedComponents.CreateDefault()); Entity cameraEntity = world.Create(new CRDTEntity(SpecialEntitiesID.CAMERA_ENTITY), RemovedComponents.CreateDefault()); diff --git a/Explorer/Assets/Scripts/SceneRunner/EmptyScene/EmptySceneData.cs b/Explorer/Assets/Scripts/SceneRunner/EmptyScene/EmptySceneData.cs index 4f5d92b32e..524d33a81c 100644 --- a/Explorer/Assets/Scripts/SceneRunner/EmptyScene/EmptySceneData.cs +++ b/Explorer/Assets/Scripts/SceneRunner/EmptyScene/EmptySceneData.cs @@ -55,5 +55,9 @@ public bool IsUrlDomainAllowed(string url) => public bool IsSdk7() => true; + + public bool IsPortableExperience() => + false; + } } diff --git a/Explorer/Assets/Scripts/SceneRunner/EmptyScene/EmptySceneFacade.cs b/Explorer/Assets/Scripts/SceneRunner/EmptyScene/EmptySceneFacade.cs index f0bcad07d3..024ab9d91e 100644 --- a/Explorer/Assets/Scripts/SceneRunner/EmptyScene/EmptySceneFacade.cs +++ b/Explorer/Assets/Scripts/SceneRunner/EmptyScene/EmptySceneFacade.cs @@ -5,6 +5,7 @@ using DCL.PluginSystem.World; using SceneRunner.Scene; using System; +using System.Collections.Generic; using System.Threading; using UnityEngine; using UnityEngine.Pool; @@ -25,6 +26,7 @@ private EmptySceneFacade() { } public PersistentEntities PersistentEntities => default; public bool IsEmpty => true; + public ISceneData SceneData { get; } = new EmptySceneData(new List<Vector2Int>()); public void Dispose() { diff --git a/Explorer/Assets/Scripts/SceneRunner/PortableExperienceSceneFacade.cs b/Explorer/Assets/Scripts/SceneRunner/PortableExperienceSceneFacade.cs new file mode 100644 index 0000000000..8e2f0e9e70 --- /dev/null +++ b/Explorer/Assets/Scripts/SceneRunner/PortableExperienceSceneFacade.cs @@ -0,0 +1,14 @@ +using SceneRunner.Scene; + +namespace SceneRunner +{ + public class PortableExperienceSceneFacade : SceneFacade + { + public PortableExperienceSceneFacade( + ISceneData sceneData, + SceneInstanceDependencies.WithRuntimeAndJsAPIBase deps) : base(sceneData, deps) + { + SetIsCurrent(true); + } + } +} diff --git a/Explorer/Assets/Scripts/SceneRunner/PortableExperienceSceneFacade.cs.meta b/Explorer/Assets/Scripts/SceneRunner/PortableExperienceSceneFacade.cs.meta new file mode 100644 index 0000000000..feb4649ccb --- /dev/null +++ b/Explorer/Assets/Scripts/SceneRunner/PortableExperienceSceneFacade.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c0555689ca27a52479c52f9764a66c91 +timeCreated: 1683274833 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HibridSceneHashedContent.cs b/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HybridSceneHashedContent.cs similarity index 95% rename from Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HibridSceneHashedContent.cs rename to Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HybridSceneHashedContent.cs index ea342a5d17..2fb87ca6ac 100644 --- a/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HibridSceneHashedContent.cs +++ b/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HybridSceneHashedContent.cs @@ -11,7 +11,7 @@ namespace SceneRunner.Scene { /// Used for localhost scenes that require remote asset bundle content - public class HibridSceneHashedContent : ISceneContent + public class HybridSceneHashedContent : ISceneContent { private readonly URLDomain contentBaseUrl; private Dictionary<string, string> fileToHash; @@ -30,7 +30,7 @@ public class HibridSceneHashedContent : ISceneContent "scene.json", "main.crdt" }; - public HibridSceneHashedContent(IWebRequestController webRequestController, + public HybridSceneHashedContent(IWebRequestController webRequestController, SceneEntityDefinition contentDefinitions, URLDomain contentBaseUrl, URLDomain abDomain) { @@ -38,7 +38,7 @@ public HibridSceneHashedContent(IWebRequestController webRequestController, fileToHash = new Dictionary<string, string>(contentDefinitions.content!.Count, StringComparer.OrdinalIgnoreCase); foreach (var contentDefinition in contentDefinitions.content) fileToHash[contentDefinition.file] = contentDefinition.hash; resolvedContentURLs = new Dictionary<string, (bool success, URLAddress url)>(fileToHash.Count, StringComparer.OrdinalIgnoreCase); - + this.contentBaseUrl = contentBaseUrl; this.abDomain = abDomain; this.webRequestController = webRequestController; @@ -79,7 +79,7 @@ public bool TryGetHash(string name, out string hash) return fileToHash.TryGetValue(name, out hash); } - public async UniTask GetRemoteSceneDefinitionAsync(URLDomain remoteContentDomain, string reportCategory) + public async UniTask GetRemoteSceneDefinitionAsync(URLDomain remoteContentDomain, ReportData reportCategory) { var url = remoteContentDomain.Append(URLPath.FromString(remoteSceneID)); @@ -108,7 +108,7 @@ private bool IsTexture(string contentDefinitionFile) contentDefinitionFile.EndsWith("png", StringComparison.OrdinalIgnoreCase); } - public async UniTask<bool> TryGetRemoteSceneIDAsync(URLDomain contentDomain, HybridSceneContentServer remoteContentServer, Vector2Int coordinate, string world, string reportCategory) + public async UniTask<bool> TryGetRemoteSceneIDAsync(URLDomain contentDomain, HybridSceneContentServer remoteContentServer, Vector2Int coordinate, string world, ReportData reportCategory) { IGetHash getHash; switch (remoteContentServer) @@ -137,4 +137,4 @@ public async UniTask<bool> TryGetRemoteSceneIDAsync(URLDomain contentDomain, Hyb return false; } } -} \ No newline at end of file +} diff --git a/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HibridSceneHashedContent.cs.meta b/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HybridSceneHashedContent.cs.meta similarity index 100% rename from Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HibridSceneHashedContent.cs.meta rename to Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/HybridSceneHashedContent.cs.meta diff --git a/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/IGetHash.cs b/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/IGetHash.cs index f3c0ad3f3f..3ae290712b 100644 --- a/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/IGetHash.cs +++ b/Explorer/Assets/Scripts/SceneRunner/Scene/HibridScene/IGetHash.cs @@ -12,12 +12,12 @@ namespace SceneRunner.Scene { public interface IGetHash { - UniTask<(bool, string)> TryGetHashAsync(IWebRequestController webRequestController, URLDomain contentDomain, Vector2Int coordinate, string reportCategory); + UniTask<(bool, string)> TryGetHashAsync(IWebRequestController webRequestController, URLDomain contentDomain, Vector2Int coordinate, ReportData reportCategory); } public class GetHashGoerli : IGetHash { - public async UniTask<(bool, string)> TryGetHashAsync(IWebRequestController webRequestController, URLDomain contentDomain, Vector2Int coordinate, string reportCategory) + public async UniTask<(bool, string)> TryGetHashAsync(IWebRequestController webRequestController, URLDomain contentDomain, Vector2Int coordinate, ReportData reportCategory) { try { @@ -54,7 +54,7 @@ public GetHashWorld(string world) this.world = world; } - public async UniTask<(bool, string)> TryGetHashAsync(IWebRequestController webRequestController, URLDomain contentDomain, Vector2Int coordinate, string reportCategory) + public async UniTask<(bool, string)> TryGetHashAsync(IWebRequestController webRequestController, URLDomain contentDomain, Vector2Int coordinate, ReportData reportCategory) { try { @@ -84,7 +84,7 @@ public GetHashWorld(string world) public class GetHashGenesis : IGetHash { - public async UniTask<(bool, string)> TryGetHashAsync(IWebRequestController webRequestController, URLDomain contentDomain, Vector2Int coordinate, string reportCategory) + public async UniTask<(bool, string)> TryGetHashAsync(IWebRequestController webRequestController, URLDomain contentDomain, Vector2Int coordinate, ReportData reportCategory) { try { @@ -101,4 +101,4 @@ public class GetHashGenesis : IGetHash return (false, ""); } } -} \ No newline at end of file +} diff --git a/Explorer/Assets/Scripts/SceneRunner/Scene/ISceneData.cs b/Explorer/Assets/Scripts/SceneRunner/Scene/ISceneData.cs index f0430b78cd..9264d334d4 100644 --- a/Explorer/Assets/Scripts/SceneRunner/Scene/ISceneData.cs +++ b/Explorer/Assets/Scripts/SceneRunner/Scene/ISceneData.cs @@ -59,6 +59,8 @@ public interface ISceneData bool IsSdk7(); + bool IsPortableExperience(); + class Fake : ISceneData { public bool SceneLoadingConcluded @@ -108,6 +110,9 @@ public bool IsUrlDomainAllowed(string url) => public bool IsSdk7() => true; + + public bool IsPortableExperience() => + false; } } } diff --git a/Explorer/Assets/Scripts/SceneRunner/Scene/ISceneFacade.cs b/Explorer/Assets/Scripts/SceneRunner/Scene/ISceneFacade.cs index cfea145130..35b204e5da 100644 --- a/Explorer/Assets/Scripts/SceneRunner/Scene/ISceneFacade.cs +++ b/Explorer/Assets/Scripts/SceneRunner/Scene/ISceneFacade.cs @@ -13,6 +13,7 @@ public interface ISceneFacade : IUniTaskAsyncDisposable, IDisposable ISceneStateProvider SceneStateProvider { get; } SceneEcsExecutor EcsExecutor { get; } PersistentEntities PersistentEntities { get; } + ISceneData SceneData { get; } bool IsEmpty { get; } void Initialize(); diff --git a/Explorer/Assets/Scripts/SceneRunner/Scene/SceneData.cs b/Explorer/Assets/Scripts/SceneRunner/Scene/SceneData.cs index 99ab1b9c80..2364cc5834 100644 --- a/Explorer/Assets/Scripts/SceneRunner/Scene/SceneData.cs +++ b/Explorer/Assets/Scripts/SceneRunner/Scene/SceneData.cs @@ -40,8 +40,8 @@ public SceneData( IReadOnlyList<Vector2Int> parcels, StaticSceneMessages staticSceneMessages) { - this.SceneContent = sceneContent; - this.SceneEntityDefinition = sceneDefinition; + SceneContent = sceneContent; + SceneEntityDefinition = sceneDefinition; AssetBundleManifest = assetBundleManifest; StaticSceneMessages = staticSceneMessages; Parcels = parcels; @@ -109,6 +109,9 @@ public bool IsUrlDomainAllowed(string url) return false; } + public bool IsPortableExperience() => + SceneEntityDefinition.metadata.isPortableExperience; + public bool IsSdk7() => SceneEntityDefinition.metadata.runtimeVersion == "7"; } diff --git a/Explorer/Assets/Scripts/SceneRunner/Scene/Tests/Scene.Tests.asmdef b/Explorer/Assets/Scripts/SceneRunner/Scene/Tests/Scene.Tests.asmdef index 570d9aec92..defb49f13b 100644 --- a/Explorer/Assets/Scripts/SceneRunner/Scene/Tests/Scene.Tests.asmdef +++ b/Explorer/Assets/Scripts/SceneRunner/Scene/Tests/Scene.Tests.asmdef @@ -6,7 +6,8 @@ "GUID:101b8b6ebaf64668909b49c4b7a1420d", "GUID:8322ea9340a544c59ddc56d4793eac74", "GUID:275e22790c04e9b47a5085d7b0c4432a", - "GUID:0f4c0f120707fb74497f5d581b9858f8" + "GUID:0f4c0f120707fb74497f5d581b9858f8", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5" ], "includePlatforms": [ "Editor" diff --git a/Explorer/Assets/Scripts/SceneRunner/SceneFacade.cs b/Explorer/Assets/Scripts/SceneRunner/SceneFacade.cs index 8421ff48fc..e2530d1014 100644 --- a/Explorer/Assets/Scripts/SceneRunner/SceneFacade.cs +++ b/Explorer/Assets/Scripts/SceneRunner/SceneFacade.cs @@ -22,7 +22,7 @@ public class SceneFacade : ISceneFacade public SceneEcsExecutor EcsExecutor => deps.SyncDeps.EcsExecutor; public PersistentEntities PersistentEntities => deps.SyncDeps.ECSWorldFacade.PersistentEntities; - private ISceneRuntime runtimeInstance => deps.Runtime; + internal ISceneRuntime runtimeInstance => deps.Runtime; private ISceneExceptionsHandler sceneExceptionsHandler => deps.SyncDeps.ExceptionsHandler; public ISceneData SceneData { get; } diff --git a/Explorer/Assets/Scripts/SceneRunner/SceneFactory.cs b/Explorer/Assets/Scripts/SceneRunner/SceneFactory.cs index c015124736..bf5083c399 100644 --- a/Explorer/Assets/Scripts/SceneRunner/SceneFactory.cs +++ b/Explorer/Assets/Scripts/SceneRunner/SceneFactory.cs @@ -18,6 +18,7 @@ using ECS.Prioritization.Components; using Microsoft.ClearScript; using MVC; +using PortableExperiences.Controller; using SceneRunner.ECSWorld; using SceneRunner.Scene; using SceneRuntime; @@ -50,7 +51,8 @@ public class SceneFactory : ISceneFactory private readonly ISharedPoolsProvider sharedPoolsProvider; private readonly IMVCManager mvcManager; private readonly IRealmData? realmData; - private readonly ICommunicationControllerHub messagePipesHub; + private readonly IPortableExperiencesController portableExperiencesController; + private readonly ISceneCommunicationPipe messagePipesHub; private IGlobalWorldActions globalWorldActions = null!; @@ -70,7 +72,8 @@ public SceneFactory( IWebRequestController webRequestController, IRoomHub roomHub, IRealmData? realmData, - ICommunicationControllerHub messagePipesHub) + IPortableExperiencesController portableExperiencesController, + ISceneCommunicationPipe messagePipesHub) { this.ecsWorldFactory = ecsWorldFactory; this.sceneRuntimeFactory = sceneRuntimeFactory; @@ -88,6 +91,7 @@ public SceneFactory( this.roomHub = roomHub; this.realmData = realmData; this.messagePipesHub = messagePipesHub; + this.portableExperiencesController = portableExperiencesController; } public async UniTask<ISceneFacade> CreateSceneFromFileAsync(string jsCodeUrl, IPartitionComponent partitionProvider, CancellationToken ct, string id = "") @@ -144,7 +148,7 @@ private async UniTask<ISceneFacade> CreateSceneAsync(ISceneData sceneData, IPart { var deps = new SceneInstanceDependencies(decentralandUrlsSource, sdkComponentsRegistry, entityCollidersGlobalCache, sceneData, partitionProvider, ecsWorldFactory, entityFactory); - // Try create scene runtime + // Try to create scene runtime SceneRuntimeImpl sceneRuntime; try { sceneRuntime = await sceneRuntimeFactory.CreateByPathAsync(deps.SceneCodeUrl, deps.PoolsProvider, sceneData.SceneShortInfo, ct, SceneRuntimeFactory.InstantiationBehavior.SwitchToThreadPool); } @@ -172,10 +176,10 @@ private async UniTask<ISceneFacade> CreateSceneAsync(ISceneData sceneData, IPart if (ENABLE_SDK_OBSERVABLES) { - var sdkCommsControllerAPI = new SDKMessageBusCommsAPIImplementation(sceneData, messagePipesHub, sceneRuntime, deps.SceneStateProvider); + var sdkCommsControllerAPI = new SDKMessageBusCommsAPIImplementation(realmData, sceneData, messagePipesHub, sceneRuntime, deps.SceneStateProvider); sceneRuntime.RegisterSDKMessageBusCommsApi(sdkCommsControllerAPI); - runtimeDeps = new SceneInstanceDependencies.WithRuntimeJsAndSDKObservablesEngineAPI(deps, sceneRuntime, sharedPoolsProvider, crdtSerializer, mvcManager, globalWorldActions, realmData!, messagePipesHub); + runtimeDeps = new SceneInstanceDependencies.WithRuntimeJsAndSDKObservablesEngineAPI(deps, sceneRuntime, sharedPoolsProvider, crdtSerializer, mvcManager, globalWorldActions, realmData!, messagePipesHub, portableExperiencesController); sceneRuntime.RegisterAll( (ISDKObservableEventsEngineApi)runtimeDeps.EngineAPI, @@ -195,12 +199,13 @@ private async UniTask<ISceneFacade> CreateSceneAsync(ISceneData sceneData, IPart deps.PoolsProvider, runtimeDeps.SimpleFetchApi, sceneData, - realmData! + realmData!, + portableExperiencesController ); } else { - runtimeDeps = new SceneInstanceDependencies.WithRuntimeAndJsAPI(deps, sceneRuntime, sharedPoolsProvider, crdtSerializer, mvcManager, globalWorldActions, realmData!, messagePipesHub); + runtimeDeps = new SceneInstanceDependencies.WithRuntimeAndJsAPI(deps, sceneRuntime, sharedPoolsProvider, crdtSerializer, mvcManager, globalWorldActions, realmData!, messagePipesHub, portableExperiencesController); sceneRuntime.RegisterAll( runtimeDeps.EngineAPI, @@ -219,12 +224,21 @@ private async UniTask<ISceneFacade> CreateSceneAsync(ISceneData sceneData, IPart deps.PoolsProvider, runtimeDeps.SimpleFetchApi, sceneData, - realmData! + realmData!, + portableExperiencesController ); } sceneRuntime.ExecuteSceneJson(); + if (sceneData.IsPortableExperience()) + { + return new PortableExperienceSceneFacade( + sceneData, + runtimeDeps + ); + } + return new SceneFacade( sceneData, runtimeDeps diff --git a/Explorer/Assets/Scripts/SceneRunner/SceneInstanceDeps.cs b/Explorer/Assets/Scripts/SceneRunner/SceneInstanceDeps.cs index b1348162c8..d1bdf81bbd 100644 --- a/Explorer/Assets/Scripts/SceneRunner/SceneInstanceDeps.cs +++ b/Explorer/Assets/Scripts/SceneRunner/SceneInstanceDeps.cs @@ -24,6 +24,7 @@ using ECS.Abstract; using ECS.Prioritization.Components; using MVC; +using PortableExperiences.Controller; using SceneRunner.ECSWorld; using SceneRunner.Scene; using SceneRunner.Scene.ExceptionsHandling; @@ -182,7 +183,6 @@ public void Dispose() /// </summary> public abstract class WithRuntimeAndJsAPIBase : IDisposable { - public IEngineApi EngineAPI; public readonly IRestrictedActionsAPI RestrictedActionsAPI; public readonly IRuntime RuntimeImplementation; public readonly ISceneApi SceneApiImplementation; @@ -192,6 +192,7 @@ public abstract class WithRuntimeAndJsAPIBase : IDisposable public readonly SceneInstanceDependencies SyncDeps; public readonly ISceneRuntime Runtime; + public IEngineApi EngineAPI; /// <summary> /// For Unit Tests only @@ -226,15 +227,15 @@ protected WithRuntimeAndJsAPIBase( IMVCManager mvcManager, IGlobalWorldActions globalWorldActions, IRealmData realmData, - ICommunicationControllerHub messagePipesHub) + ISceneCommunicationPipe messagePipesHub) : this( engineApi, new RestrictedActionsAPIImplementation(mvcManager, syncDeps.ecsWorldSharedDependencies.SceneStateProvider, globalWorldActions, syncDeps.sceneData), new RuntimeImplementation(jsOperations, syncDeps.sceneData, syncDeps.worldTimeProvider, realmData), new SceneApiImplementation(syncDeps.sceneData), new ClientWebSocketApiImplementation(syncDeps.PoolsProvider, jsOperations), - new LogSimpleFetchApi(new SimpleFetchApiImplementation()), - new CommunicationsControllerAPIImplementation(syncDeps.sceneData, messagePipesHub, jsOperations, syncDeps.CRDTMemoryAllocator, syncDeps.ecsWorldSharedDependencies.SceneStateProvider), + new LogSimpleFetchApi(new SimpleFetchApiImplementation(syncDeps.sceneData.SceneShortInfo)), + new CommunicationsControllerAPIImplementation(realmData, syncDeps.sceneData, messagePipesHub, jsOperations, syncDeps.CRDTMemoryAllocator, syncDeps.ecsWorldSharedDependencies.SceneStateProvider), syncDeps, sceneRuntime) { } @@ -251,7 +252,7 @@ internal class WithRuntimeAndJsAPI : WithRuntimeAndJsAPIBase { public WithRuntimeAndJsAPI (SceneInstanceDependencies syncDeps, SceneRuntimeImpl sceneRuntime, ISharedPoolsProvider sharedPoolsProvider, ICRDTSerializer crdtSerializer, IMVCManager mvcManager, - IGlobalWorldActions globalWorldActions, IRealmData realmData, ICommunicationControllerHub messagePipesHub) + IGlobalWorldActions globalWorldActions, IRealmData realmData, ISceneCommunicationPipe messagePipesHub, IPortableExperiencesController portableExperiencesController) : base(new EngineAPIImplementation( sharedPoolsProvider, syncDeps.PoolsProvider, @@ -270,7 +271,7 @@ internal class WithRuntimeJsAndSDKObservablesEngineAPI : WithRuntimeAndJsAPIBase { public WithRuntimeJsAndSDKObservablesEngineAPI (SceneInstanceDependencies syncDeps, SceneRuntimeImpl sceneRuntime, ISharedPoolsProvider sharedPoolsProvider, ICRDTSerializer crdtSerializer, IMVCManager mvcManager, - IGlobalWorldActions globalWorldActions, IRealmData realmData, ICommunicationControllerHub messagePipesHub) + IGlobalWorldActions globalWorldActions, IRealmData realmData, ISceneCommunicationPipe messagePipesHub, IPortableExperiencesController portableExperiencesController) : base(new SDKObservableEventsEngineAPIImplementation( sharedPoolsProvider, syncDeps.PoolsProvider, diff --git a/Explorer/Assets/Scripts/SceneRunner/Tests/SceneFacadeShould.cs b/Explorer/Assets/Scripts/SceneRunner/Tests/SceneFacadeShould.cs index 089f5b5122..65b25ba261 100644 --- a/Explorer/Assets/Scripts/SceneRunner/Tests/SceneFacadeShould.cs +++ b/Explorer/Assets/Scripts/SceneRunner/Tests/SceneFacadeShould.cs @@ -33,6 +33,7 @@ using MVC; using NSubstitute; using NUnit.Framework; +using PortableExperiences.Controller; using SceneRunner.ECSWorld; using SceneRunner.Scene; using SceneRunner.Scene.ExceptionsHandling; @@ -42,6 +43,7 @@ using SceneRuntime.Apis.Modules.CommunicationsControllerApi; using SceneRuntime.Apis.Modules.EngineApi; using SceneRuntime.Apis.Modules.FetchApi; +using SceneRuntime.Apis.Modules.PortableExperiencesApi; using SceneRuntime.Apis.Modules.RestrictedActionsApi; using SceneRuntime.Apis.Modules.Runtime; using SceneRuntime.Apis.Modules.SceneApi; @@ -106,7 +108,8 @@ public void SetUp() IWebRequestController.DEFAULT, new IRoomHub.Fake(), Substitute.For<IRealmData>(), - Substitute.For<ICommunicationControllerHub>() + Substitute.For<IPortableExperiencesController>(), + Substitute.For<ISceneCommunicationPipe>() ); } @@ -255,7 +258,7 @@ public async Task DisposeEverythingOnce() var apis = new List<IJsApiWrapper>(); - var runtime = sceneFacade.deps.Runtime; + ISceneRuntime runtime = sceneFacade.deps.Runtime; runtime.When(r => r.Register(Arg.Any<string>(), Arg.Any<IJsApiWrapper>())) .Do(info => apis.Add(info.ArgAt<IJsApiWrapper>(1))); diff --git a/Explorer/Assets/Scripts/SceneRunner/Tests/SceneFactoryShould.cs b/Explorer/Assets/Scripts/SceneRunner/Tests/SceneFactoryShould.cs index 94811976e8..d218c68da2 100644 --- a/Explorer/Assets/Scripts/SceneRunner/Tests/SceneFactoryShould.cs +++ b/Explorer/Assets/Scripts/SceneRunner/Tests/SceneFactoryShould.cs @@ -18,6 +18,7 @@ using MVC; using NSubstitute; using NUnit.Framework; +using PortableExperiences.Controller; using SceneRunner.ECSWorld; using SceneRunner.Scene; using SceneRunner.Tests.TestUtils; @@ -66,7 +67,8 @@ public void SetUp() IWebRequestController.DEFAULT, new IRoomHub.Fake(), Substitute.For<IRealmData>(), - Substitute.For<ICommunicationControllerHub>() + Substitute.For<IPortableExperiencesController>(), + Substitute.For<ISceneCommunicationPipe>() ); } diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/CommunicationsControllerApi/SDKMessageBus/ISDKMessageBusCommsControllerAPI.cs b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/CommunicationsControllerApi/SDKMessageBus/ISDKMessageBusCommsControllerAPI.cs index 607c6f4663..22e603cc0e 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/CommunicationsControllerApi/SDKMessageBus/ISDKMessageBusCommsControllerAPI.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/CommunicationsControllerApi/SDKMessageBus/ISDKMessageBusCommsControllerAPI.cs @@ -5,8 +5,10 @@ namespace SceneRuntime.Apis.Modules.CommunicationsControllerApi.SDKMessageBus { public interface ISDKMessageBusCommsControllerAPI : ICommunicationsControllerAPI { - List<CommsPayload> SceneCommsMessages { get; } + IReadOnlyList<CommsPayload> SceneCommsMessages { get; } + + void ClearMessages(); + void Send(string data); } } - diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/EngineApiWrapper.cs b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/EngineApiWrapper.cs index 4640b051c6..d12180cb9e 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/EngineApiWrapper.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/EngineApiWrapper.cs @@ -70,7 +70,7 @@ public ScriptableByteArray CrdtGetState() } [UsedImplicitly] - public virtual ScriptableSDKObservableEventArray SendBatch() => null; + public virtual ScriptableSDKObservableEventArray? SendBatch() => null; public void SetIsDisposing() { diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/SDKObservableEvents.cs b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/SDKObservableEvents.cs index eec1c7b038..60cebdf524 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/SDKObservableEvents.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/SDKObservableEvents.cs @@ -23,7 +23,7 @@ public static class SDKObservableEventIds public static class SDKObservableComponentIDs { - public static readonly HashSet<int> Ids = new HashSet<int>() + public static readonly HashSet<int> Ids = new () { ComponentID.ENGINE_INFO, ComponentID.REALM_INFO, @@ -36,7 +36,8 @@ public static class SDKObservableComponentIDs public static class SDKObservableUtils { - public static SDKObservableEvent GenerateSDKObservableEvent<T>(string eventId, T eventData) where T: struct => + [Pure] + public static SDKObservableEvent NewSDKObservableEventFromData<T>(string eventId, T eventData) where T: struct => new() { generic = new SDKObservableEvent.Generic diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/csc.rsp b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/csc.rsp new file mode 100644 index 0000000000..dcc377f897 --- /dev/null +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/csc.rsp @@ -0,0 +1 @@ +-nullable:enable \ No newline at end of file diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/csc.rsp.meta b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/csc.rsp.meta new file mode 100644 index 0000000000..5c40482ec3 --- /dev/null +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/Events/csc.rsp.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fef9356f984142499901a80d57c6c545 +timeCreated: 1724764750 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/ISDKObservableEventsEngineApi.cs b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/ISDKObservableEventsEngineApi.cs index 17b4ebf383..07b1bf30b9 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/ISDKObservableEventsEngineApi.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/ISDKObservableEventsEngineApi.cs @@ -1,14 +1,22 @@ using CrdtEcsBridge.PoolsProviders; using SceneRuntime.Apis.Modules.EngineApi.SDKObservableEvents.Events; -using System.Collections.Generic; namespace SceneRuntime.Apis.Modules.EngineApi.SDKObservableEvents { public interface ISDKObservableEventsEngineApi : IEngineApi { - List<SDKObservableEvent> SdkObservableEvents { get; } - HashSet<string> SdkObservableEventSubscriptions { get; } + void AddSDKObservableEvent(SDKObservableEvent sdkObservableEvent); + + void ClearSDKObservableEvents(); + PoolableSDKObservableEventArray? ConsumeSDKObservableEvents(); - bool EnableSDKObservableMessagesDetection { set; } + + void TryAddSubscription(string eventId); + + void RemoveSubscriptionIfExists(string eventId); + + bool HasSubscription(string eventId); + + bool IsAnySubscription(); } } diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/SDKObservableEventsEngineApiWrapper.cs b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/SDKObservableEventsEngineApiWrapper.cs index fe111d6f72..ed1b76aa37 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/SDKObservableEventsEngineApiWrapper.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/EngineApi/SDKObservableEvents/SDKObservableEventsEngineApiWrapper.cs @@ -1,5 +1,4 @@ using CrdtEcsBridge.PoolsProviders; -using DCL.Diagnostics; using JetBrains.Annotations; using SceneRunner.Scene.ExceptionsHandling; using SceneRuntime.Apis.Modules.CommunicationsControllerApi.SDKMessageBus; @@ -24,10 +23,10 @@ public SDKObservableEventsEngineApiWrapper(ISDKObservableEventsEngineApi api, IS public override ScriptableSDKObservableEventArray? SendBatch() { // If there are no subscriptions at all there is nothing to handle - if (engineApi.SdkObservableEventSubscriptions.Count == 0) + if (engineApi.IsAnySubscription() == false) { - engineApi.SdkObservableEvents.Clear(); - commsApi.SceneCommsMessages.Clear(); + engineApi.ClearSDKObservableEvents(); + commsApi.ClearMessages(); return null; } @@ -50,35 +49,27 @@ public SDKObservableEventsEngineApiWrapper(ISDKObservableEventsEngineApi api, IS private void DetectSceneMessageBusCommsObservableEvent() { - if (!engineApi.SdkObservableEventSubscriptions.Contains(SDKObservableEventIds.Comms)) + if (!engineApi.HasSubscription(SDKObservableEventIds.Comms)) return; if (commsApi.SceneCommsMessages.Count == 0) return; foreach (CommsPayload currentPayload in commsApi.SceneCommsMessages) - engineApi.SdkObservableEvents.Add(SDKObservableUtils.GenerateSDKObservableEvent(SDKObservableEventIds.Comms, currentPayload)); + engineApi.AddSDKObservableEvent(SDKObservableUtils.NewSDKObservableEventFromData(SDKObservableEventIds.Comms, currentPayload)); - commsApi.SceneCommsMessages.Clear(); + commsApi.ClearMessages(); } [UsedImplicitly] public void SubscribeToSDKObservableEvent(string eventId) { - engineApi.SdkObservableEventSubscriptions.Add(eventId); - - if (eventId == SDKObservableEventIds.PlayerClicked) - ReportHub.LogWarning(new ReportData(ReportCategory.SDK_OBSERVABLES), "Scene subscribed to unsupported SDK Observable 'PlayerClicked'"); - else - engineApi.EnableSDKObservableMessagesDetection = true; + engineApi.TryAddSubscription(eventId); } [UsedImplicitly] public void UnsubscribeFromSDKObservableEvent(string eventId) { - engineApi.SdkObservableEventSubscriptions.Remove(eventId); - - if (engineApi.SdkObservableEventSubscriptions.Count == 0) - engineApi.EnableSDKObservableMessagesDetection = false; + engineApi.RemoveSubscriptionIfExists(eventId); } } } diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/Players/PlayersWrap.cs b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/Players/PlayersWrap.cs index 53576324d9..7fa0ad412b 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/Players/PlayersWrap.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/Players/PlayersWrap.cs @@ -67,7 +67,7 @@ public PlayerListResponse(IParticipantsHub participantsHub) foreach (string identity in identities) { Participant remote = participantsHub.RemoteParticipant(identity)!; - players.Add(new Player(remote)); + players!.Add(new Player(remote)); } playersJson = JsonConvert.SerializeObject(players); @@ -152,7 +152,7 @@ public class AvatarData public List<string> wearables; public AvatarData(Avatar avatar) : this( - avatar.BodyShape.Value!, + avatar.BodyShape.Value, ColorUtility.ToHtmlStringRGBA(avatar.EyesColor)!, ColorUtility.ToHtmlStringRGBA(avatar.HairColor)!, ColorUtility.ToHtmlStringRGBA(avatar.SkinColor)!, diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/PortableExperiencesApi.meta b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/PortableExperiencesApi.meta new file mode 100644 index 0000000000..22d6453554 --- /dev/null +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/PortableExperiencesApi.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 06e3c0a5e10945045b382d3802d61359 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/PortableExperiencesApi/PortableExperiencesApiWrapper.cs b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/PortableExperiencesApi/PortableExperiencesApiWrapper.cs new file mode 100644 index 0000000000..32cae936b8 --- /dev/null +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/PortableExperiencesApi/PortableExperiencesApiWrapper.cs @@ -0,0 +1,88 @@ +using CommunicationData.URLHelpers; +using Cysharp.Threading.Tasks; +using JetBrains.Annotations; +using Microsoft.ClearScript.JavaScript; +using PortableExperiences.Controller; +using SceneRunner.Scene; +using SceneRunner.Scene.ExceptionsHandling; +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace SceneRuntime.Apis.Modules.PortableExperiencesApi +{ + public class PortableExperiencesApiWrapper : IJsApiWrapper + { + private readonly CancellationTokenSource cancellationTokenSource; + private readonly IJavaScriptApiExceptionsHandler exceptionsHandler; + private readonly IPortableExperiencesController portableExperiencesController; + private readonly ISceneData sceneData; + + public PortableExperiencesApiWrapper(IPortableExperiencesController portableExperiencesController, IJavaScriptApiExceptionsHandler exceptionsHandler) + { + this.portableExperiencesController = portableExperiencesController; + this.exceptionsHandler = exceptionsHandler; + cancellationTokenSource = new CancellationTokenSource(); + } + + [PublicAPI("Used by StreamingAssets/Js/Modules/PortableExperiences.js")] + public object Spawn(string pid, string ens) + { + try { return SpawnAsync(new URN(pid), new ENS(ens), cancellationTokenSource.Token).ReportAndRethrowException(exceptionsHandler).ToDisconnectedPromise(); } + catch (Exception e) { return Task.FromException(e).ToPromise(); } + } + + [PublicAPI("Used by StreamingAssets/Js/Modules/PortableExperiences.js")] + public object Kill(string ens) + { + try { return KillAsync(new ENS(ens), cancellationTokenSource.Token).ReportAndRethrowException(exceptionsHandler).ToDisconnectedPromise(); } + catch (Exception e) { return Task.FromException(e).ToPromise(); } + } + + [PublicAPI("Used by StreamingAssets/Js/Modules/PortableExperiences.js")] + public object Exit() + { + try { return ExitAsync().ReportAndRethrowException(exceptionsHandler).ToDisconnectedPromise(); } + catch (Exception e) { return Task.FromException(e).ToPromise(); } + } + + [PublicAPI("Used by StreamingAssets/Js/Modules/PortableExperiences.js")] + public object GetLoadedPortableExperiences() => + GetLoadedPortableExperiences(cancellationTokenSource.Token); + + + private async UniTask<IPortableExperiencesController.SpawnResponse> SpawnAsync(URN pid, ENS ens, CancellationToken ct) + { + await UniTask.SwitchToMainThread(); + //We should check if pid is valid, if not, check if ens is valid, else, return error, for now we only support loading by ens. + return await portableExperiencesController.CreatePortableExperienceByEnsAsync(ens, ct); + } + + private async UniTask<IPortableExperiencesController.ExitResponse> KillAsync(ENS ens, CancellationToken ct) + { + await UniTask.SwitchToMainThread(); + + if (!portableExperiencesController.CanKillPortableExperience(ens)) + return new IPortableExperiencesController.ExitResponse { status = false }; + + return portableExperiencesController.UnloadPortableExperienceByEns(ens); + } + + private async UniTask<IPortableExperiencesController.ExitResponse> ExitAsync() + { + await UniTask.SwitchToMainThread(); + return portableExperiencesController.UnloadPortableExperienceByEns(new ENS(sceneData.SceneEntityDefinition.id)); + } + + private List<IPortableExperiencesController.SpawnResponse> GetLoadedPortableExperiences(CancellationToken ct) => + portableExperiencesController.GetAllPortableExperiences(); + + + public void Dispose() + { + cancellationTokenSource.Dispose(); + } + + } +} diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/PortableExperiencesApi/PortableExperiencesApiWrapper.cs.meta b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/PortableExperiencesApi/PortableExperiencesApiWrapper.cs.meta new file mode 100644 index 0000000000..4c8e228bc2 --- /dev/null +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/PortableExperiencesApi/PortableExperiencesApiWrapper.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1bd30c551ce6482f86e11920e3db071e +timeCreated: 1718917690 \ No newline at end of file diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/RestrictedActionsApi/IRestrictedActionsAPI.cs b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/RestrictedActionsApi/IRestrictedActionsAPI.cs index 6bc6f0fad9..afbaf06932 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/RestrictedActionsApi/IRestrictedActionsAPI.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/RestrictedActionsApi/IRestrictedActionsAPI.cs @@ -1,5 +1,4 @@ using Cysharp.Threading.Tasks; -using System; using System.Threading; using UnityEngine; @@ -8,11 +7,17 @@ namespace SceneRuntime.Apis.Modules.RestrictedActionsApi public interface IRestrictedActionsAPI { bool TryOpenExternalUrl(string url); + void TryMovePlayerTo(Vector3 newRelativePosition, Vector3? cameraTarget); + void TryTeleportTo(Vector2Int newCoords); + bool TryChangeRealm(string message, string realm); + void TryTriggerEmote(string predefinedEmote); + UniTask<bool> TryTriggerSceneEmoteAsync(string src, bool loop, CancellationToken ct); + bool TryOpenNftDialog(string urn); } } diff --git a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/SignedFetch/SignedFetchWrap.cs b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/SignedFetch/SignedFetchWrap.cs index 34b561e7e9..39f1ffa7c0 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/SignedFetch/SignedFetchWrap.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/Apis/Modules/SignedFetch/SignedFetchWrap.cs @@ -100,6 +100,7 @@ async UniTask<FlatFetchResponse> ExecuteRequestAsync() request.url, new FlatFetchResponse<GenericPostRequest>(), signatureMetadata, + GetReportData(), cancellationTokenSource.Token); break; @@ -112,7 +113,7 @@ async UniTask<FlatFetchResponse> ExecuteRequestAsync() headersInfo: headers, signInfo: signInfo, - reportCategory: ReportCategory.SCENE_FETCH_REQUEST); + reportCategory: GetReportData()); break; case "get": @@ -122,7 +123,7 @@ async UniTask<FlatFetchResponse> ExecuteRequestAsync() cancellationTokenSource.Token, headersInfo: headers, signInfo: signInfo, - reportCategory: ReportCategory.SCENE_FETCH_REQUEST); + reportData: GetReportData()); break; case "put": @@ -133,7 +134,7 @@ async UniTask<FlatFetchResponse> ExecuteRequestAsync() cancellationTokenSource.Token, headersInfo: headers, signInfo: signInfo, - reportCategory: ReportCategory.SCENE_FETCH_REQUEST); + reportCategory: GetReportData()); break; default: throw new Exception($"Method {method} is not supported for signed fetch"); @@ -152,6 +153,9 @@ async UniTask<FlatFetchResponse> ExecuteRequestAsync() return ExecuteRequestAsync().ToDisconnectedPromise(); } + private ReportData GetReportData() => + new (ReportCategory.SCENE_FETCH_REQUEST, sceneShortInfo: sceneData.SceneShortInfo); + public void Dispose() { cancellationTokenSource.SafeCancelAndDispose(); diff --git a/Explorer/Assets/Scripts/SceneRuntime/Factory/SceneRuntimeFactory.cs b/Explorer/Assets/Scripts/SceneRuntime/Factory/SceneRuntimeFactory.cs index 35c0318a78..65a30dda27 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/Factory/SceneRuntimeFactory.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/Factory/SceneRuntimeFactory.cs @@ -94,7 +94,7 @@ internal async UniTask<SceneRuntimeImpl> CreateBySourceCodeAsync( // Provide basic Thread Pool synchronization context SynchronizationContext.SetSynchronizationContext(new SynchronizationContext()); string wrappedSource = WrapInModuleCommonJs(jsSceneLocalSourceCode.CodeForScene(sceneShortInfo.BaseParcel) ?? sourceCode); - return new SceneRuntimeImpl(wrappedSource, pair, moduleDictionary, instancePoolsProvider, sceneShortInfo, engineFactory, activeEngines); + return new SceneRuntimeImpl(wrappedSource, pair, moduleDictionary, sceneShortInfo, engineFactory, activeEngines); } /// <summary> diff --git a/Explorer/Assets/Scripts/SceneRuntime/ISceneRuntime.cs b/Explorer/Assets/Scripts/SceneRuntime/ISceneRuntime.cs index b4f51048f4..ad660cddb7 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/ISceneRuntime.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/ISceneRuntime.cs @@ -7,6 +7,7 @@ using DCL.Web3.Identities; using DCL.WebRequests; using ECS; +using PortableExperiences.Controller; using SceneRunner.Scene; using SceneRunner.Scene.ExceptionsHandling; using SceneRuntime.Apis.Modules; @@ -17,6 +18,7 @@ using SceneRuntime.Apis.Modules.Ethereums; using SceneRuntime.Apis.Modules.FetchApi; using SceneRuntime.Apis.Modules.Players; +using SceneRuntime.Apis.Modules.PortableExperiencesApi; using SceneRuntime.Apis.Modules.RestrictedActionsApi; using SceneRuntime.Apis.Modules.Runtime; using SceneRuntime.Apis.Modules.SceneApi; @@ -63,7 +65,8 @@ public static void RegisterAll(this ISceneRuntime sceneRuntime, IInstancePoolsProvider instancePoolsProvider, ISimpleFetchApi simpleFetchApi, ISceneData sceneData, - IRealmData realmData + IRealmData realmData, + IPortableExperiencesController portableExperiencesController ) { sceneRuntime.RegisterEngineAPI(engineApi, instancePoolsProvider, exceptionsHandler); @@ -78,6 +81,7 @@ IRealmData realmData sceneRuntime.RegisterWebSocketApi(webSocketApi, exceptionsHandler); sceneRuntime.RegisterSimpleFetchApi(simpleFetchApi, webRequestController); sceneRuntime.RegisterCommunicationsControllerApi(communicationsControllerAPI, instancePoolsProvider); + sceneRuntime.RegisterPortableExperiencesApi(portableExperiencesController, exceptionsHandler); } public static void RegisterAll(this ISceneRuntime sceneRuntime, @@ -98,7 +102,8 @@ public static void RegisterAll(this ISceneRuntime sceneRuntime, IInstancePoolsProvider instancePoolsProvider, ISimpleFetchApi simpleFetchApi, ISceneData sceneData, - IRealmData realmData + IRealmData realmData, + IPortableExperiencesController portableExperiencesController ) { sceneRuntime.RegisterEngineAPI(engineApi, commsApiImplementation, instancePoolsProvider, exceptionsHandler); @@ -113,6 +118,7 @@ IRealmData realmData sceneRuntime.RegisterWebSocketApi(webSocketApi, exceptionsHandler); sceneRuntime.RegisterSimpleFetchApi(simpleFetchApi, webRequestController); sceneRuntime.RegisterCommunicationsControllerApi(communicationsControllerAPI, instancePoolsProvider); + sceneRuntime.RegisterPortableExperiencesApi(portableExperiencesController, exceptionsHandler); } internal static void RegisterEngineAPI(this ISceneRuntime sceneRuntime, IEngineApi engineApi, IInstancePoolsProvider instancePoolsProvider, ISceneExceptionsHandler sceneExceptionsHandler) @@ -194,5 +200,10 @@ public static void RegisterSDKMessageBusCommsApi(this ISceneRuntime sceneRuntime { sceneRuntime.Register("UnitySDKMessageBusCommsControllerApi", new SDKMessageBusCommsControllerAPIWrapper(api)); } + + private static void RegisterPortableExperiencesApi(this ISceneRuntime sceneRuntime, IPortableExperiencesController portableExperiencesController, ISceneExceptionsHandler sceneExceptionsHandler) + { + sceneRuntime.Register("UnityPortableExperiencesApi", new PortableExperiencesApiWrapper(portableExperiencesController, sceneExceptionsHandler)); + } } } diff --git a/Explorer/Assets/Scripts/SceneRuntime/SceneRuntime.asmdef b/Explorer/Assets/Scripts/SceneRuntime/SceneRuntime.asmdef index 76c458d512..a23ab26b68 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/SceneRuntime.asmdef +++ b/Explorer/Assets/Scripts/SceneRuntime/SceneRuntime.asmdef @@ -21,9 +21,14 @@ "GUID:0f4c0f120707fb74497f5d581b9858f8", "GUID:3c7b57a14671040bd8c549056adc04f5", "GUID:b4018cfd60a549f6ab9f20b9a5db4a56", + "GUID:45f6fff651a0a514f8edfdaf9cce45af", + "GUID:1d2c76eb8b48e0b40940e8b31a679ce1", "GUID:91cf8206af184dac8e30eb46747e9939", - "GUID:4725c02394ab4ce19f889e4e8001f989", + "GUID:f1eaef1b40a68e74cb90cbedebf57bbf", "GUID:7175400a68914a45acecc9fb068de3b8", + "GUID:3640f3c0b42946b0b8794a1ed8e06ca5", + "GUID:4725c02394ab4ce19f889e4e8001f989", + "GUID:543b8f091a5947a3880b7f2bca2358bd", "GUID:ca4e81cdd6a34d1aa54c32ad41fc5b3b" ], "includePlatforms": [], diff --git a/Explorer/Assets/Scripts/SceneRuntime/SceneRuntimeImpl.cs b/Explorer/Assets/Scripts/SceneRuntime/SceneRuntimeImpl.cs index 36f5531711..06c758e716 100644 --- a/Explorer/Assets/Scripts/SceneRuntime/SceneRuntimeImpl.cs +++ b/Explorer/Assets/Scripts/SceneRuntime/SceneRuntimeImpl.cs @@ -20,9 +20,7 @@ namespace SceneRuntime public class SceneRuntimeImpl : ISceneRuntime, IJsOperations { internal readonly V8ScriptEngine engine; - private readonly IInstancePoolsProvider instancePoolsProvider; private readonly SceneShortInfo sceneShortInfo; - private readonly V8EngineFactory engineFactory; private readonly V8ActiveEngines activeEngines; private readonly JsApiBunch jsApiBunch; @@ -38,15 +36,12 @@ public SceneRuntimeImpl( string sourceCode, (string validateCode, string jsInitCode) initCode, IReadOnlyDictionary<string, string> jsModules, - IInstancePoolsProvider instancePoolsProvider, SceneShortInfo sceneShortInfo, V8EngineFactory engineFactory, V8ActiveEngines activeEngines ) { - this.instancePoolsProvider = instancePoolsProvider; this.sceneShortInfo = sceneShortInfo; - this.engineFactory = engineFactory; this.activeEngines = activeEngines; resetableSource = new JSTaskResolverResetable(); diff --git a/Explorer/Assets/Scripts/Utility/ParcelMathHelper.cs b/Explorer/Assets/Scripts/Utility/ParcelMathHelper.cs index 003de5158e..a060e65d0d 100644 --- a/Explorer/Assets/Scripts/Utility/ParcelMathHelper.cs +++ b/Explorer/Assets/Scripts/Utility/ParcelMathHelper.cs @@ -14,7 +14,7 @@ public static class ParcelMathHelper Vector3.zero, new SceneCircumscribedPlanes(float.MinValue, float.MaxValue, float.MinValue, float.MaxValue), float.MaxValue); - public static readonly Vector3 RoadPivotDeviation = new (8, 0, 8); + public static readonly Vector3 RoadPivotDeviation = new (8, 0, 8); [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int2 ToInt2(this Vector2Int vector2Int) => @@ -119,6 +119,12 @@ public static void ParcelsInRange(Vector3 position, int loadRadius, HashSet<int2 } } + public static Vector2Int WorldToGridPosition(Vector3 worldPosition) => + new ( + (int)Mathf.Floor(worldPosition.x / PARCEL_SIZE), + (int)Mathf.Floor(worldPosition.z / PARCEL_SIZE) + ); + public static Vector2 WorldToGridPositionUnclamped(Vector3 worldPosition) => new (worldPosition.x / PARCEL_SIZE, worldPosition.z / PARCEL_SIZE); @@ -141,6 +147,17 @@ public static bool Intersects(this in SceneCircumscribedPlanes boundingPlanes, B && boundingPlanes.MinZ < min.z && boundingPlanes.MaxZ > max.z; } + /// <summary> + /// Checks whether a point is contained in the XZ projection of the bounding box of a scene. + /// </summary> + /// <param name="boundingPlanes">The project bounding-box rectangle.</param> + /// <param name="point">The point to check.</param> + /// <returns>True if the point intersects the rectangle; False otherwise.</returns> + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool Intersects(this in SceneCircumscribedPlanes boundingPlanes, Vector3 point) => + boundingPlanes.MinX < point.x && boundingPlanes.MaxX > point.x + && boundingPlanes.MinZ < point.z && boundingPlanes.MaxZ > point.z; + public readonly struct ParcelCorners { public readonly Vector3 minXZ; diff --git a/Explorer/Assets/Scripts/Utility/PlatformUtils.cs b/Explorer/Assets/Scripts/Utility/PlatformUtils.cs index ad4a17be30..22beef7445 100644 --- a/Explorer/Assets/Scripts/Utility/PlatformUtils.cs +++ b/Explorer/Assets/Scripts/Utility/PlatformUtils.cs @@ -4,17 +4,17 @@ namespace Utility { public static class PlatformUtils { - private static string platformSuffix; + private static string? platformSuffix; - public static string GetPlatform() + public static string GetCurrentPlatform() { if (platformSuffix == null) { - if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer) + if (Application.platform is RuntimePlatform.WindowsEditor or RuntimePlatform.WindowsPlayer) platformSuffix = "_windows"; - else if (Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.OSXPlayer) + else if (Application.platform is RuntimePlatform.OSXEditor or RuntimePlatform.OSXPlayer) platformSuffix = "_mac"; - else if (Application.platform == RuntimePlatform.LinuxPlayer) + else if (Application.platform is RuntimePlatform.LinuxEditor or RuntimePlatform.LinuxPlayer) platformSuffix = "_linux"; else platformSuffix = string.Empty; // WebGL requires no platform suffix diff --git a/Explorer/Assets/Scripts/Utility/QuaternionUtils.cs b/Explorer/Assets/Scripts/Utility/QuaternionUtils.cs index 3bb1306fbf..d15f36210e 100644 --- a/Explorer/Assets/Scripts/Utility/QuaternionUtils.cs +++ b/Explorer/Assets/Scripts/Utility/QuaternionUtils.cs @@ -26,8 +26,17 @@ public QuaternionEqualityComparer(float allowedError) this.allowedError = allowedError; } - public bool Equals(Quaternion expected, Quaternion actual) => - Mathf.Abs(Quaternion.Dot(expected, actual)) > 1.0f - allowedError; + public bool Equals(Quaternion expected, Quaternion actual) + { + //I noticed some quaternion comparisons where returning false when both quaternions where exactly the same + //that is fixed with these comparisons + if (Mathf.Approximately(expected.x, actual.x) && Mathf.Approximately(expected.y, actual.y) && + Mathf.Approximately(expected.z, actual.z) && Mathf.Approximately(expected.w, actual.w)) { return true; } + + float dot = Mathf.Abs(Quaternion.Dot(expected, actual)); + + return dot > 1.0f - allowedError; + } /// <summary> /// Serves as the default hash function. diff --git a/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_mac b/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_mac index 3983e96219..78bc0bbd62 100644 --- a/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_mac +++ b/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_mac @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c96005631bc4cf7dada00c44354f9f71fa0fe1fb87538052be42ed9298a6bec7 -size 6698496 +oid sha256:7002bf83f45b952e7367fcfb1d1abf37530a005862ac1e5c314cb1c6280cfdaa +size 34621184 diff --git a/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_mac.meta b/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_mac.meta index e771027d62..0fee42efe7 100644 --- a/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_mac.meta +++ b/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_mac.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 25a35bd02fced3e468dbe73c864669fa +guid: 45becc37f48c907408e625f1ec71bcc9 DefaultImporter: externalObjects: {} userData: diff --git a/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_windows b/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_windows index 72bdc75280..0894beade5 100644 --- a/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_windows +++ b/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_windows @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2e8426538229cada0b56916084c34d8f5578398e82c7dfd47e4b58c81f55d4a8 -size 1930288 +oid sha256:367c0808fb929c6ab25c5a1e202af0b90c6dd7134e3f1d576e69e1794ac0ace7 +size 3763952 diff --git a/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_windows.meta b/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_windows.meta index eb3f5136c7..a2cd4df7bd 100644 --- a/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_windows.meta +++ b/Explorer/Assets/StreamingAssets/AssetBundles/dcl/scene_ignore_windows.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9219884380575014fb74fc41b4c3071b +guid: 249444383d6c79f429ff78fc807d538c DefaultImporter: externalObjects: {} userData: diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests.meta b/Explorer/Assets/StreamingAssets/Js/EditorTests.meta deleted file mode 100644 index ba083cb76e..0000000000 --- a/Explorer/Assets/StreamingAssets/Js/EditorTests.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 61670ca7e2fb40c3837596a374167b1e -timeCreated: 1711698002 \ No newline at end of file diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/dist/check.html b/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/dist/check.html deleted file mode 100644 index ebea73485b..0000000000 --- a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/dist/check.html +++ /dev/null @@ -1,14 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" - content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="ie=edge"> - <title>Check - - - - - - \ No newline at end of file diff --git a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/dist/check.html.meta b/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/dist/check.html.meta deleted file mode 100644 index 58d1f7dc2b..0000000000 --- a/Explorer/Assets/StreamingAssets/Js/EditorTests/Dev/dist/check.html.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f88eb216d21a4c72a985e9c743f88d95 -timeCreated: 1711698831 \ No newline at end of file diff --git a/Explorer/Assets/StreamingAssets/Js/Modules/PortableExperiences.js b/Explorer/Assets/StreamingAssets/Js/Modules/PortableExperiences.js index 847ec2cd5e..87e4338a65 100644 --- a/Explorer/Assets/StreamingAssets/Js/Modules/PortableExperiences.js +++ b/Explorer/Assets/StreamingAssets/Js/Modules/PortableExperiences.js @@ -1,29 +1,23 @@ module.exports.spawn = async function(message) { - console.log('JSMODULE: spawn') - return { - name: "obsolete", - parentCid: 'obsolete', - pid: 'obsolete' - }; + console.log('JSMODULE: spawn'); + const response = await UnityPortableExperiencesApi.Spawn(message.pid, message.ens); + return response; } module.exports.kill = async function(message) { - console.log('JSMODULE: kill') - return { - status: false - }; + console.log('JSMODULE: kill'); + const isSuccess = await UnityPortableExperiencesApi.Kill(message.pid); + return isSuccess; } -module.exports.exit = async function(message) { - console.log('JSMODULE: exit') - return { - status: false - }; +module.exports.exit = async function() { + console.log('JSMODULE: exit'); + const isSuccess = await UnityPortableExperiencesApi.Exit(); + return isSuccess; } module.exports.getPortableExperiencesLoaded = async function(message) { - console.log('JSMODULE: getPortableExperiencesLoaded') - return { - loaded: [] - }; + console.log('JSMODULE: getPortableExperiencesLoaded'); + const pex = UnityPortableExperiencesApi.GetLoadedPortableExperiences(); + return pex; } \ No newline at end of file diff --git a/Explorer/Assets/Textures/Common/BadgeNotificationContainer.png b/Explorer/Assets/Textures/Common/BadgeNotificationContainer.png new file mode 100755 index 0000000000..fb833a3019 --- /dev/null +++ b/Explorer/Assets/Textures/Common/BadgeNotificationContainer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7038fe8547d4f878fc1ac77426a5f3a544a8a870aa6c48b1947a0b8bb8c8487a +size 4932 diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPin.png.meta b/Explorer/Assets/Textures/Common/BadgeNotificationContainer.png.meta similarity index 88% rename from Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPin.png.meta rename to Explorer/Assets/Textures/Common/BadgeNotificationContainer.png.meta index 7e0213646b..830aa14e4f 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPin.png.meta +++ b/Explorer/Assets/Textures/Common/BadgeNotificationContainer.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 5c7566955c9efe6498094fdad85a140c +guid: a380469d672e148429c84525a56a7192 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -37,24 +37,24 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 + wrapU: 0 + wrapV: 0 wrapW: 0 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 - spriteMode: 1 + spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 0 + spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 1 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 8 + textureType: 0 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -69,7 +69,7 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 64 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 @@ -99,7 +99,7 @@ TextureImporter: outline: [] physicsShape: [] bones: [] - spriteID: 5e97eb03825dee720800000000000000 + spriteID: internalID: 0 vertices: [] indices: diff --git a/Explorer/Assets/Textures/Common/BubblePeak.png b/Explorer/Assets/Textures/Common/BubblePeak.png deleted file mode 100644 index 866e708ab0..0000000000 --- a/Explorer/Assets/Textures/Common/BubblePeak.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c96822310cbcb295f48e3fb53fb8551f59a66706198748670bead5faab7bdff -size 279 diff --git a/Explorer/Assets/Textures/Common/BubblePeak.png.meta b/Explorer/Assets/Textures/Common/BubblePeak.png.meta deleted file mode 100644 index fbcf450713..0000000000 --- a/Explorer/Assets/Textures/Common/BubblePeak.png.meta +++ /dev/null @@ -1,127 +0,0 @@ -fileFormatVersion: 2 -guid: 9980c1f9f6aeb42feb90a03dfd908612 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 12 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMipmapLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 1 - wrapV: 1 - wrapW: 0 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 2 - spritePivot: {x: 0.5, y: 1} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 8 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - cookieLightType: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Server - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: 5e97eb03825dee720800000000000000 - internalID: 1537655665 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - mipmapLimitGroupName: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Explorer/Assets/Textures/Common/MenuIcn.png b/Explorer/Assets/Textures/Common/MenuIcn.png deleted file mode 100644 index dbc3b14323..0000000000 --- a/Explorer/Assets/Textures/Common/MenuIcn.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5c1303d48f535f72e539633661b04db5e64fc99cdeb5b1fc462898f33f494ce -size 399 diff --git a/Explorer/Assets/Textures/Common/NavigationIcon.png b/Explorer/Assets/Textures/Common/NavigationIcon.png new file mode 100644 index 0000000000..3410fee3b9 --- /dev/null +++ b/Explorer/Assets/Textures/Common/NavigationIcon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:936dd3cfa37a6f601ea069247d157270b0132666678bb0b96ddfef7a0dfc5afa +size 361 diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_Parcel.png.meta b/Explorer/Assets/Textures/Common/NavigationIcon.png.meta similarity index 88% rename from Explorer/Assets/DCL/MapRenderer/MapPath/Destination_Parcel.png.meta rename to Explorer/Assets/Textures/Common/NavigationIcon.png.meta index 0c28064b0f..4b649796a8 100644 --- a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_Parcel.png.meta +++ b/Explorer/Assets/Textures/Common/NavigationIcon.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: b8556772ae358f84491b602bedbc9e0c +guid: 92d3d5dff754e414b95a18fb2b9ec678 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -37,24 +37,24 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 + wrapU: 0 + wrapV: 0 wrapW: 0 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 - spriteMode: 1 + spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 0 + spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 1 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 8 + textureType: 0 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -69,7 +69,7 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 64 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 @@ -99,7 +99,7 @@ TextureImporter: outline: [] physicsShape: [] bones: [] - spriteID: 5e97eb03825dee720800000000000000 + spriteID: internalID: 0 vertices: [] indices: diff --git a/Explorer/Assets/Textures/Common/PinFullIcon.png b/Explorer/Assets/Textures/Common/PinFullIcon.png deleted file mode 100644 index 0de995e092..0000000000 --- a/Explorer/Assets/Textures/Common/PinFullIcon.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f2200b568101e6d12511675a1a11e777068ffdc972ad993915674daadc1ac56 -size 1025 diff --git a/Explorer/Assets/Textures/Common/Rays.png b/Explorer/Assets/Textures/Common/Rays.png new file mode 100755 index 0000000000..1145b22092 --- /dev/null +++ b/Explorer/Assets/Textures/Common/Rays.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d25bd7532625cfc8e4887e44584f6b646ed38c821e30a66fc163189d88090a2c +size 23481 diff --git a/Explorer/Assets/Textures/Common/PinFullIcon.png.meta b/Explorer/Assets/Textures/Common/Rays.png.meta similarity index 88% rename from Explorer/Assets/Textures/Common/PinFullIcon.png.meta rename to Explorer/Assets/Textures/Common/Rays.png.meta index be29a5e831..5b9cd1abdc 100644 --- a/Explorer/Assets/Textures/Common/PinFullIcon.png.meta +++ b/Explorer/Assets/Textures/Common/Rays.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 60eb8c8adba71cb4399ccc56421edc8d +guid: a021ec67ed908674b8d6aa4aca35d5a4 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -37,24 +37,24 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 + wrapU: 0 + wrapV: 0 wrapW: 0 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 - spriteMode: 1 + spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 0 + spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 1 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 8 + textureType: 0 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -69,7 +69,7 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 64 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 @@ -99,7 +99,7 @@ TextureImporter: outline: [] physicsShape: [] bones: [] - spriteID: 5e97eb03825dee720800000000000000 + spriteID: internalID: 0 vertices: [] indices: diff --git a/Explorer/Assets/Textures/MapPins.meta b/Explorer/Assets/Textures/MapPins.meta new file mode 100644 index 0000000000..0067ce5058 --- /dev/null +++ b/Explorer/Assets/Textures/MapPins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09a746779c8871e4ba6253075fe584bd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPinAnimationElipse.png b/Explorer/Assets/Textures/MapPins/Destination_MapPinAnimationElipse.png similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPinAnimationElipse.png rename to Explorer/Assets/Textures/MapPins/Destination_MapPinAnimationElipse.png diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPinAnimationElipse.png.meta b/Explorer/Assets/Textures/MapPins/Destination_MapPinAnimationElipse.png.meta similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/MapPath/Destination_MapPinAnimationElipse.png.meta rename to Explorer/Assets/Textures/MapPins/Destination_MapPinAnimationElipse.png.meta diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/DottedLineCircle.png b/Explorer/Assets/Textures/MapPins/DottedLineCircle.png similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/MapPath/DottedLineCircle.png rename to Explorer/Assets/Textures/MapPins/DottedLineCircle.png diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/DottedLineCircle.png.meta b/Explorer/Assets/Textures/MapPins/DottedLineCircle.png.meta similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/MapPath/DottedLineCircle.png.meta rename to Explorer/Assets/Textures/MapPins/DottedLineCircle.png.meta diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/Materials.meta b/Explorer/Assets/Textures/MapPins/Materials.meta similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/MapPath/Materials.meta rename to Explorer/Assets/Textures/MapPins/Materials.meta diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/Materials/DottedLineCircle.mat b/Explorer/Assets/Textures/MapPins/Materials/DottedLineCircle.mat similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/MapPath/Materials/DottedLineCircle.mat rename to Explorer/Assets/Textures/MapPins/Materials/DottedLineCircle.mat diff --git a/Explorer/Assets/DCL/MapRenderer/MapPath/Materials/DottedLineCircle.mat.meta b/Explorer/Assets/Textures/MapPins/Materials/DottedLineCircle.mat.meta similarity index 100% rename from Explorer/Assets/DCL/MapRenderer/MapPath/Materials/DottedLineCircle.mat.meta rename to Explorer/Assets/Textures/MapPins/Materials/DottedLineCircle.mat.meta diff --git a/Explorer/Assets/Textures/MapPins/MiniGamePin_DefaultIcon.png b/Explorer/Assets/Textures/MapPins/MiniGamePin_DefaultIcon.png new file mode 100644 index 0000000000..777c1e7806 --- /dev/null +++ b/Explorer/Assets/Textures/MapPins/MiniGamePin_DefaultIcon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57976226edfadb6513d188d270488bdb4d670600d72a6e5d3b842a965fa93615 +size 2360 diff --git a/Explorer/Assets/Textures/Common/MenuIcn.png.meta b/Explorer/Assets/Textures/MapPins/MiniGamePin_DefaultIcon.png.meta similarity index 78% rename from Explorer/Assets/Textures/Common/MenuIcn.png.meta rename to Explorer/Assets/Textures/MapPins/MiniGamePin_DefaultIcon.png.meta index 517868a603..54885c9698 100644 --- a/Explorer/Assets/Textures/Common/MenuIcn.png.meta +++ b/Explorer/Assets/Textures/MapPins/MiniGamePin_DefaultIcon.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 47266e19e364144838cb9cfcf8eb37f0 +guid: 165a169697a08114d9b11e44679f140b TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -37,24 +37,24 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 + wrapU: 0 + wrapV: 0 wrapW: 0 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 - spriteMode: 1 + spriteMode: 0 spriteExtrude: 1 - spriteMeshType: 0 + spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 0 + spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 1 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 8 + textureType: 0 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -69,19 +69,6 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 64 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -94,7 +81,7 @@ TextureImporter: androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 - buildTarget: Server + buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -112,7 +99,7 @@ TextureImporter: outline: [] physicsShape: [] bones: [] - spriteID: 5e97eb03825dee720800000000000000 + spriteID: internalID: 0 vertices: [] indices: diff --git a/Explorer/Assets/Textures/Common/DestinationGamePin.png b/Explorer/Assets/Textures/MapPins/MinigamePin_Destination.png old mode 100755 new mode 100644 similarity index 100% rename from Explorer/Assets/Textures/Common/DestinationGamePin.png rename to Explorer/Assets/Textures/MapPins/MinigamePin_Destination.png diff --git a/Explorer/Assets/Textures/Common/DestinationGamePin.png.meta b/Explorer/Assets/Textures/MapPins/MinigamePin_Destination.png.meta similarity index 100% rename from Explorer/Assets/Textures/Common/DestinationGamePin.png.meta rename to Explorer/Assets/Textures/MapPins/MinigamePin_Destination.png.meta diff --git a/Explorer/Assets/Textures/Common/DestinationPin.png b/Explorer/Assets/Textures/MapPins/ParcelPin_Destination.png old mode 100755 new mode 100644 similarity index 100% rename from Explorer/Assets/Textures/Common/DestinationPin.png rename to Explorer/Assets/Textures/MapPins/ParcelPin_Destination.png diff --git a/Explorer/Assets/Textures/Common/DestinationPin.png.meta b/Explorer/Assets/Textures/MapPins/ParcelPin_Destination.png.meta similarity index 100% rename from Explorer/Assets/Textures/Common/DestinationPin.png.meta rename to Explorer/Assets/Textures/MapPins/ParcelPin_Destination.png.meta diff --git a/Explorer/Assets/Textures/Notifications/QuestNotification.png b/Explorer/Assets/Textures/Notifications/QuestNotification.png old mode 100755 new mode 100644 index 3cad5ca623..462c8ed794 --- a/Explorer/Assets/Textures/Notifications/QuestNotification.png +++ b/Explorer/Assets/Textures/Notifications/QuestNotification.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:004b7aa08ab2932ea4c412b523c59a4f648d46788f6d2140106872c8f2dca20a -size 1639 +oid sha256:a14a1d2a3fb68419da696f69235c5364b52bf844ee87a145333faa09d119ee4d +size 1632 diff --git a/Explorer/Assets/Textures/Notifications/QuestNotification.png.meta b/Explorer/Assets/Textures/Notifications/QuestNotification.png.meta index 6a30d2db1a..75eee88dcb 100644 --- a/Explorer/Assets/Textures/Notifications/QuestNotification.png.meta +++ b/Explorer/Assets/Textures/Notifications/QuestNotification.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 51d0609124e474b04a9b42ec3746f089 +guid: 3d7bea4c322788d49a4d896e37707f33 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 12 + serializedVersion: 13 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -37,24 +37,24 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 + wrapU: 0 + wrapV: 0 wrapW: 0 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 - spriteMode: 1 + spriteMode: 0 spriteExtrude: 1 - spriteMeshType: 0 + spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 0 + spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 1 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 8 + textureType: 0 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -69,19 +69,6 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 64 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -94,7 +81,7 @@ TextureImporter: androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 - buildTarget: Server + buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -112,7 +99,7 @@ TextureImporter: outline: [] physicsShape: [] bones: [] - spriteID: 5e97eb03825dee720800000000000000 + spriteID: internalID: 0 vertices: [] indices: diff --git a/Explorer/Assets/Textures/Passport/ProgressBarContainer.png b/Explorer/Assets/Textures/Passport/ProgressBarContainer.png new file mode 100755 index 0000000000..22de9e8814 --- /dev/null +++ b/Explorer/Assets/Textures/Passport/ProgressBarContainer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57fac2a7beb60e12c3102391e6ff732c84e468ec030d12e5890017534226e95b +size 253 diff --git a/Explorer/Assets/Textures/Passport/ProgressBarContainer.png.meta b/Explorer/Assets/Textures/Passport/ProgressBarContainer.png.meta new file mode 100644 index 0000000000..0d2b0dc433 --- /dev/null +++ b/Explorer/Assets/Textures/Passport/ProgressBarContainer.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: ac1812b02251fd14491c462fccc1dc41 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/Textures/Passport/ProgressBarFill.png b/Explorer/Assets/Textures/Passport/ProgressBarFill.png new file mode 100644 index 0000000000..2ea4889983 --- /dev/null +++ b/Explorer/Assets/Textures/Passport/ProgressBarFill.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7db6a335323ade7d150d5d9447a07a2abd3bf5a25470961f3b4a35fc9bd793b +size 664 diff --git a/Explorer/Assets/Textures/Passport/ProgressBarFill.png.meta b/Explorer/Assets/Textures/Passport/ProgressBarFill.png.meta new file mode 100644 index 0000000000..187d5b5b5a --- /dev/null +++ b/Explorer/Assets/Textures/Passport/ProgressBarFill.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: cba5a7e2386c9d048a261b67d58450a2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Explorer/Assets/git-submodules/unity-shared-dependencies b/Explorer/Assets/git-submodules/unity-shared-dependencies index 18d1f00f29..1d3755347a 160000 --- a/Explorer/Assets/git-submodules/unity-shared-dependencies +++ b/Explorer/Assets/git-submodules/unity-shared-dependencies @@ -1 +1 @@ -Subproject commit 18d1f00f29a65152dda90e05351a4f8cdfe37bf0 +Subproject commit 1d3755347ab9cdc3c6739abc04fc4d82d97de806 diff --git a/Explorer/Packages/manifest.json b/Explorer/Packages/manifest.json index 2a2a804b24..b4925e34b6 100644 --- a/Explorer/Packages/manifest.json +++ b/Explorer/Packages/manifest.json @@ -4,7 +4,7 @@ "avprovideo": "git@github.com:decentraland/unity-explorer-packages.git?path=/AVProVideo", "com.arch.systemgroups": "https://github.com/mikhail-dcl/Arch.SystemGroups.git?path=/Arch.SystemGroups", "com.atteneder.draco": "4.0.2", - "com.atteneder.gltfast": "https://github.com/decentraland/unity-gltf.git", + "com.atteneder.gltfast": "https://github.com/decentraland/unity-gltf.git#dalkia-patch-1", "com.brunomikoski.animationsequencer": "0.5.4", "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", "com.decentraland.livekit-sdk": "https://github.com/decentraland/client-sdk-unity.git", diff --git a/Explorer/Packages/packages-lock.json b/Explorer/Packages/packages-lock.json index 80317f288b..cac86c045c 100644 --- a/Explorer/Packages/packages-lock.json +++ b/Explorer/Packages/packages-lock.json @@ -31,7 +31,7 @@ "url": "https://package.openupm.com" }, "com.atteneder.gltfast": { - "version": "https://github.com/decentraland/unity-gltf.git", + "version": "https://github.com/decentraland/unity-gltf.git#dalkia-patch-1", "depth": 0, "source": "git", "dependencies": { @@ -40,7 +40,7 @@ "com.unity.mathematics": "1.2.6", "com.unity.burst": "1.6.6" }, - "hash": "af15ee7336fa1759dc24953a21e253944180dfc7" + "hash": "f557997b1a4d767f0c34db3cee3888950e4d70f5" }, "com.brunomikoski.animationsequencer": { "version": "0.5.4", @@ -100,11 +100,11 @@ "depth": 0, "source": "registry", "dependencies": { - "com.unity.scriptablebuildpipeline": "1.21.24", "com.unity.modules.assetbundle": "1.0.0", - "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.scriptablebuildpipeline": "1.21.24", "com.unity.modules.unitywebrequestassetbundle": "1.0.0" }, "url": "https://packages.unity.com" @@ -158,8 +158,8 @@ "source": "registry", "dependencies": { "com.unity.burst": "1.8.4", - "com.unity.modules.unityanalytics": "1.0.0", - "com.unity.nuget.mono-cecil": "1.11.4" + "com.unity.nuget.mono-cecil": "1.11.4", + "com.unity.modules.unityanalytics": "1.0.0" }, "url": "https://packages.unity.com" }, @@ -170,25 +170,6 @@ "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.entities": { - "version": "1.0.16", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.burst": "1.8.8", - "com.unity.serialization": "3.1.1", - "com.unity.collections": "2.1.4", - "com.unity.mathematics": "1.2.6", - "com.unity.modules.assetbundle": "1.0.0", - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.test-framework.performance": "3.0.2", - "com.unity.nuget.mono-cecil": "1.11.4", - "com.unity.scriptablebuildpipeline": "1.20.2", - "com.unity.profiling.core": "1.0.2" - }, - "url": "https://packages.unity.com" - }, "com.unity.ext.nunit": { "version": "2.0.3", "depth": 1, @@ -215,8 +196,8 @@ "depth": 1, "source": "registry", "dependencies": { - "com.unity.modules.uielements": "1.0.0", - "com.unity.timeline": "1.2.18" + "com.unity.timeline": "1.2.18", + "com.unity.modules.uielements": "1.0.0" }, "url": "https://packages.unity.com" }, @@ -362,16 +343,6 @@ "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.serialization": { - "version": "3.1.1", - "depth": 1, - "source": "registry", - "dependencies": { - "com.unity.collections": "2.1.4", - "com.unity.burst": "1.7.2" - }, - "url": "https://packages.unity.com" - }, "com.unity.settings-manager": { "version": "2.0.1", "depth": 2, @@ -449,9 +420,9 @@ "depth": 0, "source": "registry", "dependencies": { + "com.unity.modules.audio": "1.0.0", "com.unity.modules.director": "1.0.0", "com.unity.modules.animation": "1.0.0", - "com.unity.modules.audio": "1.0.0", "com.unity.modules.particlesystem": "1.0.0" }, "url": "https://packages.unity.com" @@ -471,8 +442,8 @@ "depth": 0, "source": "registry", "dependencies": { - "com.unity.film-internal-utilities": "0.18.4-preview", - "com.unity.render-pipelines.core": "10.0.0" + "com.unity.render-pipelines.core": "10.0.0", + "com.unity.film-internal-utilities": "0.18.4-preview" }, "url": "https://packages.unity.com" }, diff --git a/Explorer/ProjectSettings/GraphicsSettings.asset b/Explorer/ProjectSettings/GraphicsSettings.asset index fc93512630..e701835c9e 100644 --- a/Explorer/ProjectSettings/GraphicsSettings.asset +++ b/Explorer/ProjectSettings/GraphicsSettings.asset @@ -42,9 +42,6 @@ GraphicsSettings: - {fileID: 4800000, guid: 6e9f244bbe8f40e38644cb9c55cf1a67, type: 3} m_PreloadedShaders: - {fileID: 20000000, guid: 29ff2a68595df104ab86d7589e04b702, type: 2} - - {fileID: 20000000, guid: 5108e1fd8995a4642b1032eb189390ae, type: 2} - - {fileID: 20000000, guid: 208c657bf63862c449775069ddb6a9d4, type: 2} - - {fileID: 20000000, guid: bced61a4141f5844f8f72cb24280f892, type: 2} m_PreloadShadersBatchTimeLimit: -1 m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_CustomRenderPipeline: {fileID: 11400000, guid: 362b7d6d8bc7d8a4caba9aa7515a5f6d, type: 2} diff --git a/Explorer/ProjectSettings/ProjectVersion.txt b/Explorer/ProjectSettings/ProjectVersion.txt index 44ca7915ea..094355ecbe 100644 --- a/Explorer/ProjectSettings/ProjectVersion.txt +++ b/Explorer/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2022.3.41f1 -m_EditorVersionWithRevision: 2022.3.41f1 (0f988161febf) +m_EditorVersion: 2022.3.42f1 +m_EditorVersionWithRevision: 2022.3.42f1 (2dcb6a0abc42) diff --git a/Explorer/ProjectSettings/TagManager.asset b/Explorer/ProjectSettings/TagManager.asset index 6d1320c73d..a5307ad89b 100644 --- a/Explorer/ProjectSettings/TagManager.asset +++ b/Explorer/ProjectSettings/TagManager.asset @@ -3,7 +3,8 @@ --- !u!78 &1 TagManager: serializedVersion: 2 - tags: [] + tags: + - LongRoad layers: - Default - TransparentFX diff --git a/scripts/Generate-ShaderReport.ps1 b/scripts/Generate-ShaderReport.ps1 new file mode 100644 index 0000000000..663d63cccd --- /dev/null +++ b/scripts/Generate-ShaderReport.ps1 @@ -0,0 +1,137 @@ +param( + [Parameter(Mandatory=$true)] + [string]$InputLog, + + [Parameter(Mandatory=$true)] + [string]$OutputReport +) + +function ConvertToReadableTime($seconds) { + $time = [TimeSpan]::FromSeconds($seconds) + return "{0:D2}:{1:D2}:{2:D2}" -f $time.Hours, $time.Minutes, $time.Seconds +} + +function FormatTableRow($columns, $widths) { + $row = "|" + for ($i = 0; $i -lt $columns.Count; $i++) { + $value = if ($columns[$i] -is [DateTime]) { $columns[$i].ToString("yyyy-MM-dd HH:mm:ss") } else { $columns[$i].ToString() } + $width = if ($widths -and $i -lt $widths.Count) { $widths[$i] } else { $value.Length } + $row += " {0,-$width} |" -f ($value.Substring(0, [Math]::Min($value.Length, $width)).PadRight($width)) + } + return $row +} + +$shaderData = @() +$currentShader = $null +$totalVariants = 0 +$localCacheHits = 0 +$remoteCacheHits = 0 + +Get-Content $InputLog | ForEach-Object { + if ($_ -match '\[(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z).+Compiling shader "(.+)" pass "(.+)" \((.+)\)') { + if ($currentShader) { + $shaderData += $currentShader + } + $currentShader = [PSCustomObject]@{ + StartTime = [DateTime]::ParseExact($Matches[1], "yyyy-MM-ddTHH:mm:ssZ", $null) + Name = $Matches[2] + Pass = $Matches[3] + Type = $Matches[4] + Duration = $null + Variants = 0 + } + } + elseif ($_ -match 'After scriptable stripping: (\d+)' -and $currentShader) { + $currentShader.Variants = [int]$Matches[1] + $totalVariants += $currentShader.Variants + } + elseif ($_ -match 'finished in ([\d.]+) seconds' -and $currentShader) { + $currentShader.Duration = [double]$Matches[1] + } + elseif ($_ -match 'Local cache hits (\d+)') { + $localCacheHits += [int]$Matches[1] + } + elseif ($_ -match 'remote cache hits (\d+)') { + $remoteCacheHits += [int]$Matches[1] + } +} + +if ($currentShader) { + $shaderData += $currentShader +} + +$reportContent = "Unity Shader Compilation Report`n" +$reportContent += "================================`n`n" + +$totalDuration = 0 + +foreach ($shader in $shaderData) { + $readableTime = ConvertToReadableTime($shader.Duration) + $reportContent += "Shader: $($shader.Name)`n" + $reportContent += "Pass: $($shader.Pass)`n" + $reportContent += "Type: $($shader.Type)`n" + $reportContent += "Start Time: $($shader.StartTime)`n" + $reportContent += "Duration: $readableTime`n" + $reportContent += "Variants: $($shader.Variants)`n" + $reportContent += "------------------`n" + $totalDuration += $shader.Duration +} + +$totalReadableTime = ConvertToReadableTime($totalDuration) +$reportContent += "`nTotal Compilation Time: $totalReadableTime`n`n" + +# Summary Section +$summaryContent = "Summary:`n" +$summaryContent += "--------`n" +$totalShaders = $shaderData.Count +$averageDuration = $totalDuration / $totalShaders +$top5Slowest = $shaderData | Sort-Object Duration -Descending | Select-Object -First 5 + +$summaryContent += "Total Shaders Compiled: $totalShaders`n" +$summaryContent += "Total Variants Compiled: $totalVariants`n" +$summaryContent += "Total Compilation Time: $(ConvertToReadableTime($totalDuration))`n" +$summaryContent += "Average Compilation Time: $(ConvertToReadableTime($averageDuration))`n" +$summaryContent += "Local Cache Hits: $localCacheHits`n" +$summaryContent += "Remote Cache Hits: $remoteCacheHits`n" + +# Shader types summary +$shaderTypes = $shaderData | Group-Object Type | Sort-Object Count -Descending +$summaryContent += "`nShader Types:`n" +foreach ($type in $shaderTypes) { + $summaryContent += " $($type.Name): $($type.Count) shaders`n" +} + +$summaryContent += "`nTop 5 Slowest Compilations:`n" +foreach ($shader in $top5Slowest) { + $summaryContent += " Shader: $($shader.Name)`n" + $summaryContent += " Pass: $($shader.Pass)`n" + $summaryContent += " Type: $($shader.Type)`n" + $summaryContent += " Duration: $(ConvertToReadableTime($shader.Duration))`n" + $summaryContent += " Variants: $($shader.Variants)`n" + $summaryContent += " ---`n" +} + +$tableContent = "`n" + +$columnWidths = @(30, 20, 10, 19, 10, 10) +$headerRow = FormatTableRow @("Shader", "Pass", "Type", "Start Time", "Duration", "Variants") $columnWidths +$tableContent += $headerRow + "`n" +$tableContent += "-" * ($headerRow.Length - 1) + "`n" + +foreach ($shader in $shaderData) { + $readableTime = ConvertToReadableTime($shader.Duration) + $row = FormatTableRow @($shader.Name, $shader.Pass, $shader.Type, $shader.StartTime, $readableTime, $shader.Variants) $columnWidths + $tableContent += $row + "`n" +} + +# Combine all content for the full report +$reportContent += $summaryContent + $tableContent + +# Write full report to file +$reportContent | Out-File -FilePath $OutputReport + +# Output summary and table to console +Write-Host $summaryContent +Write-Host $tableContent + +Write-Host "`nFull report generated and saved to $OutputReport" \ No newline at end of file diff --git a/scripts/cloudbuild/build.py b/scripts/cloudbuild/build.py index 72557f712b..59bc72a28d 100644 --- a/scripts/cloudbuild/build.py +++ b/scripts/cloudbuild/build.py @@ -1,4 +1,5 @@ import os +import stat import re import sys import time @@ -10,6 +11,21 @@ # Local import utils +from zipfile import ZipFile, ZipInfo + +class ZipFileWithPermissions(zipfile.ZipFile): + def _extract_member(self, member, targetpath, pwd): + if not isinstance(member, zipfile.ZipInfo): + member = self.getinfo(member) + + targetpath = super()._extract_member(member, targetpath, pwd) + + attr = member.external_attr >> 16 + if attr != 0: + os.chmod(targetpath, attr) + return targetpath + + # Define whether this is a release workflow based on IS_RELEASE_BUILD is_release_workflow = os.getenv('IS_RELEASE_BUILD', 'false').lower() == 'true' @@ -261,9 +277,9 @@ def poll_build(id): print(f'Build status is not known!: "{status}"') sys.exit(1) return False - + def download_artifact(id): - response = requests.get(f'{URL}/buildtargets/{os.getenv('TARGET')}/builds/{id}', headers=HEADERS) + response = requests.get(f'{URL}/buildtargets/{os.getenv("TARGET")}/builds/{id}', headers=HEADERS) if response.status_code != 200: print(f'Failed to get build artifacts with ID {id} with status code: {response.status_code}') @@ -279,22 +295,51 @@ def download_artifact(id): download_dir = 'build' filepath = os.path.join(download_dir, 'artifact.zip') - os.makedirs(download_dir, exist_ok=True) - print('Started downloading artifacts from Unity Cloud...') + # Print current working directory and target download directory + print(f"Current working directory: {os.getcwd()}") + print(f"Target download directory: {os.path.join(os.getcwd(), download_dir)}") + + os.makedirs(download_dir, exist_ok=True) + print(f'Started downloading artifacts from Unity Cloud to {download_dir}...') response = requests.get(artifact_url) with open(filepath, 'wb') as f: f.write(response.content) - print('Started extracting artifacts from Unity Cloud...') + print(f'Started extracting artifacts from Unity Cloud to {download_dir}...') + try: + with ZipFileWithPermissions(filepath, 'r') as zip_ref: + zip_ref.extractall(download_dir) + + # Check if this is a macOS target and verify we have the right permissions set + if 'macos' in os.getenv('TARGET', '').lower(): + explorer_path = os.path.join(download_dir, 'Decentraland.app', 'Contents', 'MacOS', 'Explorer') + if os.path.exists(explorer_path): + is_executable = os.access(explorer_path, os.X_OK) + print(f"Is Explorer executable? {'Yes' if is_executable else 'No'}") + print(f"Explorer permissions: {oct(os.stat(explorer_path).st_mode)}") + else: + print(f"Warning: Explorer executable not found at {explorer_path}") + else: + print("Not a macOS target, skipping Explorer executable check.") - with zipfile.ZipFile(filepath, 'r') as zip_ref: - zip_ref.extractall(download_dir) + except zipfile.BadZipFile as e: + print(f'Failed to unzip the artifact at {filepath}: {e}') + sys.exit(1) + except Exception as e: + print(f'An unexpected error occurred during the extraction: {e}') + sys.exit(1) os.remove(filepath) print('Artifacts ready!') + # Final check to confirm build folder exists + if os.path.exists(download_dir): + print(f"Build folder confirmed at: {os.path.join(os.getcwd(), download_dir)}") + else: + print(f"ERROR: Build folder not found at expected location: {os.path.join(os.getcwd(), download_dir)}") + def download_log(id): response = requests.get(f'{URL}/buildtargets/{os.getenv('TARGET')}/builds/{id}/log', headers=HEADERS) diff --git a/scripts/package-lock.json b/scripts/package-lock.json index 62a965def4..7b2ec02ab3 100644 --- a/scripts/package-lock.json +++ b/scripts/package-lock.json @@ -9,7 +9,8 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@dcl/protocol": "^1.0.0-10418514717.commit-6d26c2b", + "@dcl/protocol": "^1.0.0-10704143848.commit-a0c6d86", + "@dcl/sdk": "^7.5.7-10726978287.commit-bc3c487", "@protobuf-ts/protoc": "^2.8.2", "@types/fs-extra": "^11.0.1", "@types/glob": "^8.0.1", @@ -23,6 +24,11 @@ "typescript": "^4.2.3" } }, + "node_modules/@assemblyscript/loader": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz", + "integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==" + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -35,14 +41,297 @@ "node": ">=12" } }, + "node_modules/@dcl-sdk/utils": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@dcl-sdk/utils/-/utils-1.2.8.tgz", + "integrity": "sha512-IOur6rSK5vN/oUpfawW6ax6vXPeADPCB44WNudeIYEYER7kwT2akNKUCLLjR19cLo006i/dkdt6UsTQ677uMxA==" + }, + "node_modules/@dcl/asset-packs": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/@dcl/asset-packs/-/asset-packs-1.20.1.tgz", + "integrity": "sha512-BDYM1Oc2W6NCG7YqcEzjp0Teeeam0+8wztjPdzr1hJ9bMByk8VrCnBSIAchoSQWjWcgcdDIVp5AAdd6TMBpygw==", + "dependencies": { + "@dcl-sdk/utils": "^1.2.8", + "@dcl/ecs": "^7.5.6", + "@dcl/js-runtime": "7.5.2", + "mitt": "^3.0.1" + } + }, + "node_modules/@dcl/asset-packs/node_modules/@dcl/ecs": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.5.7.tgz", + "integrity": "sha512-hNDXz6FXx3x5+WHVjkQ5/CvWq9P3+Jp6uKupAplSjzf+dBTxgEH3O4tlZQ8yLg8zOu9ouXtlsxj9e0I2R7EYiw==" + }, + "node_modules/@dcl/asset-packs/node_modules/@dcl/js-runtime": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.5.2.tgz", + "integrity": "sha512-KZbxb2ONV6QlKmCer0gi/1Z0DKD6TcZZK+wfHRPlFrrIwd9ZoYRbKAqZXDChu1ZgWen2k3GwvYCEP7vyI/Ay3Q==" + }, + "node_modules/@dcl/catalyst-contracts": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@dcl/catalyst-contracts/-/catalyst-contracts-4.4.1.tgz", + "integrity": "sha512-auKNcpZUQV4u7BiL65TXGB0j+eLRVzvpE7oDd7ML0wyB4A8op9B1Ca+7JKZQLClrhj6nbyXoDT7JzFeSpkipoA==" + }, + "node_modules/@dcl/crypto": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/@dcl/crypto/-/crypto-3.4.5.tgz", + "integrity": "sha512-uneyjOAOx7pi5kabZsLmPm9kSLkCk4Cok8FUsvT+6k8RquqkjKqocvkGVOMaoWsfU6S3mkLOyaeqEKmOy4ErxA==", + "dependencies": { + "@dcl/schemas": "^9.2.0", + "eth-connect": "^6.0.3", + "ethereum-cryptography": "^1.0.3" + } + }, + "node_modules/@dcl/crypto/node_modules/@dcl/schemas": { + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-9.15.0.tgz", + "integrity": "sha512-nip5rsOcJplNfBWeImwezuHLprM0gLW03kEeqGIvT9J6HnEBTtvIwkk9+NSt7hzFKEvWGI+C23vyNWbG3nU+SQ==", + "dependencies": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" + } + }, + "node_modules/@dcl/ecs": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-V7m1i+lAF1wPtAhCUOj5O3Mx4aa2maN2gmlnqjJCrFtKrrrqi/bqY2bKfRxWTtaeSkPhdxhdN2HRTUbuN1Bi1A==" + }, + "node_modules/@dcl/ecs-math": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@dcl/ecs-math/-/ecs-math-2.0.2.tgz", + "integrity": "sha512-w01+a3mpHvxGPHepu0hAAX8OfpBSQEqBbC1+U8o+5SBSQVXHiRwt3P4cK20yM8QCgZe3enPttmpqePnjTliTig==" + }, + "node_modules/@dcl/explorer": { + "version": "1.0.164509-20240802172549.commit-fb95b9b", + "resolved": "https://registry.npmjs.org/@dcl/explorer/-/explorer-1.0.164509-20240802172549.commit-fb95b9b.tgz", + "integrity": "sha512-R+vmK+rdxjKJ7s3/1nNdefEG5tCyB1Z8VZH+s6EvV9mMwMXpiI4hFUAZ0gSCEQz9D2P7clern9E95AajWzbeIQ==" + }, + "node_modules/@dcl/hashing": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-1.1.3.tgz", + "integrity": "sha512-mU1+Q8jcFLAR1hSBOd6WcnLwvQmKIPAH8+UPf2DZUk+Ntu7jWqSOqG+PoWRlh7/gPfI/gKofeW0a+HzVUK6N/g==", + "dependencies": { + "ethereum-cryptography": "^1.0.3", + "ipfs-unixfs-importer": "^7.0.3", + "multiformats": "^9.6.3" + } + }, + "node_modules/@dcl/inspector": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/inspector/-/inspector-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-OYOW59EANPkeh+/UoGsWDEcIWKBUL8BLJDpEz5Wvp24mk2rx3EfRajVyKHFRAdiZiiv+0wbSt46mGex3Bh7sAw==", + "dependencies": { + "@dcl/asset-packs": "1.20.1", + "ts-deepmerge": "^7.0.0" + } + }, + "node_modules/@dcl/js-runtime": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-/LyxkKmYFnXnd8BlhrU+SWMXPZX8JIW+jRHcJ5rmSfibBg3oxqCt5jkTRrI4yKm1gFbDIM6PkUW+5OQtnP6E+A==" + }, + "node_modules/@dcl/linker-dapp": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@dcl/linker-dapp/-/linker-dapp-0.12.0.tgz", + "integrity": "sha512-bYxvZ2ljoBuy1KyGugakL9hCRFXjoK55qm40DSfkm5g1o7r2FVEMMVP4e1aSj7IczYrDqp1bibO0+hZF/ddeLg==" + }, + "node_modules/@dcl/mini-comms": { + "version": "1.0.1-20230216163137.commit-a4c75be", + "resolved": "https://registry.npmjs.org/@dcl/mini-comms/-/mini-comms-1.0.1-20230216163137.commit-a4c75be.tgz", + "integrity": "sha512-gRatBUHwYTk9Ko03fVnU6aIpIrPwLVUiJg67MQJ42F/9/W0SONm7SFjuOtSIwNff+Cq6my5K3rbS0itut/TH+w==", + "dependencies": { + "@dcl/crypto": "^3.3.1", + "@dcl/protocol": "^1.0.0-4177500465.commit-247c87f", + "@dcl/rpc": "^1.1.1", + "@dcl/schemas": "^6.10.0", + "@types/ws": "^8.5.3", + "@well-known-components/env-config-provider": "^1.2.0", + "@well-known-components/http-server": "^2.0.0-20230216161243.commit-bfe3f0a", + "@well-known-components/interfaces": "^1.2.0", + "@well-known-components/logger": "^3.1.2", + "@well-known-components/metrics": "^2.0.1", + "@well-known-components/pushable-channel": "^1.0.3", + "ws": "^8.12.1" + } + }, + "node_modules/@dcl/mini-comms/node_modules/@dcl/schemas": { + "version": "6.19.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-6.19.0.tgz", + "integrity": "sha512-S8lrq8L1vriVXkBzeycxppjbfgJ5XofA9pbCKdteJR+79r6Dn5oLo3t5g7RcMQDihdjWdDLbbwxlEAkPgmvc8w==", + "dependencies": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" + } + }, "node_modules/@dcl/protocol": { - "version": "1.0.0-10418514717.commit-6d26c2b", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10418514717.commit-6d26c2b.tgz", - "integrity": "sha512-xGnhHSeEufP9i7o1xvsfXdG2zZQt/Bek/GDwsly2NvZl3pUt7jIP6fiiJyCKPGmZgtisnBiUOY7r/YauPIf3HQ==", + "version": "1.0.0-10704143848.commit-a0c6d86", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10704143848.commit-a0c6d86.tgz", + "integrity": "sha512-gp6LMk/DRwGuZpK1Ra718Y+5QptLvEdW8GLxCx5TV360tLszxEpfJin5e6IBdxYIwx6dVepNOWyJDw2Y2dozWw==", + "dependencies": { + "@dcl/ts-proto": "1.154.0" + } + }, + "node_modules/@dcl/quests-client": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@dcl/quests-client/-/quests-client-1.0.3.tgz", + "integrity": "sha512-VwZbXuHsRbRcboUUlBrauuR7VQ7IQP31rWI7wNKIYfWroTH4Yw7Bby1au9JBPWPayM/zRDij4uSd9pMJtidsqw==", + "dependencies": { + "@dcl/protocol": "^1.0.0-6160718705.commit-03626d7", + "@dcl/rpc": "^1.1.2", + "@dcl/sdk": "latest", + "mitt": "^3.0.1" + } + }, + "node_modules/@dcl/quests-manager": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@dcl/quests-manager/-/quests-manager-0.1.4.tgz", + "integrity": "sha512-IPB043+NbQB3om2FlmQGmaRxTokHaSM9o3a7sEL0yJgBb60mukCpMdNXxzdIcemixfV3EhIJQ2G8HgK30XKTkA==" + }, + "node_modules/@dcl/react-ecs": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/react-ecs/-/react-ecs-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-KsCAq7nndi2dwHVOPo0RxBkrilj7s4IOcjk2WnjcORMOFBIA1cTsBxvavtYwSsm72nUEL8yfM6dU3KFEPKgZrw==", + "dependencies": { + "@dcl/ecs": "7.5.7-10726978287.commit-bc3c487", + "react": "^18.2.0", + "react-reconciler": "^0.29.0" + } + }, + "node_modules/@dcl/rpc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@dcl/rpc/-/rpc-1.1.2.tgz", + "integrity": "sha512-HgZe9umoD48ZQRaiKTss+vj/War/HjH/DBnb6pzd5fx2OMInaB1YYso3OZ4dCT/OC0AtNny8Tkb3CUJdYAvj/w==", + "dependencies": { + "mitt": "^3.0.0", + "ts-proto": "^1.146.0" + } + }, + "node_modules/@dcl/schemas": { + "version": "8.2.3-20230801124703.commit-ade94fc", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-8.2.3-20230801124703.commit-ade94fc.tgz", + "integrity": "sha512-GP8veICDcxZaxcCbsr8oT0tgOtv3OPN+LJMo3DsNPx1ABe2UhrjJGk5qETfZX5qyTtcKLNMhEMZ3SP11PbU2qg==", + "dependencies": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" + } + }, + "node_modules/@dcl/sdk": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/sdk/-/sdk-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-cCXfcQiqQJ8YorLlJzMHYPkVc0knGz/4TB3x0H/uf2UTTiXiHvw+Bn+IPK8SBdVwmn4FfQfmf4NiP1Ub1FiepA==", + "dependencies": { + "@dcl/ecs": "7.5.7-10726978287.commit-bc3c487", + "@dcl/ecs-math": "2.0.2", + "@dcl/explorer": "1.0.164509-20240802172549.commit-fb95b9b", + "@dcl/js-runtime": "7.5.7-10726978287.commit-bc3c487", + "@dcl/react-ecs": "7.5.7-10726978287.commit-bc3c487", + "@dcl/sdk-commands": "7.5.7-10726978287.commit-bc3c487", + "text-encoding": "0.7.0" + } + }, + "node_modules/@dcl/sdk-commands": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/sdk-commands/-/sdk-commands-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-WGaxmzaFpt/n7lwYCxPvcfEVm6O1/0y+jnxay1aIalaAeG6p/dgTzQf0p/Mv5ISswHg4Gv9sNkVnpXzsCFBqkg==", + "dependencies": { + "@dcl/crypto": "^3.4.4", + "@dcl/ecs": "7.5.7-10726978287.commit-bc3c487", + "@dcl/hashing": "1.1.3", + "@dcl/inspector": "7.5.7-10726978287.commit-bc3c487", + "@dcl/linker-dapp": "^0.12.0", + "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", + "@dcl/protocol": "1.0.0-10670971402.commit-227b327", + "@dcl/quests-client": "^1.0.3", + "@dcl/quests-manager": "^0.1.4", + "@dcl/rpc": "^1.1.1", + "@dcl/schemas": "^8.2.3-20230718182824.commit-356025c", + "@segment/analytics-node": "^1.1.3", + "@well-known-components/env-config-provider": "^1.2.0", + "@well-known-components/fetch-component": "^2.0.2", + "@well-known-components/http-server": "^2.0.0-20230501134558.commit-be9a25d", + "@well-known-components/logger": "^3.1.2", + "@well-known-components/metrics": "^2.0.1", + "archiver": "^5.3.1", + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "colorette": "^2.0.19", + "dcl-catalyst-client": "^21.6.1", + "esbuild": "^0.18.17", + "extract-zip": "2.0.1", + "fp-future": "^1.0.1", + "glob": "^9.3.2", + "ignore": "^5.2.4", + "node-fetch": "^2.7.0", + "open": "^8.4.0", + "portfinder": "^1.0.32", + "prompts": "^2.4.2", + "typescript": "^5.0.2", + "undici": "^5.19.1", + "uuid": "^9.0.1" + }, + "bin": { + "sdk-commands": "dist/index.js" + } + }, + "node_modules/@dcl/sdk-commands/node_modules/@dcl/protocol": { + "version": "1.0.0-10670971402.commit-227b327", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10670971402.commit-227b327.tgz", + "integrity": "sha512-fZrsia50FoCPbWIzY6aQYZolJvOYdNx4KHEBYGAEuL8d8glVFuJMLK0J+Y7YHsCjY9qW810anBAvk4u+d+i/BA==", "dependencies": { "@dcl/ts-proto": "1.154.0" } }, + "node_modules/@dcl/sdk-commands/node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" + }, + "node_modules/@dcl/sdk-commands/node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@dcl/sdk-commands/node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@dcl/sdk-commands/node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/@dcl/ts-proto": { "version": "1.154.0", "resolved": "https://registry.npmjs.org/@dcl/ts-proto/-/ts-proto-1.154.0.tgz", @@ -60,6 +349,344 @@ "protoc-gen-dcl_ts_proto": "protoc-gen-dcl_ts_proto" } }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "engines": { + "node": ">=14" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", @@ -85,6 +712,60 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@lukeed/uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@lukeed/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha512-qC72D4+CDdjGqJvkFMMEAtancHUQ7/d/tAiHf64z8MopFDmcrtbcJuerDtFceuAfQJ2pDSfCKCtbqoGBNnwg0w==", + "dependencies": { + "@lukeed/csprng": "^1.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@multiformats/base-x": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", + "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==" + }, + "node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/@protobuf-ts/protoc": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.8.2.tgz", @@ -147,6 +828,80 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "node_modules/@scure/base": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.8.tgz", + "integrity": "sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/@segment/analytics-core": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@segment/analytics-core/-/analytics-core-1.4.1.tgz", + "integrity": "sha512-kV0Pf33HnthuBOVdYNani21kYyj118Fn+9757bxqoksiXoZlYvBsFq6giNdCsKcTIE1eAMqNDq3xE1VQ0cfsHA==", + "dependencies": { + "@lukeed/uuid": "^2.0.0", + "@segment/analytics-generic-utils": "1.1.1", + "dset": "^3.1.2", + "tslib": "^2.4.1" + } + }, + "node_modules/@segment/analytics-generic-utils": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@segment/analytics-generic-utils/-/analytics-generic-utils-1.1.1.tgz", + "integrity": "sha512-THTIzBPHnvu1HYJU3fARdJ3qIkukO3zDXsmDm+kAeUks5R9CBXOQ6rPChiASVzSmwAIIo5uFIXXnCraojlq/Gw==", + "dependencies": { + "tslib": "^2.4.1" + } + }, + "node_modules/@segment/analytics-node": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@segment/analytics-node/-/analytics-node-1.3.0.tgz", + "integrity": "sha512-lRLz1WZaDokMoUe299yP5JkInc3OgJuqNNlxb6j0q22umCiq6b5iDo2gRmFn93reirIvJxWIicQsGrHd93q8GQ==", + "dependencies": { + "@lukeed/uuid": "^2.0.0", + "@segment/analytics-core": "1.4.1", + "@segment/analytics-generic-utils": "1.1.1", + "buffer": "^6.0.3", + "node-fetch": "^2.6.7", + "tslib": "^2.4.1" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -189,6 +944,11 @@ "@types/node": "*" } }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" + }, "node_modules/@types/jsonfile": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.1.tgz", @@ -197,6 +957,11 @@ "@types/node": "*" } }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -207,43 +972,356 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz", "integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==" }, + "node_modules/@types/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.0" + } + }, "node_modules/@types/object-hash": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-3.0.6.tgz", "integrity": "sha512-fOBV8C1FIu2ELinoILQ+ApxcUKz4ngq+IWUYrxSGjXzzjUALijilampwkMgEtJ+h2njAW3pi853QpzNVCHB73w==" }, - "node_modules/acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" + "node_modules/@types/ws": { + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "dependencies": { + "@types/node": "*" } }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "engines": { - "node": ">=0.4.0" + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "optional": true, + "dependencies": { + "@types/node": "*" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true + "node_modules/@well-known-components/env-config-provider": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@well-known-components/env-config-provider/-/env-config-provider-1.2.0.tgz", + "integrity": "sha512-QYDL9Uk1zEs5Q4ymgeZo1GVzuHe9Pp/jOLPRIbhwtPOCQ2Bd9yIlUWiFoC36JpcUSIlQ7Fzh8x21v2U95q5/+Q==", + "dependencies": { + "dotenv": "^16.0.1" + }, + "peerDependencies": { + "@well-known-components/interfaces": "^1.0.0" + } }, - "node_modules/balanced-match": { + "node_modules/@well-known-components/fetch-component": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@well-known-components/fetch-component/-/fetch-component-2.0.2.tgz", + "integrity": "sha512-LdY+6n9kuyACg3fcU4qMrNhLZuG7eqPxLSqzDgQyoHKeNjlzggoUqTVJKtIyi6vjPs8pSQ/Fx1xdLuBhOKCgww==", + "dependencies": { + "@well-known-components/interfaces": "^1.4.1", + "cross-fetch": "^3.1.5" + } + }, + "node_modules/@well-known-components/http-server": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@well-known-components/http-server/-/http-server-2.1.0.tgz", + "integrity": "sha512-IHD7aLTA+9DYEchQubHDBwc4FmVEmQC+2TWbi8Tz+QlkiQdtndcuba8XHH+EwqlB5sna/EAJGZGXPxS7okcHKA==", + "dependencies": { + "@types/http-errors": "^2.0.1", + "destroy": "^1.2.0", + "fp-future": "^1.0.1", + "http-errors": "^2.0.0", + "mitt": "^3.0.0", + "node-fetch": "^2.6.9", + "on-finished": "^2.4.1", + "path-to-regexp": "^6.2.1" + } + }, + "node_modules/@well-known-components/interfaces": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@well-known-components/interfaces/-/interfaces-1.4.3.tgz", + "integrity": "sha512-roVtoOHG6uaH+nL4C0ISnAwkkopc2FLsS7fqX+roI22EdX9PAknPoImhPU8/3u6jgRAVpglX5Zj4nWZkSaXPkQ==", + "dependencies": { + "@types/node": "^20.3.1", + "@types/node-fetch": "^2.5.12", + "typed-url-params": "^1.0.1" + } + }, + "node_modules/@well-known-components/interfaces/node_modules/@types/node": { + "version": "20.16.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz", + "integrity": "sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@well-known-components/logger": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@well-known-components/logger/-/logger-3.1.3.tgz", + "integrity": "sha512-tTjD27CdfU4SVe+kPfjRbPSqdrw0Crg+M31RNejinCuMEBtEGbhYLtB1M4gn+PSTy2Oi3cI3iOdeQ1xVhMSerQ==", + "peerDependencies": { + "@well-known-components/interfaces": "^1.0.0" + } + }, + "node_modules/@well-known-components/metrics": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@well-known-components/metrics/-/metrics-2.1.0.tgz", + "integrity": "sha512-nJ3TdVMiJN2i7TtelndDtxvZERcSE7dtlmRfRV7yYZZshDZrQTC9EFH2uhmCWDWI0qnonvlq++JRSXBNJJfbvg==", + "dependencies": { + "prom-client": "^15.1.0" + } + }, + "node_modules/@well-known-components/pushable-channel": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@well-known-components/pushable-channel/-/pushable-channel-1.0.3.tgz", + "integrity": "sha512-8ibswJXQx7YfmUgzXp02xsIBTw6zrVXgNybV8asvEr1vE/0m/xmZi41+NwTcZmLCNRzsE/i+aRUzNO+oyq/g2g==", + "dependencies": { + "mitt": "^3.0.0" + } + }, + "node_modules/acorn": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "peerDependencies": { + "ajv": "^8.0.1" + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/archiver": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz", + "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", + "dependencies": { + "archiver-utils": "^2.1.0", + "async": "^3.2.4", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.1.2", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "dependencies": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/archiver-utils/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/archiver-utils/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/archiver-utils/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/archiver-utils/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/archiver-utils/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/archiver-utils/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bintrees": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.2.tgz", + "integrity": "sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==" + }, + "node_modules/bl": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "dependencies": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -252,6 +1330,48 @@ "balanced-match": "^1.0.0" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "engines": { + "node": "*" + } + }, "node_modules/case-anything": { "version": "2.1.13", "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", @@ -263,17 +1383,223 @@ "url": "https://github.com/sponsors/mesqueeb" } }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/cids/node_modules/uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/compress-commons": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz", + "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", + "dependencies": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/crc32-stream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz", + "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/dataloader": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==" }, + "node_modules/dcl-catalyst-client": { + "version": "21.7.0", + "resolved": "https://registry.npmjs.org/dcl-catalyst-client/-/dcl-catalyst-client-21.7.0.tgz", + "integrity": "sha512-10NyeYrKSh7yM5y7suLfoDeVAM9xknlvlxDBof1lJiuPYPzj5Aee8kaEDfXzVWTpfI7ssvSXhBlGVRvyd0RcJA==", + "dependencies": { + "@dcl/catalyst-contracts": "^4.4.0", + "@dcl/crypto": "^3.4.0", + "@dcl/hashing": "^3.0.0", + "@dcl/schemas": "^11.5.0", + "@well-known-components/fetch-component": "^2.0.0", + "cookie": "^0.5.0", + "cross-fetch": "^3.1.5", + "form-data": "^4.0.0" + } + }, + "node_modules/dcl-catalyst-client/node_modules/@dcl/hashing": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-3.0.4.tgz", + "integrity": "sha512-Cg+MoIOn+BYmQV2q8zSFnNYY+GldlnUazwBnfgrq3i66ZxOaZ65h01btd8OUtSAlfWG4VTNIOHDjtKqmuwJNBg==" + }, + "node_modules/dcl-catalyst-client/node_modules/@dcl/schemas": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-11.12.0.tgz", + "integrity": "sha512-L04KTucvxSnrHDAl3/rnkzhjfZ785dSSPeKarBVfzyuw41uyQ0Mh4HVFWjX9hC+f/nMpM5Adg5udlT5efmepcA==", + "dependencies": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0", + "mitt": "^3.0.1" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "engines": { + "node": ">=8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", @@ -294,6 +1620,17 @@ "node": ">=0.3.1" } }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/dprint-node": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", @@ -302,26 +1639,202 @@ "detect-libc": "^1.0.3" } }, - "node_modules/fs-extra": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz", - "integrity": "sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==", + "node_modules/dset": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.3.tgz", + "integrity": "sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "once": "^1.4.0" + } + }, + "node_modules/err-code": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", + "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==" + }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" }, "engines": { - "node": ">=14.14" + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "node_modules/eth-connect": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/eth-connect/-/eth-connect-6.2.4.tgz", + "integrity": "sha512-K0+g+pZoWkcJKKc4hwlYvaruoMBFcARoULIdf50bz/Zk9YdgFoKPjlRQWAtBgSDfxJS7AAHqg40k2Z/uQI0aNw==" }, - "node_modules/glob": { - "version": "8.1.0", + "node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "dependencies": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fp-future": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fp-future/-/fp-future-1.0.1.tgz", + "integrity": "sha512-2McmZH/KsZqlqHju9+Ox0FC7q7Knve4t6ZeKubbhAz1xpnD7hkCrP8TP5g5QbbD5bA5jBANbXf/ew4x1FjSUrw==" + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "node_modules/fs-extra": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz", + "integrity": "sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dependencies": { @@ -338,6 +1851,17 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/google-protobuf": { "version": "3.21.2", "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", @@ -348,6 +1872,69 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, + "node_modules/hamt-sharding": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hamt-sharding/-/hamt-sharding-2.0.1.tgz", + "integrity": "sha512-vnjrmdXG9dDs1m/H4iJ6z0JFI2NtgsW5keRkTcM85NGak69Mkf5PHUqBz+Xs0T4sg0ppvj9O5EGAJo40FTxmmA==", + "dependencies": { + "sparse-array": "^1.3.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=10.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/hamt-sharding/node_modules/uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "engines": { + "node": ">= 4" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -362,6 +1949,248 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/interface-ipld-format": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/interface-ipld-format/-/interface-ipld-format-1.0.1.tgz", + "integrity": "sha512-WV/ar+KQJVoQpqRDYdo7YPGYIUHJxCuOEhdvsRpzLqoOIVCqPKdMMYmsLL1nCRsF3yYNio+PAJbCKiv6drrEAg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "cids": "^1.1.6", + "multicodec": "^3.0.1", + "multihashes": "^4.0.2" + } + }, + "node_modules/ipfs-unixfs": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-4.0.3.tgz", + "integrity": "sha512-hzJ3X4vlKT8FQ3Xc4M1szaFVjsc1ZydN+E4VQ91aXxfpjFn9G2wsMo1EFdAXNq/BUnN5dgqIOMP5zRYr3DTsAw==", + "dependencies": { + "err-code": "^3.0.1", + "protobufjs": "^6.10.2" + }, + "engines": { + "node": ">=14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/ipfs-unixfs-importer": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ipfs-unixfs-importer/-/ipfs-unixfs-importer-7.0.3.tgz", + "integrity": "sha512-qeFOlD3AQtGzr90sr5Tq1Bi8pT5Nr2tSI8z310m7R4JDYgZc6J1PEZO3XZQ8l1kuGoqlAppBZuOYmPEqaHcVQQ==", + "dependencies": { + "bl": "^5.0.0", + "cids": "^1.1.5", + "err-code": "^3.0.1", + "hamt-sharding": "^2.0.0", + "ipfs-unixfs": "^4.0.3", + "ipld-dag-pb": "^0.22.2", + "it-all": "^1.0.5", + "it-batch": "^1.0.8", + "it-first": "^1.0.6", + "it-parallel-batch": "^1.0.9", + "merge-options": "^3.0.4", + "multihashing-async": "^2.1.0", + "rabin-wasm": "^0.1.4", + "uint8arrays": "^2.1.2" + }, + "engines": { + "node": ">=14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/ipfs-unixfs/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/ipfs-unixfs/node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, + "node_modules/ipld-dag-pb": { + "version": "0.22.3", + "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.22.3.tgz", + "integrity": "sha512-dfG5C5OVAR4FEP7Al2CrHWvAyIM7UhAQrjnOYOIxXGQz5NlEj6wGX0XQf6Ru6or1na6upvV3NQfstapQG8X2rg==", + "deprecated": "This module has been superseded by @ipld/dag-pb and multiformats", + "dependencies": { + "cids": "^1.0.0", + "interface-ipld-format": "^1.0.0", + "multicodec": "^3.0.1", + "multihashing-async": "^2.0.0", + "protobufjs": "^6.10.2", + "stable": "^0.1.8", + "uint8arrays": "^2.0.5" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipld-dag-pb/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/ipld-dag-pb/node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/it-all": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/it-all/-/it-all-1.0.6.tgz", + "integrity": "sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A==" + }, + "node_modules/it-batch": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/it-batch/-/it-batch-1.0.9.tgz", + "integrity": "sha512-7Q7HXewMhNFltTsAMdSz6luNhyhkhEtGGbYek/8Xb/GiqYMtwUmopE1ocPSiJKKp3rM4Dt045sNFoUu+KZGNyA==" + }, + "node_modules/it-first": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/it-first/-/it-first-1.0.7.tgz", + "integrity": "sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g==" + }, + "node_modules/it-parallel-batch": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/it-parallel-batch/-/it-parallel-batch-1.0.11.tgz", + "integrity": "sha512-UWsWHv/kqBpMRmyZJzlmZeoAMA0F3SZr08FBdbhtbe+MtoEBgr/ZUAKrnenhXCBrsopy76QjRH2K/V8kNdupbQ==", + "dependencies": { + "it-batch": "^1.0.9" + } + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -373,42 +2202,461 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "engines": { + "node": ">=6" + } + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lazystream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/lazystream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/lazystream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "node_modules/lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" + }, "node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "node_modules/merge-options": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", + "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==", + "dependencies": { + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/multicodec/node_modules/uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/multiformats": { + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz", + "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==" + }, + "node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/multihashes/node_modules/uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/multihashes/node_modules/varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + }, + "node_modules/multihashing-async": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-2.1.4.tgz", + "integrity": "sha512-sB1MiQXPSBTNRVSJc2zM157PXgDtud2nMFUEIvBrsq5Wv96sUclMRK/ecjoP1T/W61UJBqt4tCTwMkUpt2Gbzg==", + "dependencies": { + "blakejs": "^1.1.0", + "err-code": "^3.0.0", + "js-sha3": "^0.8.0", + "multihashes": "^4.0.1", + "murmurhash3js-revisited": "^3.0.0", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/multihashing-async/node_modules/uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/murmurhash3js-revisited": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz", + "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/path-to-regexp": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", + "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==" + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/portfinder": { + "version": "1.0.32", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", + "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==", + "dependencies": { + "async": "^2.6.4", + "debug": "^3.2.7", + "mkdirp": "^0.5.6" }, "engines": { - "node": ">=10" + "node": ">= 0.12.0" } }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "node_modules/portfinder/node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/portfinder/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/prom-client": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-15.1.3.tgz", + "integrity": "sha512-6ZiOBfCywsD4k1BN9IX0uZhF+tJkV8q8llP64G5Hajs4JOeVLPCwpPVcpXy3BwYiUGgyJzsJJQeOIv7+hDSq8g==", + "dependencies": { + "@opentelemetry/api": "^1.4.0", + "tdigest": "^0.1.1" + }, "engines": { - "node": ">= 6" + "node": "^16 || ^18 || >=20" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dependencies": { - "wrappy": "1" + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" } }, "node_modules/protobufjs": { @@ -445,6 +2693,255 @@ "protoc-gen-dclunity": "dist/index.js" } }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/rabin-wasm": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/rabin-wasm/-/rabin-wasm-0.1.5.tgz", + "integrity": "sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==", + "dependencies": { + "@assemblyscript/loader": "^0.9.4", + "bl": "^5.0.0", + "debug": "^4.3.1", + "minimist": "^1.2.5", + "node-fetch": "^2.6.1", + "readable-stream": "^3.6.0" + }, + "bin": { + "rabin-wasm": "cli/bin.js" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-reconciler": { + "version": "0.29.2", + "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.29.2.tgz", + "integrity": "sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + }, + "node_modules/sparse-array": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/sparse-array/-/sparse-array-1.3.2.tgz", + "integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==" + }, + "node_modules/stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility" + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/tar-stream/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/tdigest": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", + "integrity": "sha512-+G0LLgjjo9BZX2MfdvPfH+MKLCrxlXSYec5DaPYP1fe6Iyhf0/fSmJ0bFiZ1F8BT6cGXl2LpltQptzjXKWEkKA==", + "dependencies": { + "bintrees": "1.0.2" + } + }, + "node_modules/text-encoding": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz", + "integrity": "sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==", + "deprecated": "no longer maintained" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-deepmerge": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-deepmerge/-/ts-deepmerge-7.0.1.tgz", + "integrity": "sha512-JBFCmNenZdUCc+TRNCtXVM6N8y/nDQHAcpj5BlwXG/gnogjam1NunulB9ia68mnqYI446giMfpqeBFFkOleh+g==", + "engines": { + "node": ">=14.13.1" + } + }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -496,10 +2993,24 @@ "dprint-node": "^1.0.8" } }, + "node_modules/ts-proto": { + "version": "1.181.2", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.181.2.tgz", + "integrity": "sha512-knJ8dtjn2Pd0c5ZGZG8z9DMiD4PUY8iGI9T9tb8DvGdWRMkLpf0WcPO7G+7cmbZyxvNTAG6ci3fybEaFgMZIvg==", + "dependencies": { + "case-anything": "^2.1.13", + "protobufjs": "^7.2.4", + "ts-poet": "^6.7.0", + "ts-proto-descriptors": "1.16.0" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, "node_modules/ts-proto-descriptors": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz", - "integrity": "sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.16.0.tgz", + "integrity": "sha512-3yKuzMLpltdpcyQji1PJZRfoo4OJjNieKTYkQY8pF7xGKsYz/RHe3aEe4KiRxcinoBmnEhmuI+yJTxLb922ULA==", "dependencies": { "long": "^5.2.3", "protobufjs": "^7.2.4" @@ -516,6 +3027,16 @@ "protoc-gen-ts": "bin/protoc-gen-ts" } }, + "node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + }, + "node_modules/typed-url-params": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-url-params/-/typed-url-params-1.0.1.tgz", + "integrity": "sha512-762imXO+myoSDHD9+YxUfSmfT0yGH1j+3s9UJ6uqKkOYIwHH6/gsFo67ZoST0Ey/RSoaps1zGu1N+eiuuCxfeg==" + }, "node_modules/typescript": { "version": "4.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", @@ -529,6 +3050,30 @@ "node": ">=4.2.0" } }, + "node_modules/uint8arrays": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", + "integrity": "sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/undici": { + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -537,43 +3082,455 @@ "node": ">= 10.0.0" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/zip-stream": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", + "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", + "dependencies": { + "archiver-utils": "^3.0.4", + "compress-commons": "^4.1.2", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/zip-stream/node_modules/archiver-utils": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz", + "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", + "dependencies": { + "glob": "^7.2.3", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/zip-stream/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/zip-stream/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/zip-stream/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + } + }, + "dependencies": { + "@assemblyscript/loader": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz", + "integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==" + }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + } + }, + "@dcl-sdk/utils": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@dcl-sdk/utils/-/utils-1.2.8.tgz", + "integrity": "sha512-IOur6rSK5vN/oUpfawW6ax6vXPeADPCB44WNudeIYEYER7kwT2akNKUCLLjR19cLo006i/dkdt6UsTQ677uMxA==" + }, + "@dcl/asset-packs": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/@dcl/asset-packs/-/asset-packs-1.20.1.tgz", + "integrity": "sha512-BDYM1Oc2W6NCG7YqcEzjp0Teeeam0+8wztjPdzr1hJ9bMByk8VrCnBSIAchoSQWjWcgcdDIVp5AAdd6TMBpygw==", + "requires": { + "@dcl-sdk/utils": "^1.2.8", + "@dcl/ecs": "^7.5.6", + "@dcl/js-runtime": "7.5.2", + "mitt": "^3.0.1" + }, + "dependencies": { + "@dcl/ecs": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.5.7.tgz", + "integrity": "sha512-hNDXz6FXx3x5+WHVjkQ5/CvWq9P3+Jp6uKupAplSjzf+dBTxgEH3O4tlZQ8yLg8zOu9ouXtlsxj9e0I2R7EYiw==" + }, + "@dcl/js-runtime": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.5.2.tgz", + "integrity": "sha512-KZbxb2ONV6QlKmCer0gi/1Z0DKD6TcZZK+wfHRPlFrrIwd9ZoYRbKAqZXDChu1ZgWen2k3GwvYCEP7vyI/Ay3Q==" + } + } + }, + "@dcl/catalyst-contracts": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@dcl/catalyst-contracts/-/catalyst-contracts-4.4.1.tgz", + "integrity": "sha512-auKNcpZUQV4u7BiL65TXGB0j+eLRVzvpE7oDd7ML0wyB4A8op9B1Ca+7JKZQLClrhj6nbyXoDT7JzFeSpkipoA==" + }, + "@dcl/crypto": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/@dcl/crypto/-/crypto-3.4.5.tgz", + "integrity": "sha512-uneyjOAOx7pi5kabZsLmPm9kSLkCk4Cok8FUsvT+6k8RquqkjKqocvkGVOMaoWsfU6S3mkLOyaeqEKmOy4ErxA==", + "requires": { + "@dcl/schemas": "^9.2.0", + "eth-connect": "^6.0.3", + "ethereum-cryptography": "^1.0.3" + }, + "dependencies": { + "@dcl/schemas": { + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-9.15.0.tgz", + "integrity": "sha512-nip5rsOcJplNfBWeImwezuHLprM0gLW03kEeqGIvT9J6HnEBTtvIwkk9+NSt7hzFKEvWGI+C23vyNWbG3nU+SQ==", + "requires": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" + } + } + } + }, + "@dcl/ecs": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/ecs/-/ecs-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-V7m1i+lAF1wPtAhCUOj5O3Mx4aa2maN2gmlnqjJCrFtKrrrqi/bqY2bKfRxWTtaeSkPhdxhdN2HRTUbuN1Bi1A==" + }, + "@dcl/ecs-math": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@dcl/ecs-math/-/ecs-math-2.0.2.tgz", + "integrity": "sha512-w01+a3mpHvxGPHepu0hAAX8OfpBSQEqBbC1+U8o+5SBSQVXHiRwt3P4cK20yM8QCgZe3enPttmpqePnjTliTig==" + }, + "@dcl/explorer": { + "version": "1.0.164509-20240802172549.commit-fb95b9b", + "resolved": "https://registry.npmjs.org/@dcl/explorer/-/explorer-1.0.164509-20240802172549.commit-fb95b9b.tgz", + "integrity": "sha512-R+vmK+rdxjKJ7s3/1nNdefEG5tCyB1Z8VZH+s6EvV9mMwMXpiI4hFUAZ0gSCEQz9D2P7clern9E95AajWzbeIQ==" + }, + "@dcl/hashing": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-1.1.3.tgz", + "integrity": "sha512-mU1+Q8jcFLAR1hSBOd6WcnLwvQmKIPAH8+UPf2DZUk+Ntu7jWqSOqG+PoWRlh7/gPfI/gKofeW0a+HzVUK6N/g==", + "requires": { + "ethereum-cryptography": "^1.0.3", + "ipfs-unixfs-importer": "^7.0.3", + "multiformats": "^9.6.3" + } + }, + "@dcl/inspector": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/inspector/-/inspector-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-OYOW59EANPkeh+/UoGsWDEcIWKBUL8BLJDpEz5Wvp24mk2rx3EfRajVyKHFRAdiZiiv+0wbSt46mGex3Bh7sAw==", + "requires": { + "@dcl/asset-packs": "1.20.1", + "ts-deepmerge": "^7.0.0" + } + }, + "@dcl/js-runtime": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/js-runtime/-/js-runtime-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-/LyxkKmYFnXnd8BlhrU+SWMXPZX8JIW+jRHcJ5rmSfibBg3oxqCt5jkTRrI4yKm1gFbDIM6PkUW+5OQtnP6E+A==" + }, + "@dcl/linker-dapp": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@dcl/linker-dapp/-/linker-dapp-0.12.0.tgz", + "integrity": "sha512-bYxvZ2ljoBuy1KyGugakL9hCRFXjoK55qm40DSfkm5g1o7r2FVEMMVP4e1aSj7IczYrDqp1bibO0+hZF/ddeLg==" + }, + "@dcl/mini-comms": { + "version": "1.0.1-20230216163137.commit-a4c75be", + "resolved": "https://registry.npmjs.org/@dcl/mini-comms/-/mini-comms-1.0.1-20230216163137.commit-a4c75be.tgz", + "integrity": "sha512-gRatBUHwYTk9Ko03fVnU6aIpIrPwLVUiJg67MQJ42F/9/W0SONm7SFjuOtSIwNff+Cq6my5K3rbS0itut/TH+w==", + "requires": { + "@dcl/crypto": "^3.3.1", + "@dcl/protocol": "^1.0.0-4177500465.commit-247c87f", + "@dcl/rpc": "^1.1.1", + "@dcl/schemas": "^6.10.0", + "@types/ws": "^8.5.3", + "@well-known-components/env-config-provider": "^1.2.0", + "@well-known-components/http-server": "^2.0.0-20230216161243.commit-bfe3f0a", + "@well-known-components/interfaces": "^1.2.0", + "@well-known-components/logger": "^3.1.2", + "@well-known-components/metrics": "^2.0.1", + "@well-known-components/pushable-channel": "^1.0.3", + "ws": "^8.12.1" + }, + "dependencies": { + "@dcl/schemas": { + "version": "6.19.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-6.19.0.tgz", + "integrity": "sha512-S8lrq8L1vriVXkBzeycxppjbfgJ5XofA9pbCKdteJR+79r6Dn5oLo3t5g7RcMQDihdjWdDLbbwxlEAkPgmvc8w==", + "requires": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" + } + } + } + }, + "@dcl/protocol": { + "version": "1.0.0-10704143848.commit-a0c6d86", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10704143848.commit-a0c6d86.tgz", + "integrity": "sha512-gp6LMk/DRwGuZpK1Ra718Y+5QptLvEdW8GLxCx5TV360tLszxEpfJin5e6IBdxYIwx6dVepNOWyJDw2Y2dozWw==", + "requires": { + "@dcl/ts-proto": "1.154.0" + } + }, + "@dcl/quests-client": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@dcl/quests-client/-/quests-client-1.0.3.tgz", + "integrity": "sha512-VwZbXuHsRbRcboUUlBrauuR7VQ7IQP31rWI7wNKIYfWroTH4Yw7Bby1au9JBPWPayM/zRDij4uSd9pMJtidsqw==", + "requires": { + "@dcl/protocol": "^1.0.0-6160718705.commit-03626d7", + "@dcl/rpc": "^1.1.2", + "@dcl/sdk": "latest", + "mitt": "^3.0.1" + } + }, + "@dcl/quests-manager": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@dcl/quests-manager/-/quests-manager-0.1.4.tgz", + "integrity": "sha512-IPB043+NbQB3om2FlmQGmaRxTokHaSM9o3a7sEL0yJgBb60mukCpMdNXxzdIcemixfV3EhIJQ2G8HgK30XKTkA==" }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "@dcl/react-ecs": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/react-ecs/-/react-ecs-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-KsCAq7nndi2dwHVOPo0RxBkrilj7s4IOcjk2WnjcORMOFBIA1cTsBxvavtYwSsm72nUEL8yfM6dU3KFEPKgZrw==", + "requires": { + "@dcl/ecs": "7.5.7-10726978287.commit-bc3c487", + "react": "^18.2.0", + "react-reconciler": "^0.29.0" + } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" + "@dcl/rpc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@dcl/rpc/-/rpc-1.1.2.tgz", + "integrity": "sha512-HgZe9umoD48ZQRaiKTss+vj/War/HjH/DBnb6pzd5fx2OMInaB1YYso3OZ4dCT/OC0AtNny8Tkb3CUJdYAvj/w==", + "requires": { + "mitt": "^3.0.0", + "ts-proto": "^1.146.0" } - } - }, - "dependencies": { - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, + }, + "@dcl/schemas": { + "version": "8.2.3-20230801124703.commit-ade94fc", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-8.2.3-20230801124703.commit-ade94fc.tgz", + "integrity": "sha512-GP8veICDcxZaxcCbsr8oT0tgOtv3OPN+LJMo3DsNPx1ABe2UhrjJGk5qETfZX5qyTtcKLNMhEMZ3SP11PbU2qg==", "requires": { - "@jridgewell/trace-mapping": "0.3.9" + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" } }, - "@dcl/protocol": { - "version": "1.0.0-10418514717.commit-6d26c2b", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10418514717.commit-6d26c2b.tgz", - "integrity": "sha512-xGnhHSeEufP9i7o1xvsfXdG2zZQt/Bek/GDwsly2NvZl3pUt7jIP6fiiJyCKPGmZgtisnBiUOY7r/YauPIf3HQ==", + "@dcl/sdk": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/sdk/-/sdk-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-cCXfcQiqQJ8YorLlJzMHYPkVc0knGz/4TB3x0H/uf2UTTiXiHvw+Bn+IPK8SBdVwmn4FfQfmf4NiP1Ub1FiepA==", "requires": { - "@dcl/ts-proto": "1.154.0" + "@dcl/ecs": "7.5.7-10726978287.commit-bc3c487", + "@dcl/ecs-math": "2.0.2", + "@dcl/explorer": "1.0.164509-20240802172549.commit-fb95b9b", + "@dcl/js-runtime": "7.5.7-10726978287.commit-bc3c487", + "@dcl/react-ecs": "7.5.7-10726978287.commit-bc3c487", + "@dcl/sdk-commands": "7.5.7-10726978287.commit-bc3c487", + "text-encoding": "0.7.0" + } + }, + "@dcl/sdk-commands": { + "version": "7.5.7-10726978287.commit-bc3c487", + "resolved": "https://registry.npmjs.org/@dcl/sdk-commands/-/sdk-commands-7.5.7-10726978287.commit-bc3c487.tgz", + "integrity": "sha512-WGaxmzaFpt/n7lwYCxPvcfEVm6O1/0y+jnxay1aIalaAeG6p/dgTzQf0p/Mv5ISswHg4Gv9sNkVnpXzsCFBqkg==", + "requires": { + "@dcl/crypto": "^3.4.4", + "@dcl/ecs": "7.5.7-10726978287.commit-bc3c487", + "@dcl/hashing": "1.1.3", + "@dcl/inspector": "7.5.7-10726978287.commit-bc3c487", + "@dcl/linker-dapp": "^0.12.0", + "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", + "@dcl/protocol": "1.0.0-10670971402.commit-227b327", + "@dcl/quests-client": "^1.0.3", + "@dcl/quests-manager": "^0.1.4", + "@dcl/rpc": "^1.1.1", + "@dcl/schemas": "^8.2.3-20230718182824.commit-356025c", + "@segment/analytics-node": "^1.1.3", + "@well-known-components/env-config-provider": "^1.2.0", + "@well-known-components/fetch-component": "^2.0.2", + "@well-known-components/http-server": "^2.0.0-20230501134558.commit-be9a25d", + "@well-known-components/logger": "^3.1.2", + "@well-known-components/metrics": "^2.0.1", + "archiver": "^5.3.1", + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "colorette": "^2.0.19", + "dcl-catalyst-client": "^21.6.1", + "esbuild": "^0.18.17", + "extract-zip": "2.0.1", + "fp-future": "^1.0.1", + "glob": "^9.3.2", + "ignore": "^5.2.4", + "node-fetch": "^2.7.0", + "open": "^8.4.0", + "portfinder": "^1.0.32", + "prompts": "^2.4.2", + "typescript": "^5.0.2", + "undici": "^5.19.1", + "uuid": "^9.0.1" + }, + "dependencies": { + "@dcl/protocol": { + "version": "1.0.0-10670971402.commit-227b327", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10670971402.commit-227b327.tgz", + "integrity": "sha512-fZrsia50FoCPbWIzY6aQYZolJvOYdNx4KHEBYGAEuL8d8glVFuJMLK0J+Y7YHsCjY9qW810anBAvk4u+d+i/BA==", + "requires": { + "@dcl/ts-proto": "1.154.0" + } + }, + "arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" + }, + "glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + } + }, + "minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==" + } } }, "@dcl/ts-proto": { @@ -590,6 +3547,143 @@ "ts-proto-descriptors": "^1.15.0" } }, + "@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "optional": true + }, + "@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==" + }, "@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", @@ -612,6 +3706,39 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==" + }, + "@lukeed/uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@lukeed/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha512-qC72D4+CDdjGqJvkFMMEAtancHUQ7/d/tAiHf64z8MopFDmcrtbcJuerDtFceuAfQJ2pDSfCKCtbqoGBNnwg0w==", + "requires": { + "@lukeed/csprng": "^1.1.0" + } + }, + "@multiformats/base-x": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", + "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==" + }, + "@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==" + }, + "@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==" + }, + "@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==" + }, "@protobuf-ts/protoc": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.8.2.tgz", @@ -671,6 +3798,62 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "@scure/base": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.8.tgz", + "integrity": "sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==" + }, + "@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "requires": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "requires": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "@segment/analytics-core": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@segment/analytics-core/-/analytics-core-1.4.1.tgz", + "integrity": "sha512-kV0Pf33HnthuBOVdYNani21kYyj118Fn+9757bxqoksiXoZlYvBsFq6giNdCsKcTIE1eAMqNDq3xE1VQ0cfsHA==", + "requires": { + "@lukeed/uuid": "^2.0.0", + "@segment/analytics-generic-utils": "1.1.1", + "dset": "^3.1.2", + "tslib": "^2.4.1" + } + }, + "@segment/analytics-generic-utils": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@segment/analytics-generic-utils/-/analytics-generic-utils-1.1.1.tgz", + "integrity": "sha512-THTIzBPHnvu1HYJU3fARdJ3qIkukO3zDXsmDm+kAeUks5R9CBXOQ6rPChiASVzSmwAIIo5uFIXXnCraojlq/Gw==", + "requires": { + "tslib": "^2.4.1" + } + }, + "@segment/analytics-node": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@segment/analytics-node/-/analytics-node-1.3.0.tgz", + "integrity": "sha512-lRLz1WZaDokMoUe299yP5JkInc3OgJuqNNlxb6j0q22umCiq6b5iDo2gRmFn93reirIvJxWIicQsGrHd93q8GQ==", + "requires": { + "@lukeed/uuid": "^2.0.0", + "@segment/analytics-core": "1.4.1", + "@segment/analytics-generic-utils": "1.1.1", + "buffer": "^6.0.3", + "node-fetch": "^2.6.7", + "tslib": "^2.4.1" + } + }, "@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -713,6 +3896,11 @@ "@types/node": "*" } }, + "@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" + }, "@types/jsonfile": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.1.tgz", @@ -721,6 +3909,11 @@ "@types/node": "*" } }, + "@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, "@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -731,11 +3924,111 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz", "integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==" }, + "@types/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", + "requires": { + "@types/node": "*", + "form-data": "^4.0.0" + } + }, "@types/object-hash": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-3.0.6.tgz", "integrity": "sha512-fOBV8C1FIu2ELinoILQ+ApxcUKz4ngq+IWUYrxSGjXzzjUALijilampwkMgEtJ+h2njAW3pi853QpzNVCHB73w==" }, + "@types/ws": { + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "@well-known-components/env-config-provider": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@well-known-components/env-config-provider/-/env-config-provider-1.2.0.tgz", + "integrity": "sha512-QYDL9Uk1zEs5Q4ymgeZo1GVzuHe9Pp/jOLPRIbhwtPOCQ2Bd9yIlUWiFoC36JpcUSIlQ7Fzh8x21v2U95q5/+Q==", + "requires": { + "dotenv": "^16.0.1" + } + }, + "@well-known-components/fetch-component": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@well-known-components/fetch-component/-/fetch-component-2.0.2.tgz", + "integrity": "sha512-LdY+6n9kuyACg3fcU4qMrNhLZuG7eqPxLSqzDgQyoHKeNjlzggoUqTVJKtIyi6vjPs8pSQ/Fx1xdLuBhOKCgww==", + "requires": { + "@well-known-components/interfaces": "^1.4.1", + "cross-fetch": "^3.1.5" + } + }, + "@well-known-components/http-server": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@well-known-components/http-server/-/http-server-2.1.0.tgz", + "integrity": "sha512-IHD7aLTA+9DYEchQubHDBwc4FmVEmQC+2TWbi8Tz+QlkiQdtndcuba8XHH+EwqlB5sna/EAJGZGXPxS7okcHKA==", + "requires": { + "@types/http-errors": "^2.0.1", + "destroy": "^1.2.0", + "fp-future": "^1.0.1", + "http-errors": "^2.0.0", + "mitt": "^3.0.0", + "node-fetch": "^2.6.9", + "on-finished": "^2.4.1", + "path-to-regexp": "^6.2.1" + } + }, + "@well-known-components/interfaces": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@well-known-components/interfaces/-/interfaces-1.4.3.tgz", + "integrity": "sha512-roVtoOHG6uaH+nL4C0ISnAwkkopc2FLsS7fqX+roI22EdX9PAknPoImhPU8/3u6jgRAVpglX5Zj4nWZkSaXPkQ==", + "requires": { + "@types/node": "^20.3.1", + "@types/node-fetch": "^2.5.12", + "typed-url-params": "^1.0.1" + }, + "dependencies": { + "@types/node": { + "version": "20.16.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz", + "integrity": "sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==", + "requires": { + "undici-types": "~6.19.2" + } + } + } + }, + "@well-known-components/logger": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@well-known-components/logger/-/logger-3.1.3.tgz", + "integrity": "sha512-tTjD27CdfU4SVe+kPfjRbPSqdrw0Crg+M31RNejinCuMEBtEGbhYLtB1M4gn+PSTy2Oi3cI3iOdeQ1xVhMSerQ==", + "requires": {} + }, + "@well-known-components/metrics": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@well-known-components/metrics/-/metrics-2.1.0.tgz", + "integrity": "sha512-nJ3TdVMiJN2i7TtelndDtxvZERcSE7dtlmRfRV7yYZZshDZrQTC9EFH2uhmCWDWI0qnonvlq++JRSXBNJJfbvg==", + "requires": { + "prom-client": "^15.1.0" + } + }, + "@well-known-components/pushable-channel": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@well-known-components/pushable-channel/-/pushable-channel-1.0.3.tgz", + "integrity": "sha512-8ibswJXQx7YfmUgzXp02xsIBTw6zrVXgNybV8asvEr1vE/0m/xmZi41+NwTcZmLCNRzsE/i+aRUzNO+oyq/g2g==", + "requires": { + "mitt": "^3.0.0" + } + }, "acorn": { "version": "8.8.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", @@ -748,17 +4041,181 @@ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true }, + "ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "requires": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + } + }, + "ajv-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "requires": {} + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "archiver": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz", + "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", + "requires": { + "archiver-utils": "^2.1.0", + "async": "^3.2.4", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.1.2", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + } + }, + "archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "requires": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, + "async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==" + }, + "bintrees": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.2.tgz", + "integrity": "sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==" + }, + "bl": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "requires": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" + }, "brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -767,22 +4224,202 @@ "balanced-match": "^1.0.0" } }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "requires": { + "fill-range": "^7.1.1" + } + }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" + }, "case-anything": { "version": "2.1.13", "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==" }, + "chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "requires": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "compress-commons": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz", + "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", + "requires": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" + }, + "crc32-stream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz", + "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", + "requires": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + } + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "requires": { + "node-fetch": "^2.6.12" + } + }, "dataloader": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==" }, + "dcl-catalyst-client": { + "version": "21.7.0", + "resolved": "https://registry.npmjs.org/dcl-catalyst-client/-/dcl-catalyst-client-21.7.0.tgz", + "integrity": "sha512-10NyeYrKSh7yM5y7suLfoDeVAM9xknlvlxDBof1lJiuPYPzj5Aee8kaEDfXzVWTpfI7ssvSXhBlGVRvyd0RcJA==", + "requires": { + "@dcl/catalyst-contracts": "^4.4.0", + "@dcl/crypto": "^3.4.0", + "@dcl/hashing": "^3.0.0", + "@dcl/schemas": "^11.5.0", + "@well-known-components/fetch-component": "^2.0.0", + "cookie": "^0.5.0", + "cross-fetch": "^3.1.5", + "form-data": "^4.0.0" + }, + "dependencies": { + "@dcl/hashing": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-3.0.4.tgz", + "integrity": "sha512-Cg+MoIOn+BYmQV2q8zSFnNYY+GldlnUazwBnfgrq3i66ZxOaZ65h01btd8OUtSAlfWG4VTNIOHDjtKqmuwJNBg==" + }, + "@dcl/schemas": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-11.12.0.tgz", + "integrity": "sha512-L04KTucvxSnrHDAl3/rnkzhjfZ785dSSPeKarBVfzyuw41uyQ0Mh4HVFWjX9hC+f/nMpM5Adg5udlT5efmepcA==", + "requires": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0", + "mitt": "^3.0.1" + } + } + } + }, + "debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "requires": { + "ms": "^2.1.3" + } + }, + "define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, "detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", @@ -794,6 +4431,11 @@ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, + "dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==" + }, "dprint-node": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", @@ -802,6 +4444,131 @@ "detect-libc": "^1.0.3" } }, + "dset": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.3.tgz", + "integrity": "sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "err-code": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", + "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==" + }, + "esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "requires": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "eth-connect": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/eth-connect/-/eth-connect-6.2.4.tgz", + "integrity": "sha512-K0+g+pZoWkcJKKc4hwlYvaruoMBFcARoULIdf50bz/Zk9YdgFoKPjlRQWAtBgSDfxJS7AAHqg40k2Z/uQI0aNw==" + }, + "ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "requires": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "requires": { + "pend": "~1.2.0" + } + }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "fp-future": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fp-future/-/fp-future-1.0.1.tgz", + "integrity": "sha512-2McmZH/KsZqlqHju9+Ox0FC7q7Knve4t6ZeKubbhAz1xpnD7hkCrP8TP5g5QbbD5bA5jBANbXf/ew4x1FjSUrw==" + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs-extra": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz", @@ -817,6 +4584,20 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "optional": true + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } + }, "glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -829,6 +4610,14 @@ "once": "^1.3.0" } }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, "google-protobuf": { "version": "3.21.2", "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", @@ -839,6 +4628,47 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, + "hamt-sharding": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hamt-sharding/-/hamt-sharding-2.0.1.tgz", + "integrity": "sha512-vnjrmdXG9dDs1m/H4iJ6z0JFI2NtgsW5keRkTcM85NGak69Mkf5PHUqBz+Xs0T4sg0ppvj9O5EGAJo40FTxmmA==", + "requires": { + "sparse-array": "^1.3.1", + "uint8arrays": "^3.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==" + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -853,6 +4683,201 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "interface-ipld-format": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/interface-ipld-format/-/interface-ipld-format-1.0.1.tgz", + "integrity": "sha512-WV/ar+KQJVoQpqRDYdo7YPGYIUHJxCuOEhdvsRpzLqoOIVCqPKdMMYmsLL1nCRsF3yYNio+PAJbCKiv6drrEAg==", + "requires": { + "cids": "^1.1.6", + "multicodec": "^3.0.1", + "multihashes": "^4.0.2" + } + }, + "ipfs-unixfs": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-4.0.3.tgz", + "integrity": "sha512-hzJ3X4vlKT8FQ3Xc4M1szaFVjsc1ZydN+E4VQ91aXxfpjFn9G2wsMo1EFdAXNq/BUnN5dgqIOMP5zRYr3DTsAw==", + "requires": { + "err-code": "^3.0.1", + "protobufjs": "^6.10.2" + }, + "dependencies": { + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + } + } + } + }, + "ipfs-unixfs-importer": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ipfs-unixfs-importer/-/ipfs-unixfs-importer-7.0.3.tgz", + "integrity": "sha512-qeFOlD3AQtGzr90sr5Tq1Bi8pT5Nr2tSI8z310m7R4JDYgZc6J1PEZO3XZQ8l1kuGoqlAppBZuOYmPEqaHcVQQ==", + "requires": { + "bl": "^5.0.0", + "cids": "^1.1.5", + "err-code": "^3.0.1", + "hamt-sharding": "^2.0.0", + "ipfs-unixfs": "^4.0.3", + "ipld-dag-pb": "^0.22.2", + "it-all": "^1.0.5", + "it-batch": "^1.0.8", + "it-first": "^1.0.6", + "it-parallel-batch": "^1.0.9", + "merge-options": "^3.0.4", + "multihashing-async": "^2.1.0", + "rabin-wasm": "^0.1.4", + "uint8arrays": "^2.1.2" + } + }, + "ipld-dag-pb": { + "version": "0.22.3", + "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.22.3.tgz", + "integrity": "sha512-dfG5C5OVAR4FEP7Al2CrHWvAyIM7UhAQrjnOYOIxXGQz5NlEj6wGX0XQf6Ru6or1na6upvV3NQfstapQG8X2rg==", + "requires": { + "cids": "^1.0.0", + "interface-ipld-format": "^1.0.0", + "multicodec": "^3.0.1", + "multihashing-async": "^2.0.0", + "protobufjs": "^6.10.2", + "stable": "^0.1.8", + "uint8arrays": "^2.0.5" + }, + "dependencies": { + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + } + } + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "requires": { + "is-docker": "^2.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "it-all": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/it-all/-/it-all-1.0.6.tgz", + "integrity": "sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A==" + }, + "it-batch": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/it-batch/-/it-batch-1.0.9.tgz", + "integrity": "sha512-7Q7HXewMhNFltTsAMdSz6luNhyhkhEtGGbYek/8Xb/GiqYMtwUmopE1ocPSiJKKp3rM4Dt045sNFoUu+KZGNyA==" + }, + "it-first": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/it-first/-/it-first-1.0.7.tgz", + "integrity": "sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g==" + }, + "it-parallel-batch": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/it-parallel-batch/-/it-parallel-batch-1.0.11.tgz", + "integrity": "sha512-UWsWHv/kqBpMRmyZJzlmZeoAMA0F3SZr08FBdbhtbe+MtoEBgr/ZUAKrnenhXCBrsopy76QjRH2K/V8kNdupbQ==", + "requires": { + "it-batch": "^1.0.9" + } + }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -862,17 +4887,123 @@ "universalify": "^2.0.0" } }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==" + }, + "lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" + }, "long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "merge-options": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", + "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==", + "requires": { + "is-plain-obj": "^2.1.0" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, "minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -881,11 +5012,145 @@ "brace-expansion": "^2.0.1" } }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" + }, + "minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==" + }, + "mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "requires": { + "minimist": "^1.2.6" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "multiformats": { + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz", + "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==" + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "dependencies": { + "uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "requires": { + "multiformats": "^9.4.2" + } + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + } + } + }, + "multihashing-async": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-2.1.4.tgz", + "integrity": "sha512-sB1MiQXPSBTNRVSJc2zM157PXgDtud2nMFUEIvBrsq5Wv96sUclMRK/ecjoP1T/W61UJBqt4tCTwMkUpt2Gbzg==", + "requires": { + "blakejs": "^1.1.0", + "err-code": "^3.0.0", + "js-sha3": "^0.8.0", + "multihashes": "^4.0.1", + "murmurhash3js-revisited": "^3.0.0", + "uint8arrays": "^3.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "murmurhash3js-revisited": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz", + "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==" + }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, "object-hash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==" }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -894,6 +5159,103 @@ "wrappy": "1" } }, + "open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "requires": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "requires": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==" + } + } + }, + "path-to-regexp": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", + "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==" + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "portfinder": { + "version": "1.0.32", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", + "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==", + "requires": { + "async": "^2.6.4", + "debug": "^3.2.7", + "mkdirp": "^0.5.6" + }, + "dependencies": { + "async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "requires": { + "lodash": "^4.17.14" + } + }, + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "prom-client": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-15.1.3.tgz", + "integrity": "sha512-6ZiOBfCywsD4k1BN9IX0uZhF+tJkV8q8llP64G5Hajs4JOeVLPCwpPVcpXy3BwYiUGgyJzsJJQeOIv7+hDSq8g==", + "requires": { + "@opentelemetry/api": "^1.4.0", + "tdigest": "^0.1.1" + } + }, + "prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, "protobufjs": { "version": "7.2.6", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", @@ -921,6 +5283,191 @@ "ts-protoc-gen": "^0.15.0" } }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "rabin-wasm": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/rabin-wasm/-/rabin-wasm-0.1.5.tgz", + "integrity": "sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==", + "requires": { + "@assemblyscript/loader": "^0.9.4", + "bl": "^5.0.0", + "debug": "^4.3.1", + "minimist": "^1.2.5", + "node-fetch": "^2.6.1", + "readable-stream": "^3.6.0" + } + }, + "react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "requires": { + "loose-envify": "^1.1.0" + } + }, + "react-reconciler": { + "version": "0.29.2", + "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.29.2.tgz", + "integrity": "sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==", + "requires": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + } + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "requires": { + "minimatch": "^5.1.0" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "requires": { + "loose-envify": "^1.1.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + }, + "sparse-array": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/sparse-array/-/sparse-array-1.3.2.tgz", + "integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==" + }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + } + } + }, + "tdigest": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", + "integrity": "sha512-+G0LLgjjo9BZX2MfdvPfH+MKLCrxlXSYec5DaPYP1fe6Iyhf0/fSmJ0bFiZ1F8BT6cGXl2LpltQptzjXKWEkKA==", + "requires": { + "bintrees": "1.0.2" + } + }, + "text-encoding": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz", + "integrity": "sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "ts-deepmerge": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-deepmerge/-/ts-deepmerge-7.0.1.tgz", + "integrity": "sha512-JBFCmNenZdUCc+TRNCtXVM6N8y/nDQHAcpj5BlwXG/gnogjam1NunulB9ia68mnqYI446giMfpqeBFFkOleh+g==" + }, "ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -950,10 +5497,21 @@ "dprint-node": "^1.0.8" } }, + "ts-proto": { + "version": "1.181.2", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.181.2.tgz", + "integrity": "sha512-knJ8dtjn2Pd0c5ZGZG8z9DMiD4PUY8iGI9T9tb8DvGdWRMkLpf0WcPO7G+7cmbZyxvNTAG6ci3fybEaFgMZIvg==", + "requires": { + "case-anything": "^2.1.13", + "protobufjs": "^7.2.4", + "ts-poet": "^6.7.0", + "ts-proto-descriptors": "1.16.0" + } + }, "ts-proto-descriptors": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz", - "integrity": "sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.16.0.tgz", + "integrity": "sha512-3yKuzMLpltdpcyQji1PJZRfoo4OJjNieKTYkQY8pF7xGKsYz/RHe3aEe4KiRxcinoBmnEhmuI+yJTxLb922ULA==", "requires": { "long": "^5.2.3", "protobufjs": "^7.2.4" @@ -967,33 +5525,167 @@ "google-protobuf": "^3.15.5" } }, + "tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + }, + "typed-url-params": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-url-params/-/typed-url-params-1.0.1.tgz", + "integrity": "sha512-762imXO+myoSDHD9+YxUfSmfT0yGH1j+3s9UJ6uqKkOYIwHH6/gsFo67ZoST0Ey/RSoaps1zGu1N+eiuuCxfeg==" + }, "typescript": { "version": "4.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", "dev": true }, + "uint8arrays": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", + "integrity": "sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A==", + "requires": { + "multiformats": "^9.4.2" + } + }, + "undici": { + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "requires": { + "@fastify/busboy": "^2.0.0" + } + }, + "undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + }, "v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, + "ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "requires": {} + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, "yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true + }, + "zip-stream": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", + "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", + "requires": { + "archiver-utils": "^3.0.4", + "compress-commons": "^4.1.2", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "archiver-utils": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz", + "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", + "requires": { + "glob": "^7.2.3", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } } } } diff --git a/scripts/package.json b/scripts/package.json index 3a5c65b21e..0ef3a5d9cf 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -16,7 +16,7 @@ "typescript": "^4.2.3" }, "dependencies": { - "@dcl/protocol": "^1.0.0-10418514717.commit-6d26c2b", + "@dcl/protocol": "^1.0.0-10704143848.commit-a0c6d86", "@protobuf-ts/protoc": "^2.8.2", "@types/fs-extra": "^11.0.1", "@types/glob": "^8.0.1",