Skip to content

Help me understand deferred loading of assets and Scene lifecycle #2768

Answered by eonarheim
Joshuahelmle asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Joshuahelmle! Many thanks for the kind words, and please do send us any examples you come up with we'd be more than happy to include them in the documentation! Documentation updates are much appreciated!

You are correct onInitialize doesn't take into account async initialization so in this example it will fire and forget unfortunately and your assets won't be loaded in time. I think async scene initialization is definitely a gap right now in Excalibur (definitely one we want to fix) right now Excalibur really wants to load all the assets up front before the game starts.

To work around this current limitation is to wrap the scene transition api API with an async handler, have it handle…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Joshuahelmle
Comment options

Answer selected by Joshuahelmle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants