Its only works with big arguments list as (I can’t put more than two links) “Full explanation of creating a tiled ground by its original code writer” in docs suggests and his demos:
I am not sure which one you are trying to use, but it all depends on which class you are addressing. The es6 issue you are referring to is just about importing the GroundBuilder in order for this to work.
I use Mesh class from doc example. Copied lines from there for example:
import { Mesh } from "@babylonjs/core/Meshes/mesh";
// Required side effects to populate the Create methods on the mesh class. Without this, the bundle would be smaller but the createXXX methods from mesh would not be accessible.
import "@babylonjs/core/Meshes/meshBuilder";
var ground = Mesh.CreateGround("ground1", 6, 6, 2, scene);
So i’m not sure which one i use too. Looks like it uses Mesh.CreateTiledGround but requires MeshBuilder.CreateTiledGround somehow
All of the Mesh.Create*** functions are very outdated and should be slowly replaced in your code. we left them there for backwards compatibility, and they will stay there further.
Internally, they use the MeshBuilder"s function. So you do need both
I would recommend to anyhow use the mesh builder. they are usually better and have more configuration parameters.
How do I efficiently use the Mesh.Create… methods ?
The simplest is to load only the builder corresponding to your construction method. If you wish to use the CreateBox method, you can simply import "@babylonjs/core/Meshes/Builders/boxBuilder"; to ensure that the dependant modules have been loaded. Except if you are relying on all the MeshBuilder methods, we would recommend to not use it directly but favor the smaller builders .