BEST Inventory System Yet! Unity Tutorial #6 - Using Items!

  Рет қаралды 6,157

ErenCode

ErenCode

2 жыл бұрын

The easiest advanced Inventory System I've developed thus far! Consider Subscribing! (it helps!)
#madeinunity #inventory #tutorial
Assets I used: www.kenney.nl/assets/voxel-pack
✅ Join the Discord : / discord
🔴 Subscribe! : / craazypelican
🔵 Twitter: / _peli_can_
🟣 Instagram: / erencan_pelin
🧡Support the channel: / erenmakesgames
All code licensed under BSD 3-Clause license

Пікірлер: 49
@turceanucosmin7223
@turceanucosmin7223 Жыл бұрын
Great series, hope it goes on and on
@NorthGMD
@NorthGMD 2 жыл бұрын
Just what i needed! Thank you for these tutorials
@ErenCode
@ErenCode 2 жыл бұрын
Glad you like them! :D
@ChadRepson
@ChadRepson Жыл бұрын
Thanks dawg good tutorial
@knight_h3172
@knight_h3172 2 жыл бұрын
Nice tutorial! It helps me out a lot.
@ErenCode
@ErenCode 2 жыл бұрын
Glad it helped! :D
@LearnWithArjun
@LearnWithArjun 2 жыл бұрын
Live saver bro OMG TY SO MUCH most tutorials dont make a backpack or a hotbar slot indicator or item usage but u have all of it ty so much :)
@ErenCode
@ErenCode 2 жыл бұрын
for sure!! a lot of tutorials leave you feeling only half done dont they xD Let me know if there's anything else you wanna see!! :D
@LearnWithArjun
@LearnWithArjun 2 жыл бұрын
@@ErenCode Ya lol can u do a crafting and building sUstem?
@LearnWithArjun
@LearnWithArjun 2 жыл бұрын
@@ErenCode Ya actually i followed a series which took me 8 days and it was useless cuz no item usage and no hotbar selecor and then i found u LOL even big KZbinrs like Blackthonprod, Code MONKEY dint make a backpack or hotbar selector lol idk y
@LearnWithArjun
@LearnWithArjun 2 жыл бұрын
ITS ACTUALLY THE BEST WAY AND THE BEST INVENTORY SYSTEM!!! :)))))
@mynameisnotegg5731
@mynameisnotegg5731 2 жыл бұрын
Thank you! Just what I needed 😁 Will you make a tutorial on how to make chests with this inventory system in the near future, or you don't plan on doing that?
@ErenCode
@ErenCode 2 жыл бұрын
I'll see what I can do! :D
@florianffa
@florianffa 2 жыл бұрын
@@ErenCode Please make one! :D
@akiameaart
@akiameaart 2 жыл бұрын
Amazing thank you!! I know others already said it, but a crafting system would be awesome. Also you have a nice laugh, it's like a "Cool Guy" laugh lol.
@ErenCode
@ErenCode 2 жыл бұрын
appreciate it! xD crafting tut coming soon!
@Properpeanut
@Properpeanut Жыл бұрын
As said before. Awesome tutorial. I know that you are making the inventory generic, but wIll you be covering features like dropping items in the world by dragging the items outside the canvas or "equipping" the items in the hotbar by instantiating a model of the item in front of the player (like in a fps)?
@DivinityOfBLaze
@DivinityOfBLaze 2 жыл бұрын
Great tutorial! One thing I'm wondering about is container items, like a bag for example. I can see how easy it would be for it to only take items of a certain class (Say a coin pouch) as that was covered. But Id imagine you click it and open a UI that shows its inventory. Also being able to drop and pick it up again. Could even do neat stuff like right click opens it while its not in your own inventory. So acting like a chest.
@ErenCode
@ErenCode 2 жыл бұрын
the system can be expanded to have an item class which lets call bag, so BagClass for example, and then inside that item class you can have an array of ItemClasses for its contents, The data can then be retrieved however you wish! :D
@lever1616
@lever1616 2 жыл бұрын
lol i remember when i asked you about the "use" function thing, im guessing you did something similar in this video? a bit busy with exams rn but ill watch it when i got a bit of time
@ErenCode
@ErenCode 2 жыл бұрын
yessir! haha, had a lot of people ask me so I figured might as well just show you guys! :D
@coldfishofficial742
@coldfishofficial742 Жыл бұрын
Great tutorial series! Hate to be commenting on this 7 months late, but is there a way that you can use the item in a slot without using the scrollwheel selector? Let's say I wanted to press 1, 2, 3, etc. to do this. How would I go about doing that?
@ErenCode
@ErenCode Жыл бұрын
Yessir! It would just be a matter of assigning the index to the corresponding key press
@LearnWithArjun
@LearnWithArjun 2 жыл бұрын
how do i make the thing that the selecter of Hovering On show up in my hand?
@_Elvano
@_Elvano 2 жыл бұрын
Lol dude i just got done coding this myself then i see you post this fml
@alexeya1754
@alexeya1754 2 жыл бұрын
good! tnx! this is lasted tutorial?
@ErenCode
@ErenCode 2 жыл бұрын
Depends on what else people request! xD
@Thrymbor
@Thrymbor Жыл бұрын
great tutorial. it works everything fine. but i wanted to make a SO set an Object to active. is that possible in any way?
@ErenCode
@ErenCode Жыл бұрын
For sure! Just need to pass that object as a reference to the Use function
@korply
@korply 2 жыл бұрын
can you teach us. how to get item state,name or something.. when item in this selectSlot and show it on screen it look like the score board. am new here try to do this function for my homework
@ErenCode
@ErenCode 2 жыл бұрын
should just be selectedItem.itemName, or selectedItem. - just make sure the variable/data you're tryna access is a public variable :D
@korply
@korply 2 жыл бұрын
@@ErenCode nice thank a lot sir 🍕🤤
@ArtOfDying1029
@ArtOfDying1029 Жыл бұрын
Whats up with this assembly reference thing at 4:34 ?
@ErenCode
@ErenCode Жыл бұрын
its not necessary, but it can help increase compilation time. Unity puts every project in default assembly c# - this means that when our scripts recompile, unity goes through and recompiles every script in the assembly - this includes other scripts on our computer within that assembly. So if you have a lot of c# scripts in the same assembly it takes longer to compile. I only added this because compile time started taking too long for me when recording so it was just to remove a nuisance xD read more: docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html
@JaemiHD
@JaemiHD 2 жыл бұрын
I just watched this and your last devlog and i love your video style, but there are some things i don´t get. Why don´t you abstract you baseClasses (ItemClass, MiscClass, ...) you changed it but is was correct as it was, why don´t you have your Use function abstract it is necessary to have all children implement it and why do you have the type specific functions in you base class like get consumable is there a reason?
@ErenCode
@ErenCode 2 жыл бұрын
your correct, in most cases abstract and virtual are almost interchangeable, for this I basically just didn't feel like having to define a method for every class. With virtual I can choose to override it, with virtual I NEED to override it. With virtual I can also call the base class, letting me do the default action and more, with abstract, I can't do that, :D
@JaemiHD
@JaemiHD 2 жыл бұрын
@@ErenCode i think you did not geht the point xD 1. Your base class es should be abstract there should be nö way to build them 2. it is bad code to define functions in a base clase you dont need in the child classes . IT does not matter if they are virtual or abstract. And because you will have to implement getConsumable in every consumabel this functions should be in you consumable class not you item class. As you move it to your consumableclass you should make the getconsumable function abstract not virtual. I asked basicly if there is a reason why you did not do this. Do you understand now what i meant? :)
@ErenCode
@ErenCode 2 жыл бұрын
@@JaemiHD your correct! but in this situation, we do end up using the base function from all the children classes, by making it virtual, it calls the base function by default, saving me from having to write the same code for each child class if two child classes are gonna do the same thing anyway! Hopefully that made some sense xD You 100% could do the same with abstract, I just thought it would be less redundant though by using virtual :D
@JaemiHD
@JaemiHD 2 жыл бұрын
I think you are missing the point. So just this question then idc xD Why should your tools have the function GetConsumable this should not happen cuz your tool are no consumables. Same goes with your misc they have as well get consumables function why? this function belongs to you consumable class not the item class. This is my point you structure is kind of messy :D And after looking at this problem you should consider again what your using for the moved functions, virtual or abstract not before. Do you get it now? ;)
@ErenCode
@ErenCode 2 жыл бұрын
@@JaemiHD by using virtual, yes tool classes inherit the default behaviour of GetConsumable. The default behaviour of this class returns null. If I were to use abstract. I would have to define a function for the toolClass for GetConsumable - which would also return null. So using virtual basically saves me from having to supply a GetConsumable function on a ToolClass - since when I call it on an item, its gonna do the base/default behaviour being return null. It actually makes the code a whole lot cleaner xD
@user-oq9fg7ut2i
@user-oq9fg7ut2i 7 ай бұрын
add equipment
@LearnWithArjun
@LearnWithArjun 2 жыл бұрын
Im not able to do it can u help?
@ErenCode
@ErenCode 2 жыл бұрын
feel free to join the discord for help! much easier to help there! :D
@wtbudgie
@wtbudgie 2 жыл бұрын
first
@bigpig6395
@bigpig6395 2 жыл бұрын
nah gilbert
BEST Inventory System Yet! Unity Tutorial #7 - Crafting!!
25:53
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 95 МЛН
MOM TURNED THE NOODLES PINK😱
00:31
JULI_PROETO
Рет қаралды 10 МЛН
100😭🎉 #thankyou
00:28
はじめしゃちょー(hajime)
Рет қаралды 33 МЛН
[ Animatic ] Grian Benefits
0:24
Melloz Heist
Рет қаралды 468 М.
Unity INVENTORY: A Definitive Tutorial
35:21
Coco Code
Рет қаралды 101 М.
Godot Engine Sandbox Game Devlog0
0:18
Omni Dig
Рет қаралды 1,3 М.
Pokémon Yellow - analysis of glitch sprite decompression effects
17:09
Items & Inventory in Unity (pt.1) - Start Simple
8:55
Kryzarel
Рет қаралды 100 М.
3D printed Nintendo Switch Game Carousel
0:14
Bambu Lab
Рет қаралды 4,7 МЛН
3.5.A Solar Mobile 📱 Charger
0:39
Gaming zone
Рет қаралды 320 М.
cool watercooled mobile phone radiator #tech #cooler #ytfeed
0:14
Stark Edition
Рет қаралды 7 МЛН
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 2,7 МЛН
Куда пропал 3D Touch? #apple #iphone
0:51
Не шарю!
Рет қаралды 726 М.
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 9 МЛН
Топ-3 суперкрутых ПК из CompShop
1:00
CompShop Shorts
Рет қаралды 301 М.