How can we change the material Index for Face3 after the mesh is created

I read earlier answers that the material index of the faces cannot be overridden after the mesh has been created ?
can someone help with a solution?

The best thing to do here is create a very simple mesh with just two faces and test this yourself.

Then if you think the docs don’t explain this adequately please update them.

Hello thank you for your reply but the problem here is that i have a common geometry that contains lots of shapes and each shape has 2 texture materials usually when you pass to mesh array of materials it goes through them one step at a time what i need to do here is that we go over the shape twice first texture for all the faces except the upper surface faces and the second texture is for the upper surface faces.
Did someone did override the mesh materials so we can specify the steps to go over the materials?

either way thank you i resolved it later