feat: fetch scene files from asset bundle CDN instead of catalyst#7833
Open
decentraland-bot wants to merge 13 commits intodevfrom
Open
feat: fetch scene files from asset bundle CDN instead of catalyst#7833decentraland-bot wants to merge 13 commits intodevfrom
decentraland-bot wants to merge 13 commits intodevfrom
Conversation
…atalyst
When a scene has an asset bundle manifest version (i.e. it has been processed
by the asset-bundle-converter and is served from the registry), redirect
index.js and main.crdt downloads to the asset bundle CDN (S3) instead of
fetching them from the catalyst.
Changes:
- SceneHashedContentWithCDN: new ISceneContent decorator that overrides the
URL for the main script (index.js) to point to the CDN.
- LoadSceneSystemLogic: returns SceneHashedContentWithCDN when the scene has
an AB manifest, so the V8 runtime fetches index.js from the CDN.
- LoadSceneSystemLogicBase.LoadMainCrdtAsync: tries the CDN URL first for
main.crdt, falls back to the catalyst URL on any error (e.g. conversion
still in progress).
CDN URL pattern: {assetBundleURL}{abVersion}/{entityId}/{fileName}
This eliminates a class of incidents where a scene marked as fallback could
not load because its index.js or main.crdt files were missing from the
catalyst.
Closes #7625
Contributor
|
Windows and Mac build successful in Unity Cloud! You can find a link to the downloadable artifact below. |
mikhail-dcl
requested changes
Mar 31, 2026
Explorer/Assets/DCL/Infrastructure/SceneRunner/Scene/SceneHashedContentWithCDN.cs
Outdated
Show resolved
Hide resolved
Explorer/Assets/DCL/Infrastructure/SceneRunner/Scene/SceneHashedContentWithCDN.cs
Outdated
Show resolved
Hide resolved
Explorer/Assets/DCL/Infrastructure/SceneRunner/Scene/SceneHashedContentWithCDN.cs
Outdated
Show resolved
Hide resolved
...rer/Assets/DCL/Infrastructure/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogic.cs
Outdated
Show resolved
Hide resolved
...rer/Assets/DCL/Infrastructure/ECS/SceneLifeCycle/SceneFacade/Systems/LoadSceneSystemLogic.cs
Outdated
Show resolved
Hide resolved
Contributor
feat: fetch scene files from asset bundle CDN instead of catalystPR number: 7833 Intel Core i3Change samples: 2680
|
Contributor
|
PR #7833, run #23950079654 Builds: Windows change, Windows baseline, macOS change, macOS baseline Intel Core i3
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
What does this PR change?
When a scene has asset bundles available, redirects its core files (
main script,scene.json,main.crdt) to the asset bundle CDN instead of the catalyst. Before fetching from CDN, performs parallel HEAD requests to validate all three files exist — if any is missing, falls back entirely to catalyst (all-or-nothing).This is done by injecting CDN URL overrides directly into
SceneHashedContentvia a newOverrideContentUrlmethod.Scenes marked as
fallbackcould fail to load because files were missing from the catalyst. Routing requests to the CDN — where theasset-bundle-converteruploads them — eliminates this class of failure.Addresses #7625
Test Instructions
Prerequisites
Test Steps
Additional Testing Notes
{assetBundleURL}/{abVersion}/{entityId}/{fileName}definition.metadata.main(not hardcoded toindex.js)Quality Checklist
Code Review Reference
Please review our Code Review Standards before submitting.