Is there a way to omit certain meshes from the Debug Inspector tree?

Hi again gang.

So, I’ve got a ton of dynamically created meshes in my simulation (like 10-20K+), mostly plane instances currently as i’m testing some things, and i’ve noticed that even though running the simulation is no problem, load time is absolutely destroyed when i turn on the debug layer (30sec or more, usually) since it needs to build a tree of all those instances in its interface. I’m going to want that debug layer for other purposes as i move forward, and was wondering if there was a flag somewhere to set to include or omit specific meshes or mesh instances from the inspector to help with this?

yes there is one :slight_smile:
set your mesh with:

mesh.reservedDataStore = {hidden: true}

This can be useful. I keep this message.


property 'reservedDataStore' does not exist on type 'Mesh' . :frowning:

looks like it’s intentionally un-type-exported, saw it in the docs here – for the typescript-y among us, you might need a little

// @ts-ignore

although, it doesn’t seem to have fixed the load time issue :frowning:

EDIT: if i had to guess, it’s because all these objects are Instances, and come through in the Inspector as ‘TransformNode’ entries rather than Meshes, so setting a value on them that doesn’t exist probably isn’t doing anything at all

Nope this is probably because the load will trigger mutation events (onNewMeshAdded, etc…) that will force the inspector to rebuild.

I would encourage you to display the inspector after loading your scene

(I will fix the fact that instances appears as TransformNode)