Consider looking into dynamic material instances and parameter collections - it allows you to do all that and more, at run-time and without having to manually creating material instances.
Consider looking into dynamic material instances and parameter collections - it allows you to do all that and more, at run-time and without having to manually creating material instances.