aws-samples / amazon-sumerian-hosts

Amazon Sumerian Hosts (Hosts) is an experimental open source project that aims to make it easy to create interactive animated 3D characters for Babylon.js, three.js, and other web 3D frameworks. It leverages AWS services including Amazon Polly (text-to-speech) and Amazon Lex (chatbot).
MIT No Attribution
183 stars 82 forks source link

Fix: loadAssetContainerAsync should pass in scene #93

Closed JuliaABurch closed 2 years ago

JuliaABurch commented 2 years ago

Issue #, if available: 11141

Description of changes: This change is to fix a bug seen in the BabylonJS editor, where the host will fail to load with the error "no scene available to load asset container to” after running the scene in the editor.

This happens because - when you don't pass in a scene - BabylonJS will attempt to get the last scene opened by the engine. This field is evidently cleared by the editor after the 'play' button is pressed to run the scene - in other words, it's not reliably set.

Testing done: Unit tests pass, npm run start-babylon-demos was run and demos were checked

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.