playcanvas / playcanvas/engine
When an asset gets an error when loading, should it be 'loaded'?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
https://github.com/playcanvas/engine/blob/master/src/asset/asset-registry.js#L367
If an asset load gets an error during a load, we still mark as loaded which means that the developer has to unset the flag to attempt another load.
Is this as designed or should we check for errors before setting loaded to true?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/asset/asset-registry.js at line 367 and trace the asset loading error path. Determine whether an errored asset should remain marked as loaded, then verify that the chosen behavior permits the expected retry flow and is covered by the relevant asset-loading checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100