Unity Inventory System - Easy Tutorial

  Рет қаралды 185,887

Solo Game Dev

Solo Game Dev

2 жыл бұрын

Inventory system is used in most of the games. If you need an inventory system in your game, this video is for you. In this video, I will teach you how to make an inventory system from scratch. Enjoy watching.
❤️Join My Channel to Support Me: / sologamedev
💙Subscribe to My Channel: kzfaq.info?...
●For How to Make a Multiplayer Game in Unity | Easy Tutorial: • How To Make A Multipla...
●For Unity Multi-Language System(Localization): • Unity Multi-Language S...
●For How To Make an AR Application in Unity : • How To Make an AR Appl...
Hi from Solo Game Dev. I am a game developer. On this channel, I create easy to learn game development tutorials and develop games with Unity and the other game engines. These tutorials and games also include multiplayer games. In general, I create content related to game development, game design and games.
I also actively respond to comments and feedback so don't be afraid to let me know what you think, or recommend or request a specific video!
Follow and enjoy unique content!
You can follow me on Social Media and send your questions and requests from there!
TWITTER: / sologame_dev
INSTAGRAM: / solo.game.dev
#UnityInventorySystem

Пікірлер: 486
@icresoftgames
@icresoftgames 2 жыл бұрын
For beginners using this tutorial, take note of the enum itemtype section of this video. That will help you interact with your custom button for each item. E.G Use, Combine, Discard buttons. This is a great tutorial by the way
@atifassdi398
@atifassdi398 7 ай бұрын
can you do the inventory like a package and send it for me pleas because i hane problem
@suzypayne2333
@suzypayne2333 9 ай бұрын
At 9:03 if Unity can't find the text component for itemName, try changing to . Thanks for the tutorial! :)
@canyouknot4536
@canyouknot4536 8 ай бұрын
what about if for the image?
@thelongminecart7393
@thelongminecart7393 7 ай бұрын
Thank you so much I spent ages wondering what I did wrong you are the reason I didn't scrap my game thank you so much
@suzypayne2333
@suzypayne2333 7 ай бұрын
@@thelongminecart7393 I'm so glad! Good luck with your game! :))
@Clicks_And_Flicks
@Clicks_And_Flicks 7 ай бұрын
it helped me Thankyou
@aanuutaa
@aanuutaa 3 ай бұрын
thankyou so much!!
@orio69
@orio69 Жыл бұрын
If anyone is having an issue where the use item doesn't work on second time we open the inventory, it is because the inventory item controller array in item manager adds repeated item objects which was supposed to be cleaned via the clean content loop. Solution: Move the clean content loop onto its separate method Add this method to onclick event of close button of whole inventory. Make sure you REMOVE clean content loop from ListItems method. And you will be good to go.
@normalguy845
@normalguy845 Жыл бұрын
Can u give script? XD
@normalguy845
@normalguy845 Жыл бұрын
Or even give me some contact to you it's very important to me
@orio69
@orio69 Жыл бұрын
@@normalguy845 if you follow the steps that I've given you in solution, you should be good to go, given that you have followed this video tutorial till the end.
@marianmarian8882
@marianmarian8882 Жыл бұрын
Thanks man nice job for those who dont know what to do just cut the destroy code above instantiate on list items and paste on a function that close the inventory
@orio69
@orio69 Жыл бұрын
@@marianmarian8882 Glad i could help
@hazen7645
@hazen7645 Жыл бұрын
Wow, this is super cool man. Pretty flexible and easy to expand on. 💯
@barankavlak
@barankavlak 11 ай бұрын
Temiz anlatım için teşekkür ederim. Daha ilk 5 saniyede dedim bu bizim ingilizce aksanı nerede görsem tanırım dedim :D. Eline sağlık tekrardan
@retlyfast4816
@retlyfast4816 2 жыл бұрын
great video man you just save my day i had been working inventory system for month lol
@EXP256
@EXP256 2 жыл бұрын
is it good for a first person shooter?
@jarrahtree5130
@jarrahtree5130 2 жыл бұрын
This tutorial was incredible!
@SoloGameDev
@SoloGameDev 2 жыл бұрын
Thanks :)
@markjeromedelacruz114
@markjeromedelacruz114 Жыл бұрын
Thx .Nice easy beginners guide. helped plenty!
@muhammadfaturohmanristiant960
@muhammadfaturohmanristiant960 Жыл бұрын
Thank you ! You did a great job simplifying such a complex daw....Looking forward to be a great producer
@SoloGameDev
@SoloGameDev Жыл бұрын
Thanks :)
@pedrammoradi6841
@pedrammoradi6841 2 жыл бұрын
This was a great tutorial video! Thanks
@adamlloyd2009
@adamlloyd2009 2 жыл бұрын
If anyone still have problem with the items not showing inside the inventory after pickup, change the itemName line to: var itemName = obj.transform.Find("ItemName").GetComponent(); Worked for me!
@grimaldiemiliano
@grimaldiemiliano 2 жыл бұрын
Thank you, this worked for me!!!
@afutik
@afutik 2 жыл бұрын
Thanks
@gabrielklark3357
@gabrielklark3357 2 жыл бұрын
I suffered a lot before realizing I was using TMPro
@VoidStudios25
@VoidStudios25 27 күн бұрын
For some reason I'm getting the same issue with the Image
@cheesecake906
@cheesecake906 23 күн бұрын
Wait what about the itemIcon? It dosent reconise it and Dosent work
@baphometfromabove
@baphometfromabove 7 ай бұрын
Hello, I have tried to implement an inventory system to my game which is highly inspired by your code and I have noticed something. When dealing with more complex scenarios like opening multiple inventories from different objects ,like chest panel from a chest, the item list gives some error while removing or sometimes in altering. The thing is I think your code is little casual friendly so you didn't go through all sorts of scenarios. For anyone who are getting error while removing an item from a list or processes like that, you have to write a safe code for changing the list. Thing I come up with is to make a copy of Items list and removing item in that copy. After you have done, assign the copy to your Items list. It somewhat like this: public void Remove(Item item) { List newItems = Items; newItems.Remove(item); Items = newItems; } Hope you a good day...
@Martin.Jorgensen
@Martin.Jorgensen Жыл бұрын
If anyone are getting errors from this line: itemName.text = item.itemName; It might be that you have used: var itemName = obj.transform.Find("ItemName").GetComponent(); instead of: var itemName = obj.transform.Find("ItemName").GetComponent(); The button might use the component TextMeshPro instead of the older Text variant. In any case, hope this might help.
@heal4386
@heal4386 Жыл бұрын
You are a real life saver man, i have been trying to figure out the problem for days.
@keaneborg1764
@keaneborg1764 Жыл бұрын
Actual hero, thank you!
@JihyoTheGod
@JihyoTheGod Жыл бұрын
Thank you so much for that, seriously!
@Thecursedshadows
@Thecursedshadows Жыл бұрын
thx mate you really solved my problem... now I have no errors in console but still when I open inventory still nothing new happens weird
@EngPhillipeSedycias
@EngPhillipeSedycias Жыл бұрын
Thank you, it worked for me.
@Glori4n
@Glori4n Жыл бұрын
Hello SoloGameDev! This was by far one of the easiest and most comprehensive inventory tutorials out there, top notch content. Your accent made it a little difficult to understand in some parts but it was very minimal. Thanks for the effort put into this. Best regards!
@SoloGameDev
@SoloGameDev Жыл бұрын
Thanks :) I'm trying to improve my accent.
@tendenciasmediodigital9235
@tendenciasmediodigital9235 Жыл бұрын
TNice tutorials was really helpful for soone coming from Ableton Live and having used Fruity Loops waaaay back in the past
@shadow.7842
@shadow.7842 2 жыл бұрын
Thanks so much! I've been trying to find some like this but they were all either not what I wanted or WAAAY to long and boring.
@smokinglife8980
@smokinglife8980 Жыл бұрын
Thats what happens when you code just wait till theres something you want to add that there is no tutorial too you will just have to sit down and trial and erroe it over and over till you get something that works / you like
@lucamiletti3527
@lucamiletti3527 8 ай бұрын
Thank you so much this helped a lot!
@chritsfootballs
@chritsfootballs Жыл бұрын
For those having issues with duplication in item controller array. Take the logic that cleans the list from list items and make it it’s own method. Then call cleanlist method when you close your inventory
@markvincenttamayo151
@markvincenttamayo151 Жыл бұрын
thankyou so much! I am struggling so much with this problem. Thankyou!
@niventine
@niventine Жыл бұрын
God bless you and all your family! been struggling for a couple of hours on this one
@chritsfootballs
@chritsfootballs Жыл бұрын
@@niventine all good dude, it definitely takes some work arounds
@scoopish2880
@scoopish2880 Жыл бұрын
THANK YOU! THANK YOU!!!!! THANK YOU!!!!!! I KNEEL BENEATH YOUR FEET!!!! THANK YOU SO MUCH!!!!!
@scoopish2880
@scoopish2880 Жыл бұрын
oh and this was a bit unclear but you also gotta keep the original logic that cleans the list where it is. just make another function, dont erase the first one.
@Dani17
@Dani17 Жыл бұрын
hey, i've been using this system recently and I found a bug which I don't know how to fix. I made my objects grabbable when they you are on a trigger but if you grab two objects ore more at the same time they duplicate. It only happens when you grab two objects that are the same type. Please help, I don't know what to do. Thanks
@carloscastro4398
@carloscastro4398 Жыл бұрын
So simple and detailed video, it's now going to help to start working wid softsoft!!
@alexsalontai6365
@alexsalontai6365 2 жыл бұрын
Hey, thank you for the tutorial! I was wondering if there was a way for items to be moved and organized in different slots. Do you also know how to drag the item out of the inventory to be placed down like a prefab?
@SoloGameDev
@SoloGameDev 2 жыл бұрын
Yes but it's a bit complicated. But i will do a tutorial for this soon :)
@nbatrendingshorts
@nbatrendingshorts 2 жыл бұрын
thank u helped me a lot
@ayrtondanielduarte5532
@ayrtondanielduarte5532 Жыл бұрын
BROTHER, YOU ARE THE BEST!!! You oooh really helped me!! THANK YOU VERY MUCH!
@SoloGameDev
@SoloGameDev Жыл бұрын
Thanks :)
@tituskizer6478
@tituskizer6478 6 ай бұрын
Thank you so much!!! This was the only method that worked for me.
@SoloGameDev
@SoloGameDev 6 ай бұрын
Great to hear!
@TheSharkship
@TheSharkship Жыл бұрын
Thanks for the tutorial, this helped me so much but I have a question, how would I save the inventory between scenes and make it so that if the scene was reset the inventory would be the same as it was the first time that scene was loaded
@ukieiri6685
@ukieiri6685 Жыл бұрын
Plus to this
@bonxd
@bonxd Жыл бұрын
Player prefs?
@foreverblessed3511
@foreverblessed3511 Жыл бұрын
Without having watched the video properly, I reckon you will have to have a game object, with a list and have a script that populates the list upon scene completion, from the list in the inventory. Then when you head into the next scene you repopulate inventory list from the list of the game object from previous scene. This is vague and there might be a easier solution but I'm trying to think how this would work (still a noob too :))))
@javipamp
@javipamp Жыл бұрын
It would be great to know how to do that and save it for next game or level.
@TheJakeblake
@TheJakeblake 8 ай бұрын
You would need to serialize the grid in a local database, so the info of the inventory does not gets deleted once you stop playing the game. There is a nice tutorial of Coding with Unity that does that.
@user-lx5or2be7y
@user-lx5or2be7y Жыл бұрын
[I use a translator because I can't speak English] If I press the inventory button to turn it off and then back on, the item inside is not available. What is the solution to this problem? error : NullReferenceException: Object reference not set to an instance of an object
@kiwouine4969
@kiwouine4969 Жыл бұрын
9:23 It does not work for me.When I take the object then I open the inventory there is still no image and the error says: Get component requires that the requested component'image'derives from MonoBehaviour or Component or is an instance. An idea ?
@Marius-pp9pe
@Marius-pp9pe Жыл бұрын
Hello, what you are doing on 5:23, dragging the item to item Controller scripts doesnt work for me? Any idea why?
@btvbharat2154
@btvbharat2154 Жыл бұрын
damn calling out right now. Hey, when you're passionate about sotNice tutorialng it makes you actually want to study it!
@pluacherry5378
@pluacherry5378 2 жыл бұрын
Thanks for the great turtorial, honestly this was on point and clear all the way, rarely do I see a tutorial as easy to follow as this. just one question as I am trying to creat a counter for multiple items of the same type how would you advice me to start on?
@SoloGameDev
@SoloGameDev 2 жыл бұрын
You can add quantity text in Prefab. Then, before clicking on the items, if there is the same item in the list of added items, you can only increase the number.
@pluacherry5378
@pluacherry5378 2 жыл бұрын
@@SoloGameDev Thanks!! that actually did did exactly what I needed
@SoloGameDev
@SoloGameDev 2 жыл бұрын
@@pluacherry5378 You're welcome :)
@guillermoadrianricci136
@guillermoadrianricci136 Жыл бұрын
who has been blind their whole life and can finally see. I can't express my gratitude in words but tNice tutorials is the best I can do. THANK YOU SO
@muhamadseptianramadhana1590
@muhamadseptianramadhana1590 Жыл бұрын
the program works great
@gmangman123
@gmangman123 Жыл бұрын
thx so much!!!
@myth6628
@myth6628 Ай бұрын
this was really helpful. Thank you
@hawkzheng8871
@hawkzheng8871 2 жыл бұрын
I am still a little confused about the meaning of the InventoryItemController script, what exactly does the array variable InventoryItemController[] in InvetoryManager do? It also occurs with some bugs in which when I close the inventory and reopen it, the InventoryItemController[] will double the size inside the InvetoryManager, the item inside the box disappears after I click the remove button however the item when will appear again when I close and reopen the inventory, any ideas? Thank you
@MUT-Studios
@MUT-Studios Жыл бұрын
ya this happened with me too
@holywaddawadda5376
@holywaddawadda5376 Жыл бұрын
The tutorial is great, but i'm having trouble trying to add two different kinds of objects with buttons that work differrently and none of the items in the Items list is being added into Inventory items list.
@EhMerdeProductions
@EhMerdeProductions Жыл бұрын
Hey, my items are showing if I open the inventory After picking them up. I can delete them, close the inventory, and the correct amount shows up if I open the inventory again. But if I delete items and press on Open inventory while it is opened, I get more Inventory items than I have Items listed in the Items... I get extra items that says ''missing inventory item''. It is like sometimes I get ''missing inventory items'' and if I delete 1 or 2 items while I have 2 missing items, the items comeback (they are not getting deleted from the Items list). Any idea why it would do that? it feels like my number of items in the list and in thhe InventoryItems is not really sinc'ed correctly?
@rileysorensen6796
@rileysorensen6796 Жыл бұрын
In the listItems, where it is using the Find function, how should I be utilizing this? i'm a little confused on this, moreover what should be named ItemName and where does he have it
@mlgjman1837
@mlgjman1837 2 жыл бұрын
HELP! When I Pick Up the item it does not show in the inventory, but when I open the inventory again it appears, everything else works fine!
@user-st1gj3si7x
@user-st1gj3si7x 8 ай бұрын
a really nice tutorial
@SoloGameDev
@SoloGameDev 8 ай бұрын
Thanks :)
@dex4075
@dex4075 Жыл бұрын
4:40 in , when i make a new item they have no scri[t and will not let me add one but the ones in the video have script defaultly sent to item
@ItsRave_n
@ItsRave_n 17 күн бұрын
I have a problem where if I remove an item and then close and re-open the inventory the items come back. I think that it is not deleting the items correcly. Any solutions?
@disuko
@disuko Жыл бұрын
Is there a way to make the inventory refresh automatically when the player picks up an item, so that they don't have to close and reopen it to see items if they pick them up while it is open?
@ramangurah6091
@ramangurah6091 Жыл бұрын
Hi! you can replace the void Pickup() in ItemPickup script like this void Pickup() { InventoryManager.Instance.Add(Item); InventoryManager.Instance.ListItems(); Destroy(gameObject); }
@chritsfootballs
@chritsfootballs Жыл бұрын
When I call setinventoryItems my controller array is filling with items that have missing objects then adds the items from my inventory last. Any thoughts
@raindrop650
@raindrop650 Жыл бұрын
If anyone sees this. I have a question! When I collect the item it doesn't show up in my Inventory and I don't know why....I got up to around 9:00 I also added UnityEngine.UI, mt List has Li underline with dots
@robertreitermanjr2973
@robertreitermanjr2973 Жыл бұрын
With the Item Button in the Content area of the inventory. By default, my button is invisible, it will show up if I remove it from the Content section of the Hierarchy. What am I doing wrong for the button not to show up?
@NoName-pq7ot
@NoName-pq7ot 17 күн бұрын
you are the best bro 💜
@SoloGameDev
@SoloGameDev 17 күн бұрын
Thanks :)
@markvincenttamayo151
@markvincenttamayo151 Жыл бұрын
Great tutorial! May I ask if you have a video for stacking the potions? Thankyou!
@SoloGameDev
@SoloGameDev Жыл бұрын
Sure. Thanks :)
@Resenar
@Resenar Жыл бұрын
In the video, the public InventoryItemController array is not displayed in the Unity Inspector. But I have this array displayed in the Inspector. How did it happen?
@Rentaro_dev
@Rentaro_dev 2 жыл бұрын
Awesome video! Can you make a tutorial on crafting system integrating it with this inventory ?
@SoloGameDev
@SoloGameDev 2 жыл бұрын
sure :)
@avve558
@avve558 Жыл бұрын
the second time i open the inventory the items i had before and the new items i picked up have switched names and icons with each other and the old items can't be used.
@markvincenttamayo151
@markvincenttamayo151 Жыл бұрын
Hello. i have a problem. if i open close and open close the inventory . the inventory items index in inventory manager is making a clone but it says Missing(Inventory item Clone) Please help/ Thankyou!
@starfall6286
@starfall6286 Жыл бұрын
Hi there, thank you so much for the tutorial! It's working great for me 😀. One question, I'm trying to limit the amount of items in the inventory, could you give me some advice to start on this?
@SoloGameDev
@SoloGameDev Жыл бұрын
You can add two int variable for this. One of them sizeLimit the other one is currentLimit. Before pickup the item you can set control like if (currentLimit
@starfall6286
@starfall6286 Жыл бұрын
@@SoloGameDev Thank you so much for the reply!
@FadiFlashi
@FadiFlashi Жыл бұрын
I'm very confused. my scripts are exactly like his, and I do have a mesh collider (followed all the steps), but whenever I run my game, nothing happens when I click them. Any idea why it can be? O_O
@RL_Kaizen
@RL_Kaizen Жыл бұрын
did u fixed it? I have the same issue
@FadiFlashi
@FadiFlashi Жыл бұрын
@@RL_Kaizen I didn't fix it.. I ended up writing my own inventory system from scratch 😅 Sorry! Hope you'll be able to find a solution!
@dsever1966
@dsever1966 11 ай бұрын
Hi everyone I’m looking on how to make stack in this inventory because if I have clear list of items as different function I can’t really make stack system. Any advise?😢
@serraplays8022
@serraplays8022 2 жыл бұрын
I have a problem with the items button, when i click in item on inventory does not do any actions i try put a Debug.Log on "onClick" but don't doesnt anything, can someone help me
@HeplMeh
@HeplMeh Жыл бұрын
I know it's been 5 months but I just wanted to let you know I had the same issue if you haven't already figured it out. I was using a free starter asset player controller and in the inspector window for the player, there was a box called "Cursor Locked" inside the starter asset inputs script that was on that player controller. Un checking that box worked for me. Hope it helps!
@tincoES
@tincoES Жыл бұрын
ağzına sağlık hocam
@YourDrive26125
@YourDrive26125 Жыл бұрын
creating a second track to add into the recording as I play through the first tract?
@devlasutriv
@devlasutriv 2 жыл бұрын
Great content utilizing good practices. Keep it up!
@abhishektiwari7200
@abhishektiwari7200 Жыл бұрын
Sir I have a issue of the items are deleting from viewport but not from the list the item in inventory item controller is saying the null reference of item
@Jon2mil
@Jon2mil Жыл бұрын
Did you fix this?
@jocopowell
@jocopowell Жыл бұрын
Would it be better for me create the inventory slots via the editor (such as in this video) or Instantiate them with c#?
@naaay705
@naaay705 Жыл бұрын
Hey, What if I have some items in inventory before I store other item? How can I prevent those items from being destroyed when I store another item to Inventory?
@SaraAnnese
@SaraAnnese Жыл бұрын
so, i follow the tutorial and is the first tutorial without errors in the code, but why I'm not able to collect the object in the inventory? When I interact with them, they remain in the same place.. Some suggestion?
@xtr.-.-.-.
@xtr.-.-.-. 2 жыл бұрын
I can't use the scrollview, if I put Movement Type Elastic it goes back to the beginning after moving, if I put Unrestricted the player can move forever, and Clamped doesn't move, what do I do?
@SoloGameDev
@SoloGameDev 2 жыл бұрын
Use Elastic and add Content Size Fitter to the content of the scrollview then choose vertical part minimum.
@user-ol7th2tp1y
@user-ol7th2tp1y Жыл бұрын
gets installed smoothly, but when i open it, there is a error message : "sketchup quit unexpectedly"
@RedEye_Developers
@RedEye_Developers Жыл бұрын
bro inventory SetActive(false) and SetActive(true), item.value, item.type all Null Value Coming Why how to fix it ?
@ariyangrami
@ariyangrami 6 ай бұрын
if you hit Inventory button twice straight (not close it and the reopen it again) it didn't clean inventory , actually add deleted item from content to inventory and make a problem, can anybody help?
@mysterouswafle2198
@mysterouswafle2198 Жыл бұрын
i have a problem, when i open the inventory twice it removes the item component from my inventory item controller
@DesignMade-Easy
@DesignMade-Easy Жыл бұрын
hey thank you so much for the explanation, can you just help with one thing, I modified the code so that items in inventory manager are stackable. the issue I'm facing is with deleting I only want to destroy the item when amount ==0 but its not workingout with me I'm not able to destroy object in inventorymanager cz it will destroy the inventory and I cant destroy object in inventoryitemcontroller cz I need to check amount from inventory manager. aby ideas please
@Paradiese264
@Paradiese264 Жыл бұрын
I need help because with no reason it aspears me an error that doesn’t have sense: in the inventory manager script it appears me 2 errors: error CS0246: the type or namespace name ‘Text’ could not be found (are you missing a using directive or an assembly reference?), and aswell with the ‘Image’ please could you help me?
@SoloGameDev
@SoloGameDev Жыл бұрын
Can you send me your code's screenshots to my mail?
@UberJanusz
@UberJanusz Жыл бұрын
Had the same issue, if anyone else is wondering how to fix this : you need to add using UnityEngine.UI; line
@Blurzzyface
@Blurzzyface Жыл бұрын
@@UberJanusz THANK YOU!!!!
@Akira-xr9tv
@Akira-xr9tv Жыл бұрын
i have a problem when i open then colse then open the inventory again the item loseses the scriptebel object reftence;
@afifasri7690
@afifasri7690 2 жыл бұрын
Hey great tutorial but i am having huge problems with the ListItems() method The error is that: the parameter named item cannot be declared in the scope because the name is used in an enclosing local scope to define a local or parameter
@ElCurios
@ElCurios 2 жыл бұрын
if you're still having the problem i think this means you already have a parameter (maybe a float, gameobject ect.) named "item" You can try to use a different name or try typing the "i" big like "Item"
@attilatoth4677
@attilatoth4677 Жыл бұрын
If anyone is struggling to add the background or other images, use the raw image component instead of image.
@paravision_studio
@paravision_studio Жыл бұрын
set the Texture Type of the Image File to "Sprite (2D and UI)". Then you schould be able to use the Image.
@arandomcookie
@arandomcookie Жыл бұрын
Howdy folks. If your InventoryManager script isn't working, it's not your fault. Mr. Dev sliced the footage and cut off the part where he adds the Using UnityEngine.UI line. Still think that's too ridiculous of a claim? Check the line numbers in the corner change at 8:10. Honestly dude, this is BEYOND foul play, it's just evil. You can't do this crap in tutorials. I know Mr. Dev didn't do it maliciously, but this is not something that just slips through the radar of an editor. COME ON!!! Edit: People don't watch tutorials for entertainment. We watch them to learn and create. Sure, editing the video to achieve a reasonable pace is good, even commendable. But slicing out a crucial piece of code and covering it up by placing the screen in the same place is depriving people CRUCIAL INFORMATION. This is beyond un-ethical. This CANNOT happen in a tutorial, else no-one can trust anything they see in your videos, @SoloGameDev. For the love of Python, do NOT make this mistake again. This actually got me furious. Edit 2: Did it again at 11:22. COME ON
@cong5805
@cong5805 2 ай бұрын
appriciate this rant, i couldn't figure out why i was getting an error
@cheesecake906
@cheesecake906 23 күн бұрын
Wow, thank you I was really struggling
@Reykoil
@Reykoil Жыл бұрын
nice
@Nokia-px6dp
@Nokia-px6dp Жыл бұрын
if i was add a sword and make it equippable how would i go about adding 'durability' to that item to where it drops by 1 on each click, and make that durability value stick to that item
@SoloGameDev
@SoloGameDev Жыл бұрын
You can add durability to your scriptable object.
@realb4825
@realb4825 Жыл бұрын
I am stuck since when I collect the item it is destroyed but does not appear in the inventory I have connected everythign the same as him but it just does not work.
@vanlemueltresvalles3588
@vanlemueltresvalles3588 2 жыл бұрын
Hello, thanks so much for this tutorial, i was wondering if there is a way to clean the inventory and remove missing item on 'InventoryItemController' array without closing the inventory, cuz i was trying to sort items to all,sword,armor, and others.. i've tried it using setActive() on the elements of 'InventoryItemController' array but when i tried to using the items there is 'missing item' on the 'InventoryItemController' array causing a 'MissingReferenceException' error when i tried to sort the items again.. any idea? thanks
@jarrahtree5130
@jarrahtree5130 2 жыл бұрын
Your comment is confusing. Are you wanting to completely clear the inventory? Because you could simply set the list size to 0, and that would remove everything, or alternatively have a list variable ("cleanInventory" for example) that is empty and then just write "Items = cleanInventory;" and boom you have an empty inventory.
@turhanay1627
@turhanay1627 Жыл бұрын
Eyw kral
@romanrussu3403
@romanrussu3403 11 ай бұрын
if you are keep getting an "Object reference not set to an instance of an object" error, try to replace this line: var itemName = obj.transform.Find("ItemName").GetComponent(); by this: var itemName = obj.transform.Find("ItemName").GetComponent(); and don't forget to import namespace: using TMPro; I struggled with this for a long time, I hope it helped someone
@seagoat9750
@seagoat9750 10 ай бұрын
This certainly helped me! Thank you so much!
@SaraAnnese
@SaraAnnese Жыл бұрын
why am I not able to drag the text of exp and health in the health text and exp text in player script?
@HxsrzStudio
@HxsrzStudio 3 ай бұрын
i got it work 🎉🎉
@Tea-qk6ii
@Tea-qk6ii 2 жыл бұрын
please help, it doesn't work & i've been trying for weeks - icon name & icon does not change from the plain squares!! icon is listed in inventory manager but with no change to the actual inventory :(
@SoloGameDev
@SoloGameDev 2 жыл бұрын
Did you write your icon name correctly?
@JustRapha
@JustRapha Жыл бұрын
Bonjour j'ai un problème j'ai suivi le tuto et je suis bloqué dès que j'ai démarre mon jeu l'interface à Paris alors que je n'ai pas encore cliqué sur le bouton sinon tout fonctionne bien
@pocoace5415
@pocoace5415 11 ай бұрын
i follow your tutorial but when i reach to public void SetInventoryItems() i always error even i follow it all it says index was outisde bounce of array
@logicon2456
@logicon2456 Жыл бұрын
how does it work for you when u call useitem method when theres no scriptable object bounded to the item variable for me it always gives instance error
@theblueceand
@theblueceand Жыл бұрын
IDK ó
@MathiasMusic465
@MathiasMusic465 Жыл бұрын
I need help :/ I can't find the Item option when I right click and click create. It's not there. When you do it it's above your folder option. For me I sent even have it.
@isaacashton5772
@isaacashton5772 4 ай бұрын
did you ever figure it out? i can’t either
@mlucifer79
@mlucifer79 Жыл бұрын
First thanks for amazing tutarial , in InventoryManager script on this line :: InventoryItems = ItemContent.GetComponent(); in in top of script as you said in video i write : public InventoryItemController[] InventoryItems; I get an error as below : error CS0029: Cannot implicitly convert type 'InventoryItemController' to 'InventoryItemController[]' Can you please help me or anyone who knows this problem ?
@degiguess
@degiguess 11 ай бұрын
I have the same error
@antalaai
@antalaai 6 ай бұрын
if anyone stumbles on this, it is --GetComponentS-- with a "s"
@draguan1864
@draguan1864 Жыл бұрын
Does anybody know where can I find this specific asset pack for the UI?
@Pausechallengesandfunnystuff
@Pausechallengesandfunnystuff 6 ай бұрын
How do you make it so that you can add your backgrund to the inventory at 0:52
@ItsMinticle
@ItsMinticle 2 жыл бұрын
whenever i press on an item like at 15:32 to use it, i get an "Object reference not set to an instance of an object" error, any help would be appreciated since i just cannot figure it out
@gabrielklark3357
@gabrielklark3357 2 жыл бұрын
I was getting this problem when I created my UI using TMPro, but on my code I was doing like him and looking for a component, instead of
@colinc6209
@colinc6209 2 жыл бұрын
did u ever find the solution to your problem, i am having the same one
@ItsMinticle
@ItsMinticle 2 жыл бұрын
@@colinc6209 no, sorry. i just followed the inventory tutorial by Brackeys and Sebastian Lague instead lol
@sirtristanus2017
@sirtristanus2017 7 ай бұрын
it would be awesome to share the assets used please ! cool tutorial thanks
@Johnlehoule
@Johnlehoule 2 жыл бұрын
The video and explanation are pretty good, but the movement of the computer mouse is way too fast for my eyes and brain to catch. A lot of times I have to go back a few seconds or pause and watch and pause and watch, just a friendly suggestion.
@SoloGameDev
@SoloGameDev 2 жыл бұрын
Thank you for your suggestion :)
@SoloGameDev
@SoloGameDev 2 жыл бұрын
@@Annefree98 I am sorry for this. I will be very careful with this situation. Thanks.
@normalguy845
@normalguy845 Жыл бұрын
When i click "tab" (open inventory key) and i close it and open it again i can't use items that i added before closing it :c
@normalguy845
@normalguy845 Жыл бұрын
Can someone help me pls XD it's very annoying error
@cornchowder_channel
@cornchowder_channel 2 жыл бұрын
В данном туторе реализован функционал, чтобы при перезагрузки сцены, сохранялся прогресс инвентаря и его содержимое? Заранее спасибо за ответ!
@SoloGameDev
@SoloGameDev 2 жыл бұрын
Нет не спасает. Вам нужно сделать систему сохранения для него.
@rayhanbhai5503
@rayhanbhai5503 Жыл бұрын
For once, the software is actually really useful
@bobli75
@bobli75 Жыл бұрын
I got the error : NullReferenceException: Object reference not set to an instance of an object InventoryManager.ListItems () (at Assets/Scripts/InventoryManager.cs:30) I solved it. My problem was that my prefab elements didn't match with the .Find("ItemName") or .Find("ItemIcon"). See at 1:51, SoloGameDev choose the name of his prefab elements. ps: don't forget that TMP need : using TMPro; + .GetComponent(); Good luck people
@FreakBrain
@FreakBrain Жыл бұрын
Thank You.
@chelseybommer3026
@chelseybommer3026 Жыл бұрын
Thank you this helped me a lot.
@ASCIO-Studio
@ASCIO-Studio Жыл бұрын
Thanks you for this tutorial! If I like to collect the items with player collision, can I replace Input fonction by trigger enter fonction? I need help please!
@tituskizer6478
@tituskizer6478 9 ай бұрын
Yes, I tried it with a non trigger collider and I can collect the objects, I don't think the trigger should work any differently. :)
@SciencewithIrfan
@SciencewithIrfan 9 ай бұрын
8:51 The error still comes when I change Item/ItemName to ItemName at this line: var itemName = obj.transform.Find("ItemName").GetComponent(); Please fix this error
@lukasz.akozlowski2832
@lukasz.akozlowski2832 Жыл бұрын
Hey! is anyone having trouble with Item Item; Because I can't seem to find a way to get the selection of assigning the objects and items together
I Turned My Most Famous SCRATCH Game Into a UNITY Game...
12:13
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 1,6 МЛН
1❤️
00:17
Nonomen ノノメン
Рет қаралды 13 МЛН
Unity ScriptableObject. Пишем простой инвентарь
6:08
Insane One - Разработка игр
Рет қаралды 45 М.
Be CAREFUL with Scriptable Objects!
8:27
Code Monkey
Рет қаралды 76 М.
Why Solo Developers Should Use Unreal
10:55
Thomas Brush
Рет қаралды 328 М.
Drag and drop in Unity UI - create your own inventory UI!
12:47
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 317 М.
Simple Drag Drop (Unity Tutorial for Beginners)
10:31
Code Monkey
Рет қаралды 317 М.
CLEAN Game Architecture with ScriptableObjects | Unity Tutorial
13:12
Sasquatch B Studios
Рет қаралды 10 М.
Creating An Inventory System in Unity
11:03
Game Dev Guide
Рет қаралды 176 М.
Unity3D - Scriptable Object Inventory System | Part 1
31:31
Coding With Unity
Рет қаралды 322 М.