How to get the PBRMaterial form the Mesh and update the value;

How to get the PBRMaterial form the Mesh and update the value, when i use getRenderingMesh().material will return material not the PBRMaterial. how to get it and PBRMaterail and change the albedo Texture

If the material of your mesh is a PBRMaterial, you do get it when doing .material.

So you can simply do getRenderingMesh().material.albedoTexture = ....

1 Like