TS: Property 'getSoundByName' does not exist on type 'Scene'

According to Sound doc and API Scene doc, there is ‘getSoundByName’ method, but I get the following typescript error:

Property 'getSoundByName' does not exist on type 'Scene'

Resolved.

Second time I’ve fallen for this gotcha today :slight_smile:

Needed to …
import "@babylonjs/core/Audio/audioSceneComponent";

1 Like