How to Equip Weapons and Items in Unity (Drag Drop, Inventory)

✅ Get the Project files and Utilities at
Let’s make a UI Window so we can Drag Weapons and Items into various Slots to Equip them!

Character Portrait Window

Simple Inventory

Simple Drag Drop

Modular Spritesheets

If you have any questions post them in the comments and I’ll do my best to answer them.

🔔 Subscribe for more Unity Tutorials

See you next time!

📍 Support on Patreon
🤖 Join the Community Discord
📦 Grab the Game Bundle at
📝 Get the Code Monkey Utilities at

#unitytutorial #unity3d #unity2d


Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.

I’ve been developing games for several years with 7 published games on Steam and now I’m sharing my knowledge to help you on your own game development journey.

You can see my games at


– Website:
– Twitter:
– Facebook:


Xem thêm bài viết khác:

  1. Code Monkey 9 months ago

    Drag and Drop to Equip Items! Stay tuned for a future video covering Crafting which we can then use to Equip!
    🎮 Play 7 Awesome Games (Action, Strategy, Management) and Help Support the Channel!

    ✅ Get the Game Bundle 67% off

  2. David 9 months ago

    not work the link of the download page 🙁

  3. Abrasive Toast 9 months ago

    How are you changing the sprite used when you equip a different armor? Is it using the same animator?

  4. Conkuist 9 months ago

    How do i reset the dragged item wenn its not over a slot?

  5. Ray Smith 9 months ago

    informative, but just too fast to follow.. you should pause b4 u switch screens so the viewer has time to downshift.

  6. bishesh 9 months ago

    CodeMonkey, Can you help please!..
    While dropping the drag item on target slot, my debug did not detech what item is being drag. It just prints this:
    Drag item is:items

    what could cause this, I'm very new and following your videos from scratch, But now I'm stuck here for few day couldnot figure out the cause.
    my script on target slot is:
    public void OnDrop(PointerEventData eventData)


    items items = UI_ItemDrag.Instance.GetItem();
    //items is my class which holds items
    //OnItemDropped?.Invoke(this, new OnItemDroppedEventArgs { items = items });

    Debug.Log("Drag item is:" + items);


  7. Fabricio Dorneles 9 months ago

    Thanks for the tutorial!! There is a video that you explain the UI_ItemDrag Script, The pfUI_ItemDrag, pfUI_Item? Because I made the Inventory Tutorial and the Drag n Drop too and I don´t find the explanation for that items. Anyway It´s very nice tutorial. Thank you.

  8. adamodimattia 9 months ago

    Hi, Code Monkey, I'm using Unity 2019.3, I have Lightweight RP installed but I got this error and I couldn't find anywhere what to do about it: error CS0619: 'Light2D' is obsolete: 'LWRP -> Universal (UnityUpgradable) -> UnityEngine.Experimental.Rendering.Universal.Light2D'. How it can be modified to make it run from UniversalRP? I guess in newer versions of unity LWRP is no more 🙂 In any case I decided to follow the tutorial from 2019.2 🙂

  9. NUOVA 9 months ago

    hey i just found ur channel so i wanna ask, im creating a 2d hack an slash side scroller game, so i was hoping tht could u point me in the right direction on how to start making it? like from creating assets to coding them

    thank u

  10. Paul PRIN 9 months ago

    Your drag and drop tech doesn't work have you got any solution
    When I drag it, it when I drop it, it doesn't anchore to the position and doesn't event put in the log what I've putten

  11. Long Wang 9 months ago

    When I imported the project file, I got a bunch of errors … I used 2019.3

  12. Mustafa Cinoğlu 9 months ago

    how do you make that sword animation

  13. CamaWars Official 9 months ago

    We could use these tutorials to make 3D games too?

  14. BrokenGlassGamers 9 months ago

    This f@cking legend bro i love you

  15. Anders Överfors 9 months ago

    I'm not able to download the project files. The download button redirects me to a "Project Files for this Video are currently exclusive to Patreon for 3 days" page.
    The video was uploaded 5 days ago

  16. Bacon Bacon 9 months ago

    Hey thanks for this, this video will help me out with a game me and my friends are designing

  17. husejinbg 9 months ago

    Could you make an anti Cheat system please

  18. Flappy Pancakezz 9 months ago

    Hey! Love the videos, quick question. I can’t find any tutorial on if you hold down a button the character will charge a jump and then depending on which button I.e. left or right button you’ll jump that way on release of the jump button. I was wondering mostly on iOS or Android

  19. ElectricEel Gaming 9 months ago

    15 th comment

  20. Naraku 9 months ago

    This might sounds random but I really love your Unity skin, mind if share how to set up it?

  21. Tigran Sahakyan 9 months ago

    Please make a video with step by step creating your animation system with multiple body parts
    I know you have similar video but you're explaining a little hars in thay video.
    Will be grrat to see that video if you make it))
    And also this system is one of the greatest examples of inventory system i've ever seen! Keep going))

  22. Tobias Linz 9 months ago

    Hi Codemonkey!
    I have a question about your Tilemap video:
    You only used four textures to show how it works but what to do if you had 100 textures? Wouldn't the Picture with the Textures get a bit too big? And how does the built in Unity Tilemap handle that?

  23. Djordje Lukic 9 months ago

    Thanks for the video! It would be great if the player didn't try to punch the air when you click on a item in the inventory

  24. KURD KNIGHT 9 months ago

    Is there a way to download unity on android?

  25. m0ist 9 months ago


Leave a Comment

Your email address will not be published.

You may also like