Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gui.removeFolder gives a Uncaught TypeError: folder.domElement is undefined error #313

Open
rushcodes opened this issue Mar 8, 2022 · 0 comments

Comments

@rushcodes
Copy link

rushcodes commented Mar 8, 2022

When I call:

gui.removeFolder(this.playerId);

or

folder.removeFolder('subfolder');

I get the error:

Uncaught TypeError: folder.domElement is undefined

I'm adding folders and subfolders like so:

this.playerFolder = this.scene.gui.addFolder(this.playerId);
this.targetPositionFolder = this.playerFolder.addFolder('TargetPosition');

this.scene is the scene object from the parent scene sent to a player object, playerId is a unique id per player. I'm calling it in the destroy() function above the super.destroy();

console.log'ing before calling either removeFolder() command shows the id exists. There is also a folder by that name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant