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.
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
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.