Closed yaustar closed 1 year ago
Found the issue. When one entity is selected and then the next one is selected, if the values in the materials array are the same, the bindings aren't updated to link to the new Entity due to this line:
https://github.com/playcanvas/pcui/blob/main/src/components/ArrayInput/index.ts#L549
So the current component inspector with the material when the next entity is selected is still binded/linked to the previous entity hence this behaviour
That's some great detective work @yaustar!
Video of bug which explains this better than I can
https://user-images.githubusercontent.com/16639049/224710427-b76ec0bb-ee99-4058-9cfe-eb82de3c648f.mp4
Repro steps:
I believe there's an issue here where the both render components are using the same material reference