How to use two different material on a same object using material functions without using material ID?

I need to use two different material on a same mesh without using material ID. I recently came across that we could use material functions, but other methods are also fine. I just need to use different material on different locations on my mesh. Because in user interface i want to give access for change material .I am new to unreal so please bare with me if i make any mistakes. Thanku!! It would help me a lot if the problem is solved.

One posibility is to use the vertex color information to apply diferent materials to diferents parts of the model. but all you materials ( material functions can work better here) need to be in the same master material you are using in your model.

thank u. Actually the material that i am using have procedural controls like tiling the textures with various offsets, scaling so i guess i cannot use the vertex information. Is there any other way to do them.

could i use other materials inside other material??

thanks for your reply.