Dynamic Material Instances

I have a mesh with several materials on it, but when I try to create a dynamic material instance for it, the whole mesh gets affected. I was wondering if there’s any way to specify which material on the mesh I want it to affect?

There is an index you pass when you create or assign a dmi that represents which material it affects