how can I make something like inventory of material where I can store materials
and give the player apply them to the object by dragging them on it?
(like twinmotion)
You’ve got your work cut out. You need to know about 3 things
- Inventory systems
- Widget drag and drop
- Save game
thank you, but it not entirely what I’m looking for I mean the assets supposed to be already in a storage
and just to have the ability to drag and drop the on the model, so i thought to have an a listview
and the assets already on viewport and based on datasmith
You will be ‘playing’ a level ( map ) to enable the user to drag and drop.
After they have made changes, and quit, next time they run the level, all changes will be lost. That’s what the save game is for.
inventory of material where I can store materials
and give the player apply them to the object by dragging them on it?
Like this right?
You’d use ListView if you had A LOT of assets to deal with, it does bring quite a bit of additional complexity to the table, ofc.
yes the projects have A LOT of assets to deal with
The Drag Cancel + Trace technique should work in any case. Whether you use a simple container or a fancy listview does not matter - it only affects how you handle the data in the background.
can you provide the solution for me?
It’s in the link above. And if you’re asking for the entire working system, then no.
- break the system into smaller pieces
- show us where you are / how you’ve progressed
- do tell what snags you’ve run into - what is not working and / or should be improved
- start by reading up on list view - it’s not trivial
- organise the data for the list view objects - perhaps a DataTable could work
- make widgets that represent the materials
- ensure they can show UI materials but also support storing data for other material domains
- ensure you can load the data from the DT into widgets (or the objects the ListView uses)
- implement the aforementioned drag & drop + trace
- work on any kinks, bugs and edge case scenarios
- expand, refactor what is needed
The above assumes you already know UMG well. If you do not, then I’d start by learning the basics of UI first. You can focus on the elements you need.
- UI materials
- drag & drop
- container panels
- list views
- blueprint communications
This is a great start, actually: