Search code examples
c#unreal-engine4unreal-blueprint

Is there an api interface to do material swapping with Unreal?


Is there an interface so that I can do material swapping through an external program on a PC?

I have a tablet that is used to control other settings, and I want to use this as a way to swap materials. The tablet connects over wifi to a c# program on the PC. This c# program is what launches the Unreal environment (packaged into an executable).

I know I can create a gui in my Unreal project that can do that swapping, but the only user input I have is the tablet, so I need a way to programmatically tell Unreal to swap material, through an API call, or something similar.

Is this possible?

Alternatively it looks like I can hook up the static mesh to change material on a key press...so I could maybe emulate the key press from my program, but this seems like more of a hack than a real solution.


Solution

  • No, there is nothing like that, however, If you want it to be like this, the best way through socket programming .

    You make a server , that receive the input from your tablet , like simple text "Change Mat", and server will receive it, and sent it to your unreal game client , then it make the changes . I did something similar but was on unity instead.