[engine] Fix the issue where UV values are not updated during texture switching

This commit is contained in:
SmallMain 2024-12-05 13:00:24 +08:00
parent 276479cba3
commit a4ec2b24dd
No known key found for this signature in database

View File

@ -495,6 +495,7 @@ var Sprite = cc.Class({
const textureImpl = texture && texture.getImpl(); const textureImpl = texture && texture.getImpl();
if (material.getProperty('texture') !== textureImpl) { if (material.getProperty('texture') !== textureImpl) {
material.setProperty('texture', texture); material.setProperty('texture', texture);
this.setVertsDirty();
} }
} }