Simplify function not showing in ts code

I’m using Typescript for my Babylon code. To load a large model, I got something called simplify function in Auto-LOD. But, don’t know why but it is showing:
Property ‘simplify’ does not exist on type ‘AbstractMesh’.
Can anyone tell me what is the main reason for this?

Note: I am using the global import of Babylon.

import * as BABYLON from "@babylonjs/core";

Referring to this stuff:
Simplifying mesh

My guess would be that it is because simplify does not exist on AbstractMesh (see here). Simplify does exist on Mesh however, so a simple cast of AbstractMesh to Mesh could solve your issue: (myMesh as BABYLON.Mesh).simplify().

Please note that I myself am new, I just had similar issues and this is what solved those issues for me

Thanks, buddy, it works for me :slight_smile:

1 Like

On using simplify method below error is coming:

image
Is that model’s problem or I’m missing something?

A repro in the playground would greatly help :slight_smile:

1 Like

Ok, I’ll try to add that ASAP :slight_smile: Thanks