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

Collision using unloaded asset bug #3974

Open
ma-vejsada opened this issue Feb 2, 2022 · 2 comments
Open

Collision using unloaded asset bug #3974

ma-vejsada opened this issue Feb 2, 2022 · 2 comments
Labels

Comments

@ma-vejsada
Copy link

Description

Collision component throws an error when using unloaded render asset. Black screen will appear and project could not be launched.

Shortened error:

TypeError: meshes is null
    createPhysicalShape https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.dbg.js?version=1.51.6:51339
    doRecreatePhysicalShape https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.dbg.js?version=1.51.6:51398
    loadAsset https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.dbg.js?version=1.51.6:51377
    ...

Steps to Reproduce

  1. import custom model (as render asset, with hierarchy)
  2. uncheck preloading (both template and render)
  3. create collision component on empty gameobject
  4. assign imported render asset to collision component
  5. launch project
  6. this error appears

Possible solution

  1. Implement asset resource check.
  2. Implement asset awaiter, to wait until asset is loaded, then use the mesh.
@ma-vejsada
Copy link
Author

@yaustar yaustar added area: assets area: physics Physics related issue bug labels Feb 2, 2022
@LeXXik
Copy link
Contributor

LeXXik commented Feb 2, 2022

Possibly duplicate:
#3638

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

No branches or pull requests

3 participants