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

Make sure the model was loaded before we attempt to remove the mesh #5499

Merged

Conversation

Elettrotecnica
Copy link
Contributor

Fixes #4139

I stumbled on this by having a look at a-painter to see how much it would take to have it running on latest aframe. The same warning would appear and seems the two lines at https://github.com/aframevr/a-painter/blob/0deba1f3314ee4cd053bf2a2ae2854994014dd65/index.html#L50-L51 are responsible.

This seems the same situation as per the example reported in #4139 (comment).

I basically moved the check for the model being present from the remove() to the resetMesh method.

All the best

@dmarcos
Copy link
Member

dmarcos commented Mar 23, 2024

Thanks so much

@dmarcos dmarcos merged commit ede20ae into aframevr:master Mar 23, 2024
1 check passed
Elettrotecnica added a commit to Elettrotecnica/a-painter that referenced this pull request Mar 24, 2024
Elettrotecnica added a commit to Elettrotecnica/a-painter that referenced this pull request Mar 24, 2024
Elettrotecnica added a commit to Elettrotecnica/a-painter that referenced this pull request Mar 24, 2024
Elettrotecnica added a commit to Elettrotecnica/a-painter that referenced this pull request Mar 25, 2024
@wyzwon
Copy link

wyzwon commented Apr 19, 2024

I appreciate you taking the time to fix this!

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

Successfully merging this pull request may close these issues.

core:a-entity:warn Tried to remove Object3D of type: mesh which was not defined.
3 participants