Hi, I am trying to dispose gizmo manager in react(CRA) but it gives me this weird error
TypeError: Cannot read property ‘dispose’ of undefined
My babylon version:
"babylonjs": "^5.0.0-alpha.25",
"babylonjs-loaders": "^5.0.0-alpha.25",
"babylonjs-materials": "^5.0.0-alpha.25",
This is how I am defining the gizmo manager:
this.setState({
gizmoManager: new GizmoManager(scene, 1, new UtilityLayerRenderer(scene)),
});
and this is how I am disposing it(on a button click):
this.state.gizmoManager.dispose()
During debugging if I stop the execution a line before dispose I can see that this.state.gizmoManager is not undefined and it contains the GimoManager Object.
Console log of the error
Also I created another project using
@babylonjs/core
and I get this error from it:
@Cedric I think you are the go to guy for anything related gizmos. Can you please take a look at this issue.