# Adding More Variable Types to PhysicalMaterial.h

**URL:** <https://forums.unrealengine.com/t/adding-more-variable-types-to-physicalmaterial-h/2466999>\
**Category:** C++\
**Tags:** unreal-engine, CPP\
**Created:** [April 20, 2025, 10:24pm UTC](https://forums.unrealengine.com/t/adding-more-variable-types-to-physicalmaterial-h/2466999 "2025-04-20T22:24:28Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![RedGrimnir](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/redgrimnir/32/1054683_2.png) [@RedGrimnir](https://forums.unrealengine.com/u/RedGrimnir)\
**Post date:** [April 24, 2025, 8:18pm UTC](https://forums.unrealengine.com/t/adding-more-variable-types-to-physicalmaterial-h/2466999/7 "2025-04-24T20:18:27Z")

</div>

Hey there,

So I was able to add some variables to PhysicalMaterial.h . I also tried to add something more complex like a MaterialInterface as you do with #include “Materials/MaterialInterface.h”  
reference to it and had no problems (with my limited knowledge)

```auto
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = PhysicalProperties)
	TSoftObjectPtr<UMaterialInterface> TestInstance;

```

Also you need to add Engine dependency to PhysicsCore.Build.cs or if there is a dependency.

When I directly edited the builded engine code however I get errors similar to your output, however when I build the engine from source have no issues as modified engine.

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

For that please [https://github.com/EpicGames/UnrealEngine](https://github.com/EpicGames/UnrealEngine) access to Epic organisation and access UE source and follow the instructions to build from source. After that you can modify the code as allows. [You want to contribute to Unreal Engine? Here’s how!](https://forums.unrealengine.com/t/you-want-to-contribute-to-unreal-engine-here-s-how/154880)

This being said, I would like to give a heads up for couple of things, just as opinion.  
As logic I would expect here to have phsyics properties and coralated things as another class, like sound etc.

However If I was building a physics related feature in Engine, let’s say Sound Propagation which is coralated with porosity and density I would expect it to be listed here. That is a nice feature important for some of the competetive games like Siege. Can be many other physical properties like hardness etc. not subject of the this thread.

Or let’s say I want to build a new physics feature as Heat Dispersion. I would expect to see Heat Dispersion Coefficient to be here as well as melting point , freezing point etc. So in future I can add that to world landscape material and if there is a heatsource in game like a fireplace, I can do various things with physics like: melting snow, increasing the damage received from fire with distance, changing material visual effects like red hot metal etc. gameplay mechanics, like make stamina drain faster if you are in a very cold zone 😃 Many possibilities so it creates even more believable world with minimal effort.

However I would not expect to see a SoundFile, as physical material property, however can be if you need to, Imo those can be another class.

Let me know if this was helpfull.

PS: Thanks also your question push me to make space and time for building the source in my local development space.

---

_[View the full topic](https://forums.unrealengine.com/t/adding-more-variable-types-to-physicalmaterial-h/2466999)._
