Remove dynamic material instance from certain meshes

Hey,

Does anyone know if there is a way to remove a created dynamic material instance from certain static meshes?

I’m basically creating something where I click on the actor and it creates a sphere mask around that actor and slowly shrinks it and hides all the other meshes surrounding it. It works by setting a parameter on the base material that tells it to enable or disbale the opacity mask mateial function. I can set it to ignore the mask but I can’t figure out how to set it back. I need to set it back or because when I click on a new actor it will just stack and now ignore 2.

Bump

done a lot of investigating and can’t get anything to work, maybe there’s another solution or workaround?