x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Change the material by selecting options in Combo-box

Hi,

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!

alt text

Game View when playing

Level blueprint for cone shape

Design view for combobox

Graph view blueprint when selecting elements in combobox

Product Version: Not Selected
Tags:
more ▼

asked Jan 12 '15 at 06:29 PM in Everything Else

avatar image

purmo037
30 10 13 20

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/MaterialInstances/index.html

more ▼

answered Jan 24 '15 at 01:37 PM

avatar image

Shadowriver
37.2k 936 172 1116

avatar image purmo037 Jan 24 '15 at 01:48 PM

How do I pop up that menu when I select that material?

avatar image Shadowriver Jan 24 '15 at 02:40 PM

What menu?

avatar image purmo037 Jan 24 '15 at 04:45 PM

When I mouse click on Material, it should pop up asking to change to the other Material from the menu like to choose/change the Materials from Dropdown_Menu or Combobox, etc

avatar image Shadowriver Jan 24 '15 at 05:05 PM

Well go check matrial instace docs, i think if you use material instace as material in editor, editable parameters should apper in details or something like that

avatar image purmo037 Jan 26 '15 at 01:14 PM

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 into it. Can someone please help to solve this issue!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question