Комментарии:
How would you reference the number of collected items in another script? Im trying to make it so that once i pickup 10 an achievement pops
Ответитьfinally someone who didn't use destroy function on collectable.
ОтветитьHi there! What if I want the diamonds to spawn randomly during the day?
Ответитьa me non va
ОтветитьAmazing video!
ОтветитьHi, I have a problem. I have all the scripts copied and put into the correct objects but there's something wrong. When I go to my character the Player Inventory script doesn't show the thing where I can select the function of OnDiamondCollected. Plus, when I try to test the game and grab the collectables it just throws me this error:
"NullReferenceException: Object reference not set to an instance of an object PlayerInventory.DiamondCollected () (at Assets/PlayerInventory.cs:13)
Diamond.OnTriggerEnter (UnityEngine.Collider other) (at Assets/Diamond.cs:13)"
By the way, I'm using Unity 2019.4.40f1 Personal. Maybe that has something to do? If you can help I'd thank you a lot.
great tutorial!
Ответитьbruh I got an error something about it not containing a defintion
ОтветитьHey, first of all i love your tutorials on unity, but i've been watching countless tutorials, blog posts and The unity guide and can't find anything about persistent collectable couter, how can i make it that when i collect 7 collectables in one level that i start the next one with 7?
ОтветитьThanks!
it worked for my mobile game!
Super helpful 🤩
ОтветитьThank you VERY MUCH for this video👍
Ответитьhow to collect the diamond in order like in diamond1 diamond 2 diamond 3 , if diamond 1 one is collected you cannot collect the diamond 2 and diamond 3.
ОтветитьHello , i have 3 object to collect and what should i do to collect it in order if 1 is not collected 2 is collected,then of 1 is collected and 2 collected?
ОтветитьHi I cant seem to find the update diamond text method, can you help me?
Ответитьmy fpc character just runs straight through the gems, i followed your code exactly and i cannot get it to work
ОтветитьTYSM IT HELPED MY GAME SOO MUCH
Ответитьplease help me, I have followed the script but the diamonds don't disappear when they are taken 🙏🏻
ОтветитьPerfect! "thx you";
ОтветитьGreat tutorials. However im runing into an error with this one, even if i copy your code from the fiddle link.
ArgumentException: Object of type 'UnityEngine.Object' cannot be converted to type 'PlayerInventory'.
I get this error when i implement the last steps. Everything works fine up till then. The gems gets picked up and removed but at soon as i want to send the number of gems to the UI i get the error. And only when i attempt to pick up the gems.
Lovely video! The only part I am wondering is how would I add a sound to when I collect a diamond?
Ответитьdoes anyone know how to get a "you win" page when the player have collected 10 items?
ОтветитьMan that was delightful. After all those rushy tutorials this series is a breath of fresh air. Thank you!
ОтветитьYour voice is so calming <3
ОтветитьWhat simple anda wonderful tutorial right there, But I have question. So how to make value of the diamond collected to somewhat larger than 1?
ОтветитьHello,
I have everything setup like in the video but when my character walks into the diamonds it does not collect them but they are solid instead and it just collides. It seems like a problem in my diamond script detecting player collision but everything is setup as in the video so I'm not sure what the issue is?
Nice vid it works great on my own game
ОтветитьHow we can spawn diamonds randomly on terrain, please help 😊
ОтветитьHiya,
Thanks for the nice video, was easy to follow. Bit of a plot twist for me though - I'm using 2D so maybe that's the problem.
Basically I have a fireball that comes down and I want my character to collect it. The fireball has a rigidbody, circular collider and bouncy physics. When it hits my dragon it doesn't get collected - any ideas?
At the very beginning: big hugs to you💚! You do wonderful tutorials for beginners, I learn a lot from your videos. Thank you!
I used this video to add scripts to an existing project that I have been working on for a while. I already have a canvas for Game Over.
I did what you did in this video, no bugs, player can collect diamonds but unfortunately nothing is charged on the canvas. I watched the tutorial again and I don't know where the error may be. I know it's hard to answer something "out of the head", but maybe someone has an idea?🙄
How can I make the item only be pickd up whn a player is holding a certain key?
ОтветитьHow can I make an item spawn after collecting all objects (diamonds)
ОтветитьI figured it out the text issue but I have another issue. The updated playerinventory script works fine but the subscriber list doesn't appear or show up. Please help! ASAP!
ОтветитьI can't use TMPro in my unity project because I'm using unity 5.6.7f1 and textmeshpro isn't available. Please help
Ответитьlife savior
ОтветитьHi great tutorial I'm just wondering how do I make it so when you collect a number of items it brings you to a new scene like a game over scene.
ОтветитьHIIII! Amazing tutorial! Do you think this is doable on an AR game? I'm trying to figure out if there's any possibility to collect an AR element and put it into an inventory (ideally on click as it is an android app) yet I didn't manage to find any tutorial on this topic :( Any advice? Thanks!
ОтветитьI'm also getting that bug where the Unity event is not showing the Update player inventory thing. it was working fine on 2020.3 , but on my new project in 2021.3 it isn't working
Ответитьthank you this was a big help in my game!!
ОтветитьWhere to add this scripts in first person play ?!
ОтветитьThanks for all the dope videos! 🙏 Keep it up, they are very helpful and everything is well explained, being a newb I dig that lol 😂
Ответитьwitch ipnut are u using old or new? its dowsnt work for me i havent errors on scripts bad my chr dsnt collect the diamonds
ОтветитьQUESTION:
Are the public class names just the name of the C# script. For example,
public class PlayerInventory : Monobehaviour;
because the filename is called PlayerInventory.
this was so clear and its recent. im subbing
ОтветитьThis helped, thanks!
ОтветитьThank uu <3
ОтветитьGreat video...what if i want diamonds to be collected for example 20 and then congratulations on passing a level?
Ответить