In my use case i have a dynamic scene composed by dozens of meshes arranged in a hieracy.
Attached to some of them there is a TextBlock (using linkWithMesh like described here Babylon.js docs)
The issue is that when the mesh with an attached label is disabled, the corresponding label remains visible.
I’m able to manage this using the onEnabledStateChangedObservable
But this doesn’t work if some of the ancestors of the mesh is disabled
Look at this minimal repro:
IMHO the design of onEnabledStateChangedObservable is flawed because it does not reflect the “real” EnabledState. In contrast the funcion isEnabled by default does it!!!
This may be fixed with a minimal change i’m proposing here WIP: feat(core): add onEnabledStateChangedObservableEx on Node by beppemarazzi · Pull Request #18722 · BabylonJS/Babylon.js · GitHub