Editor Utility Tool - Set Phys Mat

This Unreal Engine tool lets sound designers easily change and manage physical materials across Materials, Material Instances, and Static Mesh Actors. Perfect for customizing and fine-tuning in-game audio by instantly swapping material sound properties.

UNREAL AUDIO

Chris Chen

8/13/20252 min read

I made a tool using Unreal's EUW. These tools are great for streamlining implementation on things that require a lot of repetition.

Here is a video of me talking about it.

You can see towards the end of the logic that it casts to another widget—A pop up widget added to a canvas panel. This is where the widget lets you choose the first or second material to modify if there are multiple.

Here's a look at my blueprint for WBP_MaterialListItem

I learned quite a few things developing this tool. It was a bit of a challenge to figure out the GetSelectedItems when using the WBP as an entry to the EUW's listview.


If I used GetSelectedItems, if I clicked one item, it would go into a group, i.e.; MaterialListItem C_0

and the second item I clicked would group both into a new group (C_1)

So each click made a group. First selected item, group 1

Second selected item, groups first and second selected item into group 2.

This was causing issues if item 1 had one material and item 2 had two materials, showing both items as having two materials since they were grouped together.

Caching the items in a variable fixed this so that each selection would be in its own group. Really useful, since the listview I made had the selection mode set to Multi, because the whole purpose of this widget was making it easy to mod multiple items at once.

As far as I know, in Unreal 5.6, a Material's physical material aren't exposed to be editable in blueprints. Material instances are though, making it really easy to just use a map from the drop down combo and set.

Changing the PhysMat on Material required some python. Here's a look at a function I created to change the PhysMats on Materials directly.

I had to place a python script where Unreal will search for it on Startup. Also making sure the Python plugins are set up in Unreal.

Find that by typing:

import sys

print(sys.path)

In my case. I had mine in my \Intermediate\PipInstall\Lib\site-packages folder.

Here is a look at the EUW blueprint. I set up the path of the physical material folder so that anytime a new PhysMat was added, it is automatically added into the ComboBoxString.

And of course all of the logic to call the functions to set material.

The last thing I'd like to mention is having to make a struct in order to get the StaticMeshActor to filter out its respective PhysMat in the search to show up properly in the TileView