question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Best way to handle loading project assets?

See original GitHub issue

Currently, Costumes don’t appear until their images are loaded, and sounds only play once they’re loaded.

There are some APIs that would greatly benefit from Costumes’ images being loaded at construction-time, and projects not being “really loaded” until some inteterminate point in the future is not ideal.

To fix this, there would need to be some sort of API for loading a project and all its assets, but I’m not sure what that would look like.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

1reaction
adroitwhizcommented, Jan 13, 2020

There still needs to be a better API for loading projects, IMO. Costumes would greatly benefit from preloading, and if an audio engine (for drums/instruments and sound effects) is implemented, sounds will need to be preloaded as well.

Currently, you make a project with new Project(), which is synchronous. I was leaning towards replacing the Project constructor with Project.from() or something like that, which returns a Promise<Project>.

The PIXI Loader API might be helpful to look at as a source of inspiration as well.

0reactions
PullJoshcommented, Jul 18, 2022

Closing in favor of #133

Read more comments on GitHub >

github_iconTop Results From Across the Web

Are high asset loading times killing your website performance ...
How do you spot slow loading assets, and give your users back precious time? Use these tips to make analyzing and improving performance ......
Read more >
How to Load Assets into a Project | Unity Tutorial - YouTube
A quick guide on how to import assets into a project with the new method. Do you have any questions? Let us know...
Read more >
Front-end performance part 01 - Assets loading
Next good thing to improve assets handling is to GZIP them. I hope this is something that most of you have heard of...
Read more >
Load, unload and change assets at runtime with Addressables
It is now the recommended way to load assets, rather than using Resources.Load. Download the project files. This tutorial builds on top of...
Read more >
Asset Manager for Data Assets & Async Loading - Tom Looman
Asset Manager in Unreal Engine lets you asynchronous load game content with soft references and even partially load assets.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found