# SetMaterial via UStaticMesh vs UStaticMeshComponent

**URL:** <https://forums.unrealengine.com/t/setmaterial-via-ustaticmesh-vs-ustaticmeshcomponent/481483>\
**Category:** Rendering\
**Tags:** unreal-engine, question, CPP\
**Created:** [April 6, 2021, 2:08pm UTC](https://forums.unrealengine.com/t/setmaterial-via-ustaticmesh-vs-ustaticmeshcomponent/481483 "2021-04-06T14:08:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SasMaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SasMaster](https://forums.unrealengine.com/u/SasMaster)\
**Post date:** [April 6, 2021, 2:08pm UTC](https://forums.unrealengine.com/t/setmaterial-via-ustaticmesh-vs-ustaticmeshcomponent/481483/1 "2021-04-06T14:08:51Z")

</div>

I am working with material runtime tweaking and noticed that one can `SetMaterial()` via `UStaticMesh` or via `UStaticMeshComponent`.

I would like to know if there is any difference which one to use. I haven’t found any documentation that explains the difference.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [April 6, 2021, 4:19pm UTC](https://forums.unrealengine.com/t/setmaterial-via-ustaticmesh-vs-ustaticmeshcomponent/481483/2 "2021-04-06T16:19:57Z")

</div>

Hello! When you set material for **UStaticMesh** - then you change Asset configuration itself (common for many instances). When you do that for **UStatucMeshComponent** - you just override it for some specific instance and that’s all.

---

<div class="post-metadata">

**Author:** ![SasMaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SasMaster](https://forums.unrealengine.com/u/SasMaster)\
**Post date:** [April 6, 2021, 5:34pm UTC](https://forums.unrealengine.com/t/setmaterial-via-ustaticmesh-vs-ustaticmeshcomponent/481483/3 "2021-04-06T17:34:17Z")

</div>

This is very important info to note. Could you post it as an answer so more people would learn the difference? Thanks.
