# Change material static mesh

**URL:** <https://forums.unrealengine.com/t/change-material-static-mesh/2650899>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [August 25, 2025, 9:40pm UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899 "2025-08-25T21:40:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![FastFishy96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FastFishy96](https://forums.unrealengine.com/u/FastFishy96)\
**Post date:** [August 25, 2025, 9:40pm UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/1 "2025-08-25T21:40:39Z")

</div>

Hello.

I have seen some topics already concerning this matter, but none of those seem to work for me.

I have a blueprint with an aircraft (BP\_Aircraft), consisting of several static meshes. I also have a widget with some buttons. By the click of a certain button (TestButton) on this widget, I want to change the material of one of those static meshes (Cabin Main) in the blueprint BP\_Aircraft to a fixed material that I have (Glass) and change it back to its ‘original’ material (Metal) when clicking the same button. What I have now is this for only changing it to Glass:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/d/fdd67c4ae34cc36462068e978bea5652a5bb3476.png)

With some topic discussions, this should work (since I have set the material and the actor class). Some other topics state that I need to create a dynamic material instance and then attach a material variable to that, but for me that would be strange I think since I’ve fixed the material to Glass. In any case: nothing works for me and I don’t get errors, so what I have is not wrong but it does miss something. I just have no idea what I’m missing.

I hope anyone can help.

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [August 26, 2025, 2:26am UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/2 "2025-08-26T02:26:41Z")

</div>

Create an event in BP\_AirCraft … `Update Fuselage`

`Update Fuselage` → `Set Material (static mesh component)`

In the Widget get a reference to the BP\_Aircraft instance and call the `Update Fuselage` event.

* * *

Semantics wise you should not be using `Get all Actors of Class` for this. You should have a direct reference to the specific instance before clicking the button. How is dependent on what class is implementing the UI and your overall setup.

---

<div class="post-metadata">

**Author:** ![LegendGary](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LegendGary](https://forums.unrealengine.com/u/LegendGary)\
**Post date:** [August 26, 2025, 2:38am UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/4 "2025-08-26T02:38:43Z")

</div>

![Screenshot_108](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/f/5fff86d29d7a946143503e1bd4bbedf3bae67aa5.png)

---

<div class="post-metadata">

**Author:** ![FastFishy96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FastFishy96](https://forums.unrealengine.com/u/FastFishy96)\
**Post date:** [August 26, 2025, 4:22pm UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/5 "2025-08-26T16:22:38Z")

</div>

Hello, I tried this but I get a lot of errors:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/b/dfb3b0b9df67a113458a932dc4eca876213834be.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/0/03025165b040c542aabe3d3c10f07feebc6417ae.png)

---

<div class="post-metadata">

**Author:** ![FastFishy96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FastFishy96](https://forums.unrealengine.com/u/FastFishy96)\
**Post date:** [August 26, 2025, 4:27pm UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/6 "2025-08-26T16:27:02Z")

</div>

I tried this, but I get some errors.

In the aircraft blueprint I have:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/5/1b5d16a01874f5a112004704b43dbe1cce2dd584.png)

Then I have this in the widget:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/b/deb3424c5e00679d20999040cfafe0aebf2d1079.png)

Where Aircraft is:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/d/4cd4ec5f610740aa1eeec807f9bce143725e927d.png)

When I run it, nothing happens and I get:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/b/9cb7e5a397a14edaa37f97d4703e6899409389a7.png)

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [August 26, 2025, 6:48pm UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/7 "2025-08-26T18:48:41Z")

</div>

You have to set the value of aircraft. It’s currently empty.

---

<div class="post-metadata">

**Author:** ![FastFishy96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FastFishy96](https://forums.unrealengine.com/u/FastFishy96)\
**Post date:** [August 26, 2025, 7:15pm UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/8 "2025-08-26T19:15:22Z")

</div>

Can you eloborate on this? I’m new to Unreal Engine and try to learn it.

What I thought was to create a variable in the Level Blueprint named “Aircraft”, referencing to the BP Aircraft:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/b/7ebecc1a0ad37fe31db0166d0661ccae3a727f2c.png)

But I think I need to do more. Could you please explain what exactly? And how?

I think the problem is somewhere here:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/8/c48120f7cb76cbbd0c7e1e53280bbd39768ad4b5.png)

But no idea how to get from None to something useful.

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [August 26, 2025, 10:43pm UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/9 "2025-08-26T22:43:18Z")

</div>

The variable is just a placeholder. You need to get a reference to the specific instance that’s loaded in the game world. For example `Get all actors of class` returns references to all instances of that class that are loaded into the game world. If there are none the returned array would be empty. If you have 10, then all 10 are randomly listed in the array.

I have no idea what your game is about or any of its design so I can’t tell you how to get the specific reference.

If I had an actor in the game I could modify I would probably start by interacting with it. On interaction I’d have the UI display and give me options. The interaction part is where I’d get and store a reference.

---

<div class="post-metadata">

**Author:** ![LegendGary](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LegendGary](https://forums.unrealengine.com/u/LegendGary)\
**Post date:** [August 27, 2025, 2:23am UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/10 "2025-08-27T02:23:48Z")

</div>

![Screenshot_114](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/e/80e80028cb6caf451a51ffa0c0cbe02d7cff2554.png)

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [August 27, 2025, 2:29am UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/11 "2025-08-27T02:29:24Z")

</div>

What class is loading the UI?

---

<div class="post-metadata">

**Author:** ![FastFishy96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FastFishy96](https://forums.unrealengine.com/u/FastFishy96)\
**Post date:** [August 27, 2025, 7:23am UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/12 "2025-08-27T07:23:14Z")

</div>

The basis for my game is a tutorial posted by Cesium: [Build a Flight Tracker with Cesium for Unreal – Cesium](https://cesium.com/learn/unreal/unreal-flight-tracker/) . So the aircraft is a static mesh in a blueprint that moves around the Cesium globe along a track that is set in C++. I made it bigger with a widget and some buttons, but it is still blueprint with a static mesh that moves along a track. Does this help?

---

<div class="post-metadata">

**Author:** ![FastFishy96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FastFishy96](https://forums.unrealengine.com/u/FastFishy96)\
**Post date:** [August 27, 2025, 3:18pm UTC](https://forums.unrealengine.com/t/change-material-static-mesh/2650899/13 "2025-08-27T15:18:37Z")

</div>

This works! You said not recommended, so what do you recommend?
