*UPDATE* Inventory Master - Inventory System written with the new UI System 4.6 *UPDATE*

>>>Inventory Master on the Assetstore<<<

Demo | Documentation | Script API | Youtube | Support

BIG UPDATE
The asset is getting a rework soon. I know I haven’t answered the most of the email which I got and I also know that there are bunch of small bugs in the asset itselfs. I am really sorry for that, but I had a lot of stuff to do and this will be the past soon. I am actually recoding the complete project with way better structured code and better editor scripting parts for you as a customer. Here are some pictures, where you can see the first changes and new features which will come soon ;):


More is coming soon! I hope you like the update so far!

Current Features:

  • Creating a Player-, Storage-Inventory, Character System(Equipment System), Hotbar, Crafting System:

  • In realtime in the scene mode:

  • Adding Slots

  • Change size of Slots, Itemicon

  • Change padding between the Slots and left, bottom and right side of the inventory

  • Adding Items into the Inventory

  • Change position of the number for Stacking Items

  • Fully customizable design

  • Tooltip

  • Dragging Inventory

  • Dragging/Swapping Items

  • Off/On Stackable Items

  • Manage/Delete/Adding Items through a Itemdatabase

  • Manage/Delete/Adding Blueprints trough a Blueprintdatabase

  • Drop Items on the ground

  • Split Items

I recommend you to watch the video or use the demo about the system:
>>>DEMO<<<

Introductionvideo:

Tutorial Videos:

  1. How to create parts of the Inventory Master asset
  2. Scripting: How to work with the events and inventory script

Asset cost 30$ on the AssetStore
>>>Inventory Master on the Assetstore<<<

If you got some questions just write them ;).

1 Like

Can this asset be used on mobile? Can the slot sizes be made bigger and the stacking functionality more mobile friendly? (everything is so small now)

I did not test it with a mobile phone. But what I can say is that you can change the size of the slots. Is there a specific request of stacking functionality for mobile? I gonna check this soon if it is mobile friendly.

It’s just that the small numbers will be hard to see on mobile, and fingers are fatter than mouse pointers. I hope you can post some results of your mobile test soon. Thank you!

I hope I can find a solution next week. Will write it than :wink:

1 Like

Any chance to get differently sized items possible like 1x1, 1x2, 2x2, 3x6 slots and such the like ? Would be great if that size could just be customizable as sometimes it doesn’t make sense to have items be same size. Also for this it would make sense to be able to alter the mentionend slot size to be either bigger or smaller too. Just have it as customizable as possible while still being easy to use for non-programmers. :wink:

Also if they do how do the items save right now ? Playerprefs, xml, txt or something else or not right now ? If not any plans for it ? :wink:

Best Regards

Also a character paperdoll would be nice. So when you drag an item to a character equipment slot, the equipped item shows up on the paperdoll

Actually it is not possible to change the size of each slot/item. This could be something for the future.
Everything which I provide is for non programmers. If there are some special question you can ask me through email. I answer normally in max. 8 hours. Need some sleep aswell ;).

Saving Items over different scenes is not implemented. It will - do not worry ;).

This is something which I want to implement in the example1 scene for sure. It will come soon. At the moment I am recoding the DragItem class and after this the Craft System will be finished. Actually this also means a price raising.

1 Like

Yeah no problem. Was just curious if this might be possible to get the size changes added as it’s a feature I really need for a inventory. :wink:

Actually fixed some things in an upcoming version:

Version 1.0.1:

  • recoded and documentated the DragItem Script
  • bug fixed where the number of a stack wasn’t placed right
  • fixed a bug where the slotdesign did not taken from the new slot after you changed the design

Here is a voucher code: ASV-L7JL-7JX7-MWVU-JQAJ-VY4F

Some other will come.

Is the voucher for testing?

It is the full asset for free ;). Actually if you got it, you were pretty lucky.

Update with the craft system is waiting for review by the assetstore. You can buy the asset for 15$ until I get a answer from unity. Than it will cost 30$.

First I love that this is fully built in 4.6 as it really shows the power of the new UI in terms of configurability. But I have some criticisms. I don’t want to be overly critical, I bought the asset and while I love the configurability, I have some serious issues with the way you’ve done some things code wise. For example in ItemOnObject:

void Update()                                          
    {
        text.text = ""+ item.itemValue;                     //sets the itemValue        
    }

If Unity had a list of seven deadly code sins, this might be considered one of them. First your updating the text every frame when you should probably update it only when it itemValue changes. And further “”+item.itemValue generates a new string every frame (because strings are immutable) which means a tiny allocation every frame. And this is for every single item in an active inventory, or hotbar or equipment inventory. So if you have 100 items in your inventory you do this 100 time a frame. This quickly scales to unusable.

Another example is in PickUpItem:

void Update () {
       
        float distance = Vector3.Distance(this.gameObject.transform.position, GameObject.FindGameObjectWithTag("Player").transform.position);

        if (distance <= 3 && Input.GetKeyDown(KeyCode.E))
        {
            inv.addItemToInventory(item.itemID, item.itemValue);
            Destroy(this.gameObject);
        }
   
    }

This I assume is put on every item in the world that could be pickedup by the player. The first problem is you’re doing a full distance check every frame for every item that is sitting in the world waiting to be picked up. Second you aren’t caching the players game object when you do it so you are also doing a FindGameObjectWithTag to find the player every frame for every object sitting in the world waiting to be picked up. That function isn’t free and its not something I would advise anyone doing every frame.

I would advise re-factoring this completely and have a script on the player instead (maybe player inventory) that triggers only when Keycode.E is down and inside that condition do a search (if you must) for all items that have a particular tag and do a sqred distance check on those. That way the distance check is only done on the frame that a player actually hits the E key and not every frame.

You also do something similar to this in Storage Inventory (ie for every storage inventory you check distance and search for a player tag every frame).

There are other issues I found, but it mainly revolves around you doing things in update that you really shouldn’t be doing. Get everything out of update that you possibly can. If you are doing a lookup on a gameobject do that in start() or awake() or when the some condition changes that would invalidate your local cache of the gameobject.

I don’t want this to sound like I am bashing you or your product, the intent here is really to help you get this to a point where it is useful to me ( and everyone else as well). I think you’ve put a lot of effort into this and I applaud that but it does have some issue that I hope you can find time to re-factor. Thanks for make this product.

Enoch

Thanks for your post. I really does not see this as a bashing ;). I will look into it and take all you points serious. This update about the fixes will come after the craft system, so this could take some time.
Anyways thank you.

@Enoch thanks for your extremely constructive and enlightening criticism, which I thought you offered with the utmost politeness. I learned something new just by reading your post. Not to hijack this thread, but I was wondering if you could very quickly point out where to read about Unity’s other “deadly code sins”? I’ve already read many articles on Unity best practices but am always open for more learning/refreshing. Thanks!

Looks really nice! Have you thought about controller support? Or, generalizing the input names so we can interface with the system with our own inputs?

Actually this is planned. I started with the Scripting API now.

1 Like