Change the material by selecting options in Combo-box
I am new to Unreal Engine 4. I need to create a window like shown in the png file which is attached with this message. If for example (like shown in png file), I have pink color star. When I click on the pink Material during run time/during game mode, it should pop up Dropdown_Menu or Combobox like the Materials menu in which it should show all the Materials.
I know very well that we can do this using user interface by creating widget for Dropdown_Menu or Combobox but I am not sure how to add the Material items and blueprint for it.
Combobox items can be added in DesignView properties: Content->Default Options. It starts from element 0. I named Material 1 in element 0, Material 2 in element 1 and Material 3 in element 2.
In Graph Blueprint, I am trying to check if Material 1 is selected change the material to Red, if Material 2 is selected change the Material to Blue, if Material 3 is selected change the Material to Green and goes on till how many elements I have added into it.
But I am not getting the correct result for it. I have attached what I have tried. Please check and let me know.
I am also not sure whether this method is correct or not but anyhow can someone please help me to solve this issue!
Any suggestions or help please. Thanks in advance!
Sure, you can send parameters to material shaders (graph you edit in material editor is shader, GPU code) allowing to dynamicly modify how it looks like or even how it animates or even input a texture, its called material instace. And yes you can do that via blueprints, heres docs
Follow this question
Once you sign in you will be able to subscribe for any updates here