-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Crash when using non-preloaded material #4498
Comments
So when you I don't think that is right in the first place and a clear type error, what should happen otherwise? Maybe preallocate a |
Yep, you'd have to get the red material asset and 'load' it as usual. Once that's complete, asset.resource should be valid and you can set it on the render component. Perhaps we can also issue a debug message when render.material isn't set cc @mvaligursky ? |
Yes, I understand the reasoning and the cause. Currently the crash is cryptic and hard to debug, especially in multi-user projects. |
Debug warning added in #4524. |
When a render component is changing to a material that was not preloaded, the application crashes.
Repro: https://playcanvas.com/project/965390/overview/material-issue
Repro in 1.54.1 and 1.53.4.
There is no crash, if the changed material is set to preload.
The text was updated successfully, but these errors were encountered: