Hi, I’m having trouble using the es6 serializer module “@babylonjs/serializers”
Firstly, I’m getting a type mismatch error between the scene object between the serializers and core modules;
TS2345: Argument of type 'import(".../app/node_modules/@babylonjs/core/scene").Scene' is not assignable to parameter of type 'import(".../app/node_modules/@babylonjs/serializers/node_modules/@babylonjs/core/scene").Scene'.
Types of property '_inputManager' are incompatible.
Type 'import(".../app/node_modules/@babylonjs/core/Inputs/scene.inputManager").InputManager' is not assignable to type 'import(".../app/node_modules/@babylonjs/serializers/node_modules/@babylonjs/core/Inputs/scene.inputManager").InputManager'.
Secondly, if I use //@ts-ignore as a temporary fix - it produces a file, but it doesn’t contain any geometry. Which I suppose I could have anticipated.
I get a load of console logger messages saying that each material is not supported, even though they are just PBRMaterials and StandardMaterials.
Upon opening the downloaded file, it appears that it has saved the object transform data for the various meshes/transformNodes in the scene, but no geometry.
If I use GLBAsync it produces a glb with only the transform data, if I use GLTFAsync it produces a gltf file with the transform data and an empty .bin file.
I can’t post my whole file as it’s part of a massive project, but I’m not doing anything particularly unusual I think;
import {GLTF2Export} from '@babylonjs/serializers/glTF'
... lots of code...
ExportScene(){
// @ts-ignore
GLTF2Export.GLBAsync(this.scene,'test').then(res=>{
res.downloadFiles()
})
}
So, typescript errors, materials not recognised, and no geometry
Any ideas / pointers? Is there something else I should be importing that’s being missed?