# Dynamically Create and Set Material Instance for Specific Emitter in Unreal Engine C++

**URL:** <https://forums.unrealengine.com/t/dynamically-create-and-set-material-instance-for-specific-emitter-in-unreal-engine-c/2003397>\
**Category:** FX\
**Tags:** unreal-engine, question, CPP\
**Created:** [September 3, 2024, 12:38pm UTC](https://forums.unrealengine.com/t/dynamically-create-and-set-material-instance-for-specific-emitter-in-unreal-engine-c/2003397 "2024-09-03T12:38:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JokerDoky](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JokerDoky](https://forums.unrealengine.com/u/JokerDoky)\
**Post date:** [September 3, 2024, 12:38pm UTC](https://forums.unrealengine.com/t/dynamically-create-and-set-material-instance-for-specific-emitter-in-unreal-engine-c/2003397/1 "2024-09-03T12:38:41Z")

</div>

Hello,

I’m working with Niagara particle systems in Unreal Engine using C++, and I need to dynamically create and set a material instance for a specific emitter within a particle system.

1. How can I dynamically create and set a material instance for a specific emitter in a Niagara particle system using C++?
2. How can I determine the index of an emitter within a Niagara system, and is it possible to get the index of an emitter by its name?

Any guidance or code examples would be greatly appreciated!

Thank you!
