I have a suspicion that the ‘UV channel’ is preventing me from changing a material:
The following should work:
var self = this;
var img = self.app.assets.find('Bottom_NegY.png');
var image = new Image();
var texture = new pc.Texture(self.app.graphicsDevice);
texture.setSource(image);
var material = new pc.StandardMaterial();
material.diffuseMap = texture;
material.update();
self.app.root.findByName("SphereNormText").model.meshInstances[0].material=material;
The script seem to be executing (no err msg in console), but the material doesn’t change?
can the fact that the model is using a material with; UV channel: UV1, be the cause?