[LayaAir 2.0]Property 'BoxMesh' does not exist on type 'typeof Laya'

官方文档:https://ldc2.layabox.com/doc/?nav=zh-ts-4-0-0​  
// 添加自定义模型
    var box:Laya.MeshSprite3D = new Laya.MeshSprite3D(new Laya.BoxMesh(1, 1, 1));运行报错Property 'BoxMesh' does not exist on type 'typeof Laya'请问应该怎么解决
已邀请:

达上花火

赞同来自:

2.0调整PrimitiveMesh相关子类为Mesh通用类,创建方式改为静态工厂式PrimitiveMesh.createXX()方法,精简网格类。
现在可以直接Laya.PrimitiveMesh.createBox(1,1,1)

要回复问题请先

商务合作
商务合作