this is the basic concept. However right now it was all manually done in gimp from a screenshot from the thumbnails of material instances in unreal. I would like to have a way to only change One array of materials and the UI to update to those new materials.
But for that I would need to be able to get the thumbnails and then update them preferable pre construct so it shows properly in the editor.
So is there anyway to get access to these thumbnails? I feel like they have to be stored somewhere but have been unable to find them and would it still work on a shipped game(Since it might be editor only?)
This will be somewhat difficult to create depending on your experience with Unreal Engine. (I guess it all depends on your level of experiencing when it comes to programming.)
You will want to create this in the UMG Widget using a suitable container. The less you have to spend aligning buttons the better. In any case, you would want one container for the buttons like, Floors, Wood, Walls, etc., and a separate one for the other material buttons.
You can create a database of buttons or if you want to separate them you can simply create smaller arrays for each category. You also might want to preload the menu so that the player doesn’t have to regenerate the button images over and over again.
You can use the Construct event to trigger the population of the menu. Simply take the array of textures that you have setup and use a for loop to add the buttons with the correct material and texture assigned.
The best solution in my opinion would however be to find a free project that has a tool similar to this already implemented. This will save you a lot of time, as well as have something to reference back to.
Thank you for the tips, I will have a look at the market place if I can find something I like. though I would like to atleast understand how to make one myself. but having a reference point is a good idea.
I know its been a while. but I have been looking at the problem and got most of it working. the only issue I have right now is that I can’t seem to find a way to communicate between blueprints in the editor.
I got a blueprint setup in a sepperate level that can create thumbnails and put it into a array.
but I am not sure how to get a material array from another place and then also send the thumbnail array to the widget.
however if I can do that I got the widget setup to fill in the textures on the button.
I have been trying different things. but none seem to quite work in editor. I have been trying in just blueprints right now. but it all seems to need some kind of cast reference. which doesn’t seem to work since: 1. its not playing the game and 2. its in a different level
so the basic plan is:
A material array somewhere → thumbnail maker → Widget set thumbnails to the buttons.
so I could use some more advice on.
where to store materials to be easily accesable to both the Thumbnail maker and ingame for the player character to set the material.
how to communicate between blueprints in the editor
It sounds like you’re trying to communicate between blueprints in the editor, but are having trouble with cast references and accessing material arrays.
One approach would be to create a separate Blueprint asset that stores the material array, and then reference that Blueprint from both the Thumbnail maker and the player character. This would allow you to easily update the material array in one place and have it accessible to both Blueprints. Alternatively, you could store the material array in a data table or a game instance, which can be accessed from any Blueprint in your project.
There are a few different ways you can communicate between Blueprints in the editor:
Event dispatchers: These are custom events that you can define in one Blueprint and broadcast to other Blueprints. To use an event dispatcher, you would create an event dispatcher in the Blueprint that needs to send information, and then bind to that event in the Blueprint that needs to receive the information. When the event is broadcast, the receiving Blueprint’s bound function will be called with any data that was passed along with the event.
Interface messages: Interfaces allow you to define a set of functions that can be implemented by multiple Blueprints. To use an interface, you would define an interface that includes the functions you want to use to communicate between Blueprints, and then implement that interface in the Blueprints that need to communicate. When you call a function defined in the interface, it will call the implementation of that function in the Blueprint that is currently using the interface.
Object references: You can also communicate between Blueprints by passing object references. To do this, you would create a reference to the Blueprint you want to communicate with (either by getting a reference to an instance of that Blueprint or by creating a new instance of it), and then call functions or access properties on that object reference.
Overall, which approach you choose will depend on the specific needs of your project and the complexity of the communication you need to achieve.
is communication in the editor different? I am trying to send something to a widget
maybe I just can’t find the right property for the variable. but I can’t seem to find anyway to get a proper reference. Trying it directly and with a blueprint interface. but it just won’t fire.
I tried both these 2 ways I could find.
the Target widget doesn’t give any errors but also doesn’t seem to work.
the direct WBP reference doesn’t seem to return anything. just acceses nothing.
also would it matter if they are in sepperate levels? I made a special level just for the thumbnail renderer. could that be part of the reason they can’t easily reference eachother?