template-svelte
template-svelte copied to clipboard
Starting game via StartGame method vs. default export has odd results
I have no idea what is causing this but when I start my game like in the template using StartGame
from a svelte component, the scenes get messed up and it can't find any resources. The scene order gets ignored (it tries to run the Day scene which is last in the scene list). and ultimately the game doesn't load.
If I instead export the new game as a default, the game works fine, but of course it just spits itself out onto the page without attaching to the parent (presumably because the svelte page dom (where the parent div is) hasn't loaded in time.
The only difference is that I built the game and my svelte kit site at different times, so I'm deploying by copying the game project build output into the sveltekit site manually.
Any idea what might cause the breakdown in behavior?