# Best way to develop an inventory component in CPP UE5?

**URL:** <https://forums.unrealengine.com/t/best-way-to-develop-an-inventory-component-in-cpp-ue5/876780>\
**Category:** C++\
**Tags:** unreal-engine, Widget, CPP\
**Created:** [April 7, 2023, 11:39pm UTC](https://forums.unrealengine.com/t/best-way-to-develop-an-inventory-component-in-cpp-ue5/876780 "2023-04-07T23:39:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Billy-Pilly](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/billy-pilly/32/634378_2.png) [@Billy-Pilly](https://forums.unrealengine.com/u/Billy-Pilly)\
**Post date:** [April 7, 2023, 11:39pm UTC](https://forums.unrealengine.com/t/best-way-to-develop-an-inventory-component-in-cpp-ue5/876780/1 "2023-04-07T23:39:33Z")

</div>

Hey there! Im new here in UE5 and Im trying to learn about inventories.  
I have read about ways to do it in blueprints using an structs array and in cpp UObjects.

Using CPP grants performance.

What’s the best profesional way to create invetory system using cpp?

In my case I want to create the inventory as actor component.

---

<div class="post-metadata">

**Author:** ![eblade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eblade](https://forums.unrealengine.com/u/eblade)\
**Post date:** [April 8, 2023, 12:58am UTC](https://forums.unrealengine.com/t/best-way-to-develop-an-inventory-component-in-cpp-ue5/876780/2 "2023-04-08T00:58:16Z")

</div>

Write out a description of what you need it to do.

Write tests that will make sure that the system does what it needs to do, per the written spec.

Write code that does it.

… same thing for every aspect of software engineering 🙂

Native code is not a magic performance bullet, neither is blueprint a magic performance killer.

“Inventory” could encompass a whole lot of different things. While on one hand, you probably mean a general system for the player or AIs to carry items on their character. On the other, we have absolutely no idea what you need it to do.
