[SOLVED] Asset Registry currently broken

Somewhere between engine v1.24.0 and v1.24.5, a change to the engine was made that has broken the Asset Registy when it is used to swap between two different models for the same entity. I discovered this when we made a routine change to a delivered project and found that we could switch to the second objects, but got failures when we switched back. The failures are usually of a type related to materials modifications subsequent to changing the model resource. This appears to happen because the model appears to be null.

It appears that switching from the original model to a secondary one works fine, but switching back is where the failure occurs. I see Asset Registry failures in one of my sandbox test projects as well as in the Asset Registry tutorial that I forked. So this is not unique to one project.

https://developer.playcanvas.com/en/tutorials/using-assets/
My fork of it:
https://playcanvas.com/project/663345/overview/model-change-asset-registry

After launch, press and hold the Spacebar and you will see the letter change to a “B”. But when you release the Spacebar to revert back to “A”, you get the failure.

My sandbox test project
https://playcanvas.com/project/663345/overview/model-change-asset-registry

Click the grey cube on the right and the ball changes to a cube. Note that there is code in place to change the materials to those native to the cube. Click the grey cube on the left and the cube changes back to a ball. There is no material change code since our experience is that this process “wants” to revert to the original material resources. Click the grey cube on the right a second time and we get a failure.

All models do not seem to be affected. In our main project where we first ran into this, many complex models worked fine but three simple 2D rectangle models with only one material failed. We have one model that only fails on a third change much like in our sandbox project. When I manually copied the v1.24.0 PlayCanvas engine files to the published project folder that we had updated, everything works perfectly.

@will

Thanks for reporting this. I’ve reproduced the problem. We’ll investigate.

Narrowed it down. The change occurred between 1.24.3 and 1.24.4.

Great. That should help to figure out what happened.

I know it is carried forward into v1.24.6.

This almost certainly originated from one of the PRs submitted by @moka. Figuring out which one…

Found it:

Issue submitted here:

Please subscribe to that for updates.

1 Like

OK. Presumably this will be addressed relatively quickly.

Thanks for looking at this right away.

Implemented fix to probably source of an issue. Your project mentioned in first post, seems not working anymore.

Oops! I had changed the camera angles to check something else. I moved them back and I still see the same issue. Third change still fails. I can change to cube, back to sphere, but when I go to cube the second time there is a failure.

I will check further later on what is happening with other projects.

Did a quick check of my clone of the original tutorial for using the Asset Registry and it also still fails in the same way.

https://launch.playcanvas.com/869830?debug=true

As I’m thinking about this, I’m wondering if I have to re-fork these projects to get them to load the new engine. Right now they are launching:
Powered by PlayCanvas 1.24.6 5957521

I forked the two projects and have the same issue. So right now I’m assuming that this fix has simply not propagated into the current environment. I’m pretty sure that engine 1.24.6 is not new and wouldn’t have the fix.

I reverted the original commit that introduced this problem today. But I haven’t yet deployed engine 1.24.7. Hopefully will do that tomorrow!

I checked all three scenes where we observed this problem and all appear to be working properly now with engine build 1.24.7

2 Likes

Excellent. Thanks for letting us know.