# inventory/library assets at runtime

**URL:** <https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740>\
**Category:** UI\
**Tags:** unreal-engine, twinmotion, Widget, Blueprint, question\
**Created:** [June 26, 2023, 4:48am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740 "2023-06-26T04:48:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![THDeigns](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@THDeigns](https://forums.unrealengine.com/u/THDeigns)\
**Post date:** [June 26, 2023, 4:48am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/1 "2023-06-26T04:48:18Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 26, 2023, 5:54am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/2 "2023-06-26T05:54:50Z")

</div>

You’ve got your work cut out. You need to know about 3 things

1. Inventory systems

https://www.youtube.com/embed/yxqSkFNAzE0?feature=oembed&wmode=opaque&list=PL4G2bSPE_8uktjEdP4ZuRq5r2o4JMdZfM

1. Widget drag and drop

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/f/1ff901e8ae888f0a7aa9d01b585ac99919ac1cea.jpeg "Unreal Engine 5 Tutorial - Inventory System Part 8: Drag and Drop Widget") ](https://www.youtube.com/watch?v=QKmqjE-ZDrM)

1. Save game

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/6/396c19403f716c31b4a6bf284740166521894f96.jpeg "Save And Load Player Stats - Unreal Engine Tutorial") ](https://www.youtube.com/watch?v=HJxYPJF6wzk)

---

<div class="post-metadata">

**Author:** ![THDeigns](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@THDeigns](https://forums.unrealengine.com/u/THDeigns)\
**Post date:** [June 26, 2023, 7:20am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/4 "2023-06-26T07:20:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 26, 2023, 7:25am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/5 "2023-06-26T07:25:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 26, 2023, 7:28am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/6 "2023-06-26T07:28:48Z")

</div>

> [@THDeigns](#):
>
> 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

> 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?

> [@Drag and Drop Material](https://forums.unrealengine.com/t/drag-and-drop-material/458600/4):
>
> The below assumes you know how to drag and drop and handle widgets, it’s not a tutorial, just a method: I got it to work pretty quickly by creating a custom drag & drop OPeration. When dragging, create the OP as usual but since we are using a custom OP, you can have it dispatch data - this is bound to a custom event in the Player Controller - this is necessary because the OP itself cannot access the player controller. We’re sending the material and the mouse coords: W…

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.

---

<div class="post-metadata">

**Author:** ![THDeigns](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@THDeigns](https://forums.unrealengine.com/u/THDeigns)\
**Post date:** [June 26, 2023, 7:32am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/7 "2023-06-26T07:32:53Z")

</div>

> [@Everynone](#):
>
> You’d use ListView if you had A LOT of assets to deal with, it does bring quiet a bit of additional complexity to the table, ofc.

yes the projects have A LOT of assets to deal with

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 26, 2023, 7:35am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/8 "2023-06-26T07:35:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![THDeigns](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@THDeigns](https://forums.unrealengine.com/u/THDeigns)\
**Post date:** [June 26, 2023, 7:42am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/9 "2023-06-26T07:42:23Z")

</div>

can you provide the solution for me?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 26, 2023, 7:42am UTC](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/10 "2023-06-26T07:42:36Z")

</div>

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:

> [@inventory/library assets at runtime](https://forums.unrealengine.com/t/inventory-library-assets-at-runtime/1210740/2):
>
> You’ve got your work cut out. You need to know about 3 things Inventory systems Widget drag and drop [[Unreal Engine 5 Tutorial - Inventory System Part 8: Drag and Drop Widget] ](https://www.youtube.com/watch?v=QKmqjE-ZDrM) Save game [[Save And Load Player Stats - Unreal Engine Tutorial] ](https://www.youtube.com/watch?v=HJxYPJF6wzk)
