Problem running a Babylonjs web app using GitHub.io web sites

Hi,
I am trying to build a web-based Level Editor using Babylonjs - running on a GitHub.io server.

I need to load the GUI using:
let loadedGUI = await advancedTexture.parseFromSnippetAsync(“BLAHBLAHBLAH#999”);
but, adding this async function crashes the web app.

It’s like Github cannot process async functions.

Is there a work around, or another way to load my GUI - which was created using the GUI editor.

Regards,

Does your project work locally?
Does it work on any other server?
Do you use await inside the async?

Github doesn’t process them, it happens inside your browser.
Probably there is some error in your code?
Do you have any console messages?
Is there a way to have a look at your app or we need to make guesses? :slight_smile:

1 Like

Does your project work locally?
Yes! I am currently using the Playground and the Gui Editor

Do you use await inside the async?

Yes! The function is called within:
const createscene = async function () {…}

Does it work on any other server?
I haven’t tried it on a local server

The scene only loads when I comment out the GUI code:
sigma7zero.github.io/MapStar.github.io/

What did I fix:

  1. unreferenced babylonjs.gui.js
  2. top level function not async
  3. incorrect script type - your code
  4. you didn’t await the createScene() function

Page here with full code in html:
https://playgrounds.babylonjs.xyz/sigma7zero.html

1 Like

Thanks.

1 Like

It’s still not working on https://sigma7zero.github.io/MapStar.github.io/

It throws up this error in the console:

And you don’t await it again:

Why don’t you get the code from MetaVerse MapStar ?