Create same grid of debug inspector via code

In the debug inspector I can activate a grid. how can I create / activate the same via code?

Gizmos ?

If you mean the render grid:


The grid in the inspector creates a ground mesh and sets its material to a GridMaterial. See Grid - Babylon.js Documentation.

1 Like

But can you toggle this option over the inspector in the code? I think this would be a neat feature.