I want to modify the textures of some materials in a project, I have read the documentation and also based on questions posted here, but viewer.findMaterial() returns null.
Here is part of the code I am using.
var viewer = WALK.getViewer();
var textureElementIds = [‘TEXTURE0’, ‘TEXTURE1’, ‘TEXTURE2’];
var texture = textureElementIds;
var material = viewer.findMaterial(‘SOME MATERIAL’);
console.log(‘Find Material:’, material);
material.baseColorTexture = texture;
I have tried to search for different materials but in any case it returns nothing but null.
If anyone is going through the same thing or knows what I could do I would appreciate your help, maybe I need to configure the material in my project or I am missing something to do.