Skip to content

Stop using AssetId in the AssetServer and use AssetIndex instead. #19927

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

andriyDev
Copy link
Contributor

Objective

Context: The AssetServer never deals with Uuid assets anyway. We always allocate asset indices, and asset UUIDs are not handled properly (dependencies on UUID assets are never loaded, so their dependents won't ever be notified).

Solution

  • Create ErasedAssetIndex as a replacement for UntypedAssetId.
  • Use ErasedAssetIndex or AssetIndex where relevant within the AssetServer.

@andriyDev andriyDev added A-Assets Load files from disk to use for things like images, models, and sounds C-Code-Quality A section of code that is hard to understand or change D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 2, 2025
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very well-done: good comments, clear (if terse) motivation in the PR description, and a clean diff.

I would feel a lot more comfortable with this sort of large-scale refactor to assets if we had a robust test suite, but I'm not willing to block this particular PR over that request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Code-Quality A section of code that is hard to understand or change D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants