Collect Items in Unity - Game Dev Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ม.ค. 2025

ความคิดเห็น • 83

  • @LostRelicGames
    @LostRelicGames  4 ปีที่แล้ว +6

    Thank you for your likes and comments, I truly appreciate them!
    Sample project files here: drive.google.com/file/d/1FB5hi4rsZmU03r2aVJ9N72rB1VdEFGfG/view?usp=sharing

    • @MarxyBasement
      @MarxyBasement 4 ปีที่แล้ว

      Can you please make a video about changing and binding keys in new unity input system please like how to change and bind then ingame in controlls menu via scrip

    • @fahadansari6789
      @fahadansari6789 4 ปีที่แล้ว

      Thanks

  • @calicow
    @calicow 4 ปีที่แล้ว +22

    You really deserve more views. Even though I know how to do this (surprisingly, lol... I suspect that won't be true for some of the other tutorials) I really appreciate your teaching style. So many people just quickly type/past code without really explaining it, then that's the video. You've explained the code and have shown some common troubleshooting cases for why it might not work if something isn't done correctly, as well as details on how others might handle things differently for their games.
    Definitely subscribing. Looking forward to seeing more!

  • @rhythmandblues_alibi
    @rhythmandblues_alibi 3 ปีที่แล้ว +1

    The way you explain things properly is great. I know how to do this from watching other tutorials but I didn't understand the difference between colliders and triggers, not really. Also great to see a fellow Aussie making great game dev content, cheers!

  • @max2721
    @max2721 3 ปีที่แล้ว +2

    I really like this video. It helped me a lot and you are just a really sympathetic person. Keep up the good work thx

  • @garudakin_nz5110
    @garudakin_nz5110 ปีที่แล้ว

    BROOOOO!! this seriously helped me out a ton my dude. thanks for the great information :) just starting out and been at a wall for a long time. great video sir !

    • @LostRelicGames
      @LostRelicGames  ปีที่แล้ว

      Nice! Glad to hear you are getting more confident, keep pushing, things get much easier

  • @lucasrubio7664
    @lucasrubio7664 2 ปีที่แล้ว

    Really nice tutorial. I really like how you talk and explain things, very helpful!

  • @Quein922
    @Quein922 4 ปีที่แล้ว +1

    After few videos I've decided to sub. This is some good content, I'm kind of puzzled though why there aren't more viewers around.

  • @bilal_rifki
    @bilal_rifki 3 ปีที่แล้ว

    "Lost Relic" is the perfect name for your channel, since every video here is a Hidden Gem

  • @efaz6809
    @efaz6809 4 ปีที่แล้ว +3

    This was a lot of help. THANKS A LOT!!! Definitely Subscribed :)

  • @Patricebrouh
    @Patricebrouh 4 ปีที่แล้ว

    Wow, the explanation is clear and simple. That makes the video so great. We got to share it in some forums. Thanks

  • @CrepsDelic
    @CrepsDelic 4 ปีที่แล้ว +1

    Just binging your Videos!! Great Material!! Discoverd you today, Missing the Destruktion Tutorial that should follow the melee Attack tutorial!
    Keep that great Work, I'm Sure adding your Game to my Steam wishlist!!

    • @waynewestlake8120
      @waynewestlake8120 3 ปีที่แล้ว

      I know right? (on the binge watching) Just discovered his channel and it's been the biggest impediment to me actually working in Unity on my tutorials! But this is all such good knowledge I can justify that it's not just wasting time like cat videos!

  • @Jiggisghoul
    @Jiggisghoul 4 หลายเดือนก่อน

    THANK YOU!! You helped me a lot! Thank you so much ❤❤❤

  • @sheepongrass
    @sheepongrass 4 ปีที่แล้ว

    Thank you!!! You're one of the nicest teachers I've came across!!

  • @AidanC47
    @AidanC47 2 ปีที่แล้ว +1

    Thanks dude

  • @Aladato
    @Aladato 4 ปีที่แล้ว +2

    15:25 you can use F2 to rename stuff in the whole solution, just place the cursor on it and press the button :)

  • @josekarnikowski1711
    @josekarnikowski1711 ปีที่แล้ว

    Very good tutorial. Thanks!

  • @franciscooliveira3768
    @franciscooliveira3768 3 ปีที่แล้ว

    Perfect tutorial! Helped me a lot! And He looks like Keanu Reeves

  • @AdrianGonzalez-d1t
    @AdrianGonzalez-d1t 4 หลายเดือนก่อน

    I know this is old but amazing video man thank you!

  • @karambultaif6248
    @karambultaif6248 3 ปีที่แล้ว

    Best chanell ever 100/10

  • @joaolucasalmeidapereira9526
    @joaolucasalmeidapereira9526 4 ปีที่แล้ว

    Perfect tutorial it helped me a lot, thanks!!!

  • @shavais33
    @shavais33 3 ปีที่แล้ว +1

    In Visual Studio, you can double click an identifier to select it, then hold down ctrl and hit R twice, then alter it and hit enter, and it will be renamed everywhere it is declared or referenced. If you rename a monobehaviour class that is the same name as a file, it'll ask you if you want to rename the file as well, and if you do that, then go back to Unity, Unity even updates references to that monobehaviour.
    Also, you can double click an identifier to select it, then hit F12 to go straight to its declaration, then maybe change its type or signature, for example, then hit ctrl- (control minus) to return to where you were. You can hit ctrl- multiple times and shift ctrl- multiple times to traverse back and forth across the list of last editing spots in your solution.
    What do you think of the idea of having an ObjectType script that you give to every object that can collide which has has a public typeId field? Maybe of an enum type called TypeId that is defined in that class? Then you have a generalized way of checking what object type something is in an OnTrigger or OnCollision function, and Visual Studio can help you remember what your object types are. I suppose if you had 100 object types or something, you might want sub categories so that your enum lists would be shorter. You could give ObjecType a typeCat field of a enum type called TypeCat, then have categorized enums and type id variables, like ShipType shipType and ArtifactType artifactType..

  • @b8c_
    @b8c_ 3 ปีที่แล้ว

    Thanks for the tut, mate.

  • @Scyther-ow8wy
    @Scyther-ow8wy 3 ปีที่แล้ว

    Him: I don’t know what I was doing there
    Me: you know what you’re doing, lucky

  • @jurdendurden
    @jurdendurden 4 ปีที่แล้ว

    Excellent video thanks for sharing!

  • @cazterk
    @cazterk 2 ปีที่แล้ว

    pretty good video, thank you, and you are a very good programmer😊

  • @kobaltsteel6418
    @kobaltsteel6418 4 ปีที่แล้ว

    This was a great video; very useful!

  • @fredysoto8547
    @fredysoto8547 3 ปีที่แล้ว

    I need This!! Thanks a Lot Again!!

  • @pianoatthirty
    @pianoatthirty 2 ปีที่แล้ว

    You're a great teacher. Would totally buy a 2d platform course from you if you ever decided to release one!

  • @aarondelgado3421
    @aarondelgado3421 4 ปีที่แล้ว

    Great video even though I already knew this stuff! By the way, what software(s) do you use to make tutorials?

  • @gilbertdematera9658
    @gilbertdematera9658 ปีที่แล้ว

    thanks bro your amazing

  • @astohm5134
    @astohm5134 3 ปีที่แล้ว +1

    Thanks, this video helped me a lot. Is there a part 2? I would really like to add a seperate counter for lives and coins in my UI

  • @akstis4183
    @akstis4183 4 ปีที่แล้ว

    Great video, thank you for help

    • @LostRelicGames
      @LostRelicGames  4 ปีที่แล้ว

      Very welcome, thanks for the comment!

  • @hunter7777
    @hunter7777 4 ปีที่แล้ว

    Hello,
    This tutorial video was great...it helped me a lot, but the coding is very confusing to me, because I don't know how you know what to type in & where it should go in the coding.
    I hope there is an easier way to do what you did without all the coding.
    I'm not sure about this since I am a newbie, but my code doesn't look like yours at 4:45. I don't have the //State Management code & my codes doesnt have the same line numbers as yours.
    My coding also had the inventory already in it - I didn't have to type that line in at all.
    And everything worked just as you showed, even though my coding was a little different.
    Thank you, but I would like to know how to do the things you mentioned in the video - displaying the collectibles & the number that I have collected or a score.

  • @LeKikoojap
    @LeKikoojap 4 ปีที่แล้ว

    great vid, simple

  • @justahuman4862
    @justahuman4862 4 ปีที่แล้ว

    Thanks for the tutorial.

  • @quantranmanh7185
    @quantranmanh7185 4 ปีที่แล้ว

    It's great. thank you!

  • @tajislam8909
    @tajislam8909 4 ปีที่แล้ว

    Thank you!

  • @alvarosanchez8066
    @alvarosanchez8066 4 ปีที่แล้ว

    Great video.

  • @hrishikeshgarud7177
    @hrishikeshgarud7177 4 ปีที่แล้ว

    Will you make multiplayer photon PUN tutorial?

  • @JvMapote
    @JvMapote 4 ปีที่แล้ว +1

    May i ask on how can i put the item count into a UI text? :(

    • @triarchdarlene3114
      @triarchdarlene3114 ปีที่แล้ว

      Sameee

    • @JvMapote
      @JvMapote ปีที่แล้ว

      @@triarchdarlene3114 You can do it, i did it before on my own :DD

  • @ruliw8520
    @ruliw8520 4 ปีที่แล้ว

    thx dude helped me a lot +1 sub

  • @cursetin9833
    @cursetin9833 3 ปีที่แล้ว +1

    Hi I have a question. This works well but when I change scene/levels and go back to the scene/level will the collectables It reappears. How do I permanently destroy it after I collect it only once?

    • @astohm5134
      @astohm5134 3 ปีที่แล้ว

      Did you find a solution/tutorial for this?

  • @sunilpal28600
    @sunilpal28600 4 ปีที่แล้ว

    You are simply awesome,I have become a fan of you John,hope someday I'll meet you & take a selfie wid you Mate.

  • @deepaksivamani2269
    @deepaksivamani2269 4 ปีที่แล้ว

    Thanks for the video and need to know if we have more than one coin how we can add to same itemtype name itself

    • @LostRelicGames
      @LostRelicGames  4 ปีที่แล้ว +1

      I would recommend using a dictionary to store the item types. I do this in my own game. Will make a video on it soonish

    • @deepaksivamani2269
      @deepaksivamani2269 4 ปีที่แล้ว

      @@LostRelicGames thanks

  • @monaimmatlaya5873
    @monaimmatlaya5873 4 ปีที่แล้ว

    hey i want to know how i can interact with object and display a message before picking up an item

  • @culiynl
    @culiynl 4 ปีที่แล้ว

    Where is part 2?

  • @tomasalexandre2150
    @tomasalexandre2150 4 ปีที่แล้ว

    nice tutorial but i have a problem the OnTriggerEnter2D class doesnt appear has a class but has a normal name and i dont know why thx

  • @moatasem444
    @moatasem444 4 ปีที่แล้ว

    شكرا لك صديقي
    لكن لدي سؤال عندما أطبق عال النقود rigidnody2d وأفعل is trigger تقوم بالنزول أسفل الشاشة
    وإن أزلت تفعيل is trigger وطبقت تابع onCollisionEnter2d لا يقوم بجمع النقود بشكل جميل يعتبرها كجسم صلب ومن ثم يأخذها
    كل الاحترام

  • @snarpking
    @snarpking 3 ปีที่แล้ว +1

    This tutorial is great and it I got it to mostly work, but for whatever reason it collects each item twice when you go into them. Any idea why that is?
    +1 sub for you dude

  • @otterfox488
    @otterfox488 4 ปีที่แล้ว

    Hey my visual studios applications don't suggest things that are in unity
    Know how i can change that?

    • @LostRelicGames
      @LostRelicGames  4 ปีที่แล้ว +1

      Hey mate did you solve this? You need to link unity to visual studio in the unity preferences

    • @otterfox488
      @otterfox488 4 ปีที่แล้ว

      Yes I did fix it, thanks for the quick reply though!

  • @dudubarba08
    @dudubarba08 4 ปีที่แล้ว

    Hi would you have a Tutorial to use XBox controller to Unity 2D Plataformer?
    I am trying to do my first prototype, but do not want to use only the keyboard to move and jump my player, instead I want to use my XBox COntroller.
    Tks man, keep working.

    • @LostRelicGames
      @LostRelicGames  4 ปีที่แล้ว

      hey i dont have this specific tute just yet, but if you swing by the discord i can help you set up the default controller mapping

  • @t.b.g158
    @t.b.g158 3 ปีที่แล้ว

    Mate you look like Keanu Reeves...enouph reason to sub

  • @landlubber1143
    @landlubber1143 4 ปีที่แล้ว +1

    I didn't know Keanu Reeves taught Unity

  • @harder9285
    @harder9285 4 ปีที่แล้ว

    You're the best! Tysm

  • @StigDesign
    @StigDesign 4 ปีที่แล้ว +1

    Awesome Video great detailed and explaned :D
    Next video maby how to subtract from the list eks: pressing H for using health Postion as long as you have potion in the list :D
    in my 3D fos game i use raycast for 2 kind of health, but i might be able to re-wright it to be added to a inventory list so its more like DukeNukem3D/doom(93)/WolfenStain3D :D

    • @LostRelicGames
      @LostRelicGames  4 ปีที่แล้ว +1

      Great idea, will definetly do a potion consume video soon and other inventory based tutes!

    • @StigDesign
      @StigDesign 4 ปีที่แล้ว

      @@LostRelicGames Great :D

  • @lanayaassasin5373
    @lanayaassasin5373 3 ปีที่แล้ว

    Hello, I am a new in programming. I followed all of your instruction, there is no error in my codes but it does not destroy the one that I am colliding. I'm using 2020.3.3f1, any tips and suggestion?

  • @junnieadriano5351
    @junnieadriano5351 3 ปีที่แล้ว

    john wick also know how to make games huh

  • @NanduKrishnanNKSanandu
    @NanduKrishnanNKSanandu 3 ปีที่แล้ว

    zlatan

  • @JoshRhoton
    @JoshRhoton 4 ปีที่แล้ว

    Are you frying bacon in the background?? What's that annoying sound?

    • @LostRelicGames
      @LostRelicGames  4 ปีที่แล้ว +4

      The natural phenomenon known as rain.

    • @JoshRhoton
      @JoshRhoton 4 ปีที่แล้ว

      @@LostRelicGames dang, I got some eggs ready. Lol

  • @harder9285
    @harder9285 4 ปีที่แล้ว

    You're the best! Tysm

  • @harder9285
    @harder9285 4 ปีที่แล้ว

    You're the best! Tysm