Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation Notice: Legacy Asset IDs #17861

Open
AMZN-Gene opened this issue Apr 30, 2024 · 0 comments
Open

Deprecation Notice: Legacy Asset IDs #17861

AMZN-Gene opened this issue Apr 30, 2024 · 0 comments
Labels
kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/content Categorizes an issue or PR as relevant to SIG Content.

Comments

@AMZN-Gene
Copy link
Contributor

AMZN-Gene commented Apr 30, 2024

Deprecated APIs

void AssetRegistry::RegisterLegacyAssetMapping(const AZ::Data::AssetId& legacyId, const AZ::Data::AssetId& newId);

void AssetRegistry::UnregisterLegacyAssetMappingsForAsset(const AZ::Data::AssetId& id);

AZ::Data::AssetId AssetRegistry::GetAssetIdByLegacyAssetId(const AZ::Data::AssetId& legacyAssetId) const;

LegacyAssetIdToRealAssetIdMap AssetRegistry::GetLegacyMappingSubsetFromRealIds(const AZStd::vector<AZ::Data::AssetId>& realIds) const;

Alternatives APIs

There aren't any alternative APIs, rather, users should recreate the legacy assets in order to generate a new asset id. Also be sure to update any components which reference that asset.
Any projects started in O3DE should already be in the clear; they are using modern asset ids. For projects started in Lumberyard and converted to O3DE, developers can run their game and look out for legacy asset warnings printed to the log. Search for "Deprecated asset id warning!"

Last Release

Tentatively the next release stabilization/2410

Additional Context

"Legacy" UUIDs date back to the Lumberyard days (prior to O3DE's existence in 2021). Each asset's legacy-type uuid is stored and so grows linearly as games add more assets. This results in a doubling of the storage size requirements for bookkeeping assets (storing the modern asset id and then a fallback legacy asset id).
While a single UUID leaves a small memory footprint, keep in mind, source and product assets (the assets that end up being generated in the cache folder) are not 1-to-1. A single source asset can result in generating many game-ready product assets. For example, it's common for a project with 30,000 assets, to end up with 100,000+ product assets.

@AMZN-Gene AMZN-Gene added kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 30, 2024
AMZN-Gene added a commit to carbonated-dev/o3de that referenced this issue Apr 30, 2024
…evelopers track which assets are old and need to be updated to the modern asset id. See o3de#17861

Signed-off-by: AMZN-Gene <[email protected]>
@lemonade-dm lemonade-dm added sig/content Categorizes an issue or PR as relevant to SIG Content. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/content Categorizes an issue or PR as relevant to SIG Content.
Projects
None yet
Development

No branches or pull requests

2 participants