Collect Items in Unity - Game Dev Tutorial

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 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!

  • @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..

  • @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 Год назад

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

  • @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

  • @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.

  • @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 :)

  • @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

  • @bilal_rifki
    @bilal_rifki 3 года назад

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

  • @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!

  • @AdrianGonzalez-d1t
    @AdrianGonzalez-d1t 2 месяца назад

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

  • @efaz6809
    @efaz6809 4 года назад +3

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

  • @sheepongrass
    @sheepongrass 4 года назад

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

  • @Jiggisghoul
    @Jiggisghoul 2 месяца назад

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

  • @Scyther-ow8wy
    @Scyther-ow8wy 2 года назад

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

  • @pianoatthirty
    @pianoatthirty 2 года назад

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

  • @franciscooliveira3768
    @franciscooliveira3768 3 года назад

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

  • @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

  • @josekarnikowski1711
    @josekarnikowski1711 Год назад

    Very good tutorial. Thanks!

  • @AidanC47
    @AidanC47 2 года назад +1

    Thanks dude

  • @karambultaif6248
    @karambultaif6248 2 года назад

    Best chanell ever 100/10

  • @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.

  • @aarondelgado3421
    @aarondelgado3421 4 года назад

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

  • @b8c_
    @b8c_ 3 года назад

    Thanks for the tut, mate.

  • @moatasem444
    @moatasem444 4 года назад

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

  • @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?

  • @sunilpal2860
    @sunilpal2860 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.

  • @hrishikeshgarud7177
    @hrishikeshgarud7177 4 года назад

    Will you make multiplayer photon PUN tutorial?

  • @joaolucasalmeidapereira9526
    @joaolucasalmeidapereira9526 4 года назад

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

  • @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

  • @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

  • @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!

  • @monaimmatlaya5873
    @monaimmatlaya5873 4 года назад

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

  • @fredysoto8547
    @fredysoto8547 3 года назад

    I need This!! Thanks a Lot Again!!

  • @JvMapote
    @JvMapote 4 года назад +1

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

  • @jurdendurden
    @jurdendurden 4 года назад

    Excellent video thanks for sharing!

  • @culiynl
    @culiynl 4 года назад

    Where is part 2?

  • @LeKikoojap
    @LeKikoojap 3 года назад

    great vid, simple

  • @gilbertdematera9658
    @gilbertdematera9658 Год назад

    thanks bro your amazing

  • @landlubber1143
    @landlubber1143 3 года назад +1

    I didn't know Keanu Reeves taught Unity

  • @t.b.g158
    @t.b.g158 2 года назад

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

  • @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!

  • @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

  • @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

  • @akstis4183
    @akstis4183 4 года назад

    Great video, thank you for help

  • @justahuman4862
    @justahuman4862 4 года назад

    Thanks for the tutorial.

  • @ruliw8520
    @ruliw8520 3 года назад

    thx dude helped me a lot +1 sub

  • @alvarosanchez8066
    @alvarosanchez8066 4 года назад

    Great video.

  • @tajislam8909
    @tajislam8909 4 года назад

    Thank you!

  • @quantranmanh7185
    @quantranmanh7185 4 года назад

    It's great. thank you!

  • @junnieadriano5351
    @junnieadriano5351 3 года назад

    john wick also know how to make games huh

  • @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

  • @harder9285
    @harder9285 4 года назад

    You're the best! Tysm

  • @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?

  • @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