How to Collect Items (Unity Tutorial)

  Рет қаралды 63,794

Ketra Games

Ketra Games

Күн бұрын

Пікірлер: 158
2 ай бұрын
For anyone having trouble selecting InventoryUI in the last step, make sure you attached it to the text!!! Thank you, this tutorial was very helpful!
@glebkozlov1603
@glebkozlov1603 2 жыл бұрын
Man that was delightful. After all those rushy tutorials this series is a breath of fresh air. Thank you!
@KetraGames
@KetraGames 2 жыл бұрын
Thanks very much for this 😊
@attenurmi936
@attenurmi936 2 жыл бұрын
This series is clear, simple concept, well planned and fun to follow. Thank you! I'm really looking forward on seeing more of these videos!
@KetraGames
@KetraGames 2 жыл бұрын
Thanks for this great comment 😊
@jatsparrow
@jatsparrow 2 жыл бұрын
Thank you for this beginner friendly tutorial. I'm waiting for your next tutorial.
@KetraGames
@KetraGames 2 жыл бұрын
Great to hear, thank you 😊
@marcobarberio6910
@marcobarberio6910 Жыл бұрын
I'm having problems with the last part in which we should see the number of items collected. It doesn't change. In addition, inside Inspector -> yer Inventory (Script) -> InventoryUI, UpdateDiamondText doesn't appear, why? (I followed all the steps and copied the codes)
@thesilentwisp
@thesilentwisp 2 жыл бұрын
This was super helpful. Didn't know about the events system!
@KetraGames
@KetraGames 2 жыл бұрын
Glad it was useful 😊
@muscatalexj
@muscatalexj Жыл бұрын
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
@samirehman4565
@samirehman4565 Жыл бұрын
finally someone who didn't use destroy function on collectable.
@gabryelhuneault1801
@gabryelhuneault1801 2 жыл бұрын
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!
@KetraGames
@KetraGames 2 жыл бұрын
Hi, I think this will be a limitation with the version of Unity you're using not supporting generic events. As an alternative you can make the event a plain event e.g. public UnityEvent OnDiamondCollected; Then you can select the PlayerInventory in the Inspector when wiring up the event. Hope that helps 😊
@qistinaalia4493
@qistinaalia4493 Жыл бұрын
Hi I cant seem to find the update diamond text method, can you help me?
@KetraGames
@KetraGames Жыл бұрын
Hi, the full script can be found here - dotnetfiddle.net/Rzs92c Hope that helps 😊
@tjorloski1961
@tjorloski1961 2 жыл бұрын
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
@KetraGames
@KetraGames 2 жыл бұрын
Hi, that's strange. I've upgraded the project to 2021.3 and it seems to work fine. As an alternative, you can make the event a plain event e.g. public UnityEvent OnDiamondCollected; Then you can select the PlayerInventory in the Inspector when wiring up the event. Hope that helps 😊
@guruprasadh_j
@guruprasadh_j Жыл бұрын
Most clear video to understand;
@KetraGames
@KetraGames Жыл бұрын
Great to hear this, thanks 😊
@MRBREAD1709
@MRBREAD1709 Ай бұрын
when i did it the dimond tex and image did't show on the screen
@nimomaniachannel
@nimomaniachannel 2 жыл бұрын
this was so clear and its recent. im subbing
@KetraGames
@KetraGames 2 жыл бұрын
Thank you 😊
@protophase
@protophase Жыл бұрын
Well made tutorial, easy to follow. What if you wanted to play a sound whenever you collect a gem?
@michelec1178
@michelec1178 2 жыл бұрын
Thank you, please more tutorials 😊 ,very good tutorials!
@KetraGames
@KetraGames 2 жыл бұрын
Glad you're finding them useful 😊
@galberger3937
@galberger3937 9 ай бұрын
Hi. can you show how to collect bullets, when the player press E with a canvas that shows the corrent amount of the bullets?
@gabryelhuneault1801
@gabryelhuneault1801 2 жыл бұрын
I can't use TMPro in my unity project because I'm using unity 5.6.7f1 and textmeshpro isn't available. Please help
@gabryelhuneault1801
@gabryelhuneault1801 2 жыл бұрын
Cancel that comment
@豆豆開心
@豆豆開心 18 күн бұрын
I followed the code all they way even copy and paste it but on the last step UpdateDiamondText did not show up
@zalatanypl9844
@zalatanypl9844 2 жыл бұрын
Simply Genius! Thx a lot!
@KetraGames
@KetraGames 2 жыл бұрын
Thanks fro this comment 😊
@izzu7641
@izzu7641 Жыл бұрын
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?
@potatojann233
@potatojann233 2 жыл бұрын
Goshh😭 thank you so much. I totally appreciate it.
@KetraGames
@KetraGames 2 жыл бұрын
👍😊
@sherlockholmes374
@sherlockholmes374 Жыл бұрын
Hi there! What if I want the diamonds to spawn randomly during the day?
@aryanpatankar8168
@aryanpatankar8168 Жыл бұрын
Thanks! it worked for my mobile game!
@Wraith4444
@Wraith4444 Жыл бұрын
TYSM IT HELPED MY GAME SOO MUCH
@KetraGames
@KetraGames Жыл бұрын
Great to hear, thanks 😊
@redwes702
@redwes702 2 жыл бұрын
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?
@kabhes9040
@kabhes9040 2 жыл бұрын
I had this problem a few minutes ago one child component in my diamond had a "collider" that didn't had "trigger" checked on.
@jkair5352
@jkair5352 2 жыл бұрын
does anyone know how to get a "you win" page when the player have collected 10 items?
@paulpopSignatur
@paulpopSignatur 11 ай бұрын
If you figure it out let me know I'm looking for the same question
@davidkunle1512
@davidkunle1512 2 жыл бұрын
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.
@KetraGames
@KetraGames 2 жыл бұрын
Hi, thanks. You could add another script that contains a method that checks the number of items collected and then executes your desired action. Then you could wire up the collected event to this new method. Hope that helps 😊
@spongehead93
@spongehead93 2 жыл бұрын
@@KetraGames Is there any chance we could get some code written out for this method to check the number of items? I'm trying to do something similar but I keep getting an error saying that the playerInventory is non-invocable. Here's the code I've written below: public class PhotoAppear : MonoBehaviour { PlayerInventory playerInventory = GetComponent(); void Start() { gameObject.SetActive(false); } // Update is called once per frame public void Update() { if (playerInventory.NumberOfPhotos() == 5) { gameObject.SetActive(true); } return; } } As well, thank you for this tutorial, what it covered was very easy to follow and understand.
@muscatalexj
@muscatalexj Жыл бұрын
Did you ever figure this out?@@spongehead93
@muscatalexj
@muscatalexj Жыл бұрын
How would you write that in code?@@KetraGames
@paulpopSignatur
@paulpopSignatur 11 ай бұрын
Yes I'm looking for the same tutorial nobody has it😢😢
@ani-gamer320
@ani-gamer320 2 жыл бұрын
Thanks for this tutorial ❤️❤️
@KetraGames
@KetraGames 2 жыл бұрын
👍😊
@NotSoSeriousGaming
@NotSoSeriousGaming 2 жыл бұрын
Thank you for such a great guide! How would you carry the gem display onto another scene? I tried the same thing but nothing displayed
@KetraGames
@KetraGames 2 жыл бұрын
Hi, good question. There are a few ways you can pass data between scenes 1. You can use PlayerPrefs to save and load data between scenes - docs.unity3d.com/ScriptReference/PlayerPrefs.SetInt.html 2. Game Objects can survive between scenes if you set DontDestroyOnLoad so this may be a possibility - docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html 3. Another option is to store the data in a ScriptableObject which will then persist across scenes - docs.unity3d.com/Manual/class-ScriptableObject.html Hope that helps 😊
@NotSoSeriousGaming
@NotSoSeriousGaming 2 жыл бұрын
@@KetraGames wow you didn't hold back i really appreciate this.. you are amazing! Keep up the great work !
@cropoxz
@cropoxz 2 ай бұрын
When I walk over the "diamonds" they don't get collected :/ anyone know why?
@nega-guy
@nega-guy Жыл бұрын
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.
@Manofthebean
@Manofthebean 2 жыл бұрын
thank you this was a big help in my game!!
@KetraGames
@KetraGames 2 жыл бұрын
Great to hear this 😊
@jameszchan6096
@jameszchan6096 2 жыл бұрын
How can I make the item only be pickd up whn a player is holding a certain key?
@KetraGames
@KetraGames 2 жыл бұрын
Hi, you could store a reference to the diamond in the OnTriggerEnter method. Then you could remove the reference in the OnTriggerExit method. Then in Update you could check for the button press and pick up the diamond if the reference is not null. Hope that helps 😊
@ev9787
@ev9787 Жыл бұрын
@@KetraGames hi, i would love to do this for my game, but it doesn't make sense to me, could you explain it in more detail, im a beginner
@Cricketdude69
@Cricketdude69 Жыл бұрын
great tutorial!
@Bornholm-Roenne
@Bornholm-Roenne 2 ай бұрын
On Diamond Collected PlayerInventory the update name you said I cant find it. TextmeshProUGui.UpdateFontAsset is the one I can pick?
@KetraGames
@KetraGames 2 ай бұрын
Hi, I'm not sure why it wouldn't be showing. Have you compared your script to the one here dotnetfiddle.net/Rzs92c
@alperturan167
@alperturan167 7 ай бұрын
Another perfect tutorial by Ketra Games :) Thank you very much. May I ask a question: I've got two characters in the game but player can use both of them by swaping. I assigned the PlayerInventory script both of them and it works, BUT once the character#1 collects some diamonds and if I swap to the character#2 and collect any diamond then die diamond collection amount RESETS to 1. It seems Unity or the script keeps the amount for each character seperately, which is fine btw, but 1st Question= how can I show the amount of diamond collection amount of each character on canvas seperately? 2nd Question = how can I show the total diamond collection amount (without resetting) on the same canvas / text area? Many Thanks !
3 ай бұрын
I love u so much thank you for helping this helped for my project
@KetraGames
@KetraGames 3 ай бұрын
Great to hear, thank you 😊
@JPMjeremy
@JPMjeremy Жыл бұрын
Amazing video!
@aleksandraaleksandra7934
@aleksandraaleksandra7934 2 жыл бұрын
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?🙄
@KetraGames
@KetraGames 2 жыл бұрын
Hi, glad you're finding the videos useful. Have you set up the event handler in the Inspector to update the canvas when a diamond is collected? If so, it might be worth adding a Debug.Log line in the method you're calling from the event handler, to make sure it is getting called. Hope that helps 😊
@redna3699
@redna3699 2 жыл бұрын
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?
@KetraGames
@KetraGames 2 жыл бұрын
Thanks 😊 If you wanted the diamond to increase the count by more than 1 you could change the line in the PlayerInventory. So rather than NumberOfDiamonds++; you could do NumberOfDiamonds+= 10; Hope that helps 😊
@redna3699
@redna3699 2 жыл бұрын
@@KetraGames it worked!!! Thank you very much
@frostymug3123
@frostymug3123 2 жыл бұрын
Great tutorial. I have encountered an issue however with the last step ... public UnityEvent OnPickUpCollected; is not exposed in the inspector even with adding [SerializeField]. From what I gather this is a unity bug, any thoughts on a work around?
@KetraGames
@KetraGames 2 жыл бұрын
Hi, I can't think of why it wouldn't be visible. Are you seeing any errors in the Console window? If you still can't get it to work, try copying the script form here - dotnetfiddle.net/Rzs92c Hope that helps 😊
@frostymug3123
@frostymug3123 2 жыл бұрын
@@KetraGames Thank you for the quick response! No errors in console. When researching this issue I found lots of posts claiming this was a unity bug issue with exposing unity events in the inspector. Some suggested you could get around this issue using [System.Serializable]. The example is: "I have found the way. first you have to define your own event type (which is just a basic public class). however the custom event type must inherit from UnityEvent, like so." [System.Serializable] public class myFloatEvent : UnityEvent{} "then you can make variables from it, like so." [SerializeField] public myFloatEvent onChangeEvent; I'm just not sure how to refactor this to work with your example.
@KetraGames
@KetraGames 2 жыл бұрын
I've had a look into this and it seems this was an issue on earlier versions of Unity. What version are you using?
@Samael-lp3nk
@Samael-lp3nk 2 жыл бұрын
Hi thanks for the great tutorials. I'm getting the same error at this point also, i have the latest versions of unity and visual studio my character has [SerializedField] On a third person shooter controller. Not sure if this would have any effect?!🤷‍♂️
@vimalv2312
@vimalv2312 2 жыл бұрын
Where to add this scripts in first person play ?!
@corrohsivegaming7077
@corrohsivegaming7077 2 жыл бұрын
Lovely video! The only part I am wondering is how would I add a sound to when I collect a diamond?
@KetraGames
@KetraGames 2 жыл бұрын
Hi, to play a sound you need to have an audio source. Because the diamond is disabled when it's collected, it won't be able to play the sound itself. Therefore, you will need to add an audio source to the Player object. You can then play as sound using AudioSource.PlayOneShot - docs.unity3d.com/ScriptReference/AudioSource.PlayOneShot.html Hope that helps 😊
@alejandraalcocer9857
@alejandraalcocer9857 2 жыл бұрын
@@KetraGames but it doesnt work if its collider other, how do you connect it? pls help unu
@CCLawhon
@CCLawhon Жыл бұрын
​@@alejandraalcocer9857 @KetraGames and anyone else looking to add sound to these collectibles...I found a solution :) I made a tutorial here: kzbin.info/www/bejne/o3KchoStn96eps0 ...basically just add a parent to your diamond and give that its own bigger collider, audio source, and the "Play Sound on Enter" script in the tutorial :)
@tigranavagyan5922
@tigranavagyan5922 Жыл бұрын
Thank you VERY MUCH for this video👍
@KetraGames
@KetraGames Жыл бұрын
👍😊
@bonse2000
@bonse2000 2 жыл бұрын
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
@KetraGames
@KetraGames 2 жыл бұрын
Hi, this is using the old input system. We're planning a video showing how to upgrade to the new system at some point in the future.
@bonse2000
@bonse2000 2 жыл бұрын
@@KetraGames cant wait for that thank you
@DannyDoux
@DannyDoux Жыл бұрын
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?
@KetraGames
@KetraGames Жыл бұрын
Hi, you would need to persist this between scenes. There are several options to do this. You can use a static variable, Unity's Player Prefs, or you can serialise to disk and load it back in again. Hope that helps 😊
@fernandoabalmedina6571
@fernandoabalmedina6571 Жыл бұрын
@@KetraGames hi i want that when i get to 10 diamonds the player go to next level scene 2, how i can make that happen?
@WornTraveler
@WornTraveler 2 жыл бұрын
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 😂
@KetraGames
@KetraGames 2 жыл бұрын
Thanks for this comment 😊
@Lerde
@Lerde 2 жыл бұрын
Great video...what if i want diamonds to be collected for example 20 and then congratulations on passing a level?
@KetraGames
@KetraGames 2 жыл бұрын
Hi, you would need to create another script to do this. You could still hook up the diamond collected event to this new script but check if the total has reached 20 before making the text visible. Hope that helps 😊
@shang_psycho7414
@shang_psycho7414 2 жыл бұрын
This helped, thanks!
@KetraGames
@KetraGames 2 жыл бұрын
👍😊
@shang_psycho7414
@shang_psycho7414 2 жыл бұрын
@@KetraGames It still worked even though I wasn't using diamonds as the object.
@shang_psycho7414
@shang_psycho7414 2 жыл бұрын
@@KetraGames Do you know how to make it so that when all the items are collected, a scene changes or something?
@KetraGames
@KetraGames 2 жыл бұрын
​@@shang_psycho7414 Hi, you would need to keep track of how many collectables are still active in the scene. Once you reach zero then you can trigger the scene change.
@shang_psycho7414
@shang_psycho7414 2 жыл бұрын
@@KetraGames Ok. If I can't figure out how to do that, I'll try something else. Thanks for the advice.
@BjornBrnk
@BjornBrnk 8 ай бұрын
Please help! This was an awesome tutorial, but I can't find 1 thing on the internet that explains how to load next scene if all objects are collected!!!
@Darkwar9099
@Darkwar9099 2 жыл бұрын
Nice vid it works great on my own game
@KetraGames
@KetraGames 2 жыл бұрын
Thanks, good to hear this 😊
@HansChristian-bj2pt
@HansChristian-bj2pt 2 жыл бұрын
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.
@KetraGames
@KetraGames 2 жыл бұрын
Hi, can you check that when you trigger the event in the PlayerInventory script, that you're passing through 'this' OnDiamondCollected.Invoke(this); That should pass the PlayerInventory through to the UI script. If that doesn't work you could try changing the event to just be a general event public UnityEvent OnDiamondCollected; Then when you wire up the event in the Inspector, there should be an extra slot for the PlayerInventory that you can drag the Player object into. Hope that helps 😊
@MetaDataAutomation
@MetaDataAutomation 2 жыл бұрын
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?
@KetraGames
@KetraGames 2 жыл бұрын
Hi, have you marked the collider as a trigger?
@muhammadjonyangiboyev951
@muhammadjonyangiboyev951 7 күн бұрын
thanks
@KetraGames
@KetraGames 6 күн бұрын
👍😊
@muhammadhabibulloh1596
@muhammadhabibulloh1596 2 жыл бұрын
please help me, I have followed the script but the diamonds don't disappear when they are taken 🙏🏻
@KetraGames
@KetraGames 2 жыл бұрын
Hi, does the diamond count on the screen go up even though they don't disappear? Are there any errors in the console?
@vmbrine
@vmbrine 2 жыл бұрын
@@KetraGames Hi ! I have the same problem than him, my character passes through the collectibles and it does send me an error 😢
@vmbrine
@vmbrine 2 жыл бұрын
And the « is Trigger » is clicked on so I really don’t know where the problem is coming from
@KetraGames
@KetraGames Жыл бұрын
@vmbrine You said it does send you an error? Could you send the details of the error if there is one. Otherwise, it's a matter of debugging to see where the issue is. You can either put breakpoints in the code and step through if you know how to do that. Or you can add Debug.Log lines in to see where it gets to before it fails.
@damontebooze4869
@damontebooze4869 Жыл бұрын
bruh I got an error something about it not containing a defintion
@solid9643
@solid9643 Жыл бұрын
Same
@lewid5409
@lewid5409 Жыл бұрын
Did you solve the problem?
@terablue80
@terablue80 2 жыл бұрын
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!
@KetraGames
@KetraGames 2 жыл бұрын
Hi, sorry I've not looked into AR functionality in much detail. I'd have thought it was possible though
@darkprinc3284
@darkprinc3284 2 жыл бұрын
life savior
@KetraGames
@KetraGames 2 жыл бұрын
Great to hear 😊
@tangaroranguzzikeirb.9264
@tangaroranguzzikeirb.9264 Жыл бұрын
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.
@luliii123
@luliii123 Жыл бұрын
Super helpful 🤩
@KetraGames
@KetraGames Жыл бұрын
Great to hear 😊
@PrincedeepKaur-f9n
@PrincedeepKaur-f9n Жыл бұрын
Thankyou so much.
@KetraGames
@KetraGames Жыл бұрын
👍😊
@davisardians8411
@davisardians8411 2 жыл бұрын
great tutorial. can i request tutorial "trigger a dialog with npc"?
@KetraGames
@KetraGames 2 жыл бұрын
Thanks for the suggestion. We'll add it to the list of future videos 😊
@azzamrashid3726
@azzamrashid3726 Жыл бұрын
4:25 //use override
@KBforJesusChrist
@KBforJesusChrist 2 жыл бұрын
How can I make an item spawn after collecting all objects (diamonds)
@KetraGames
@KetraGames 2 жыл бұрын
Hi, you would need to keep track of how many diamonds are left in the scene. You could write a script that gets the count of diamonds in the scene in the Awake method. Then subscribe to the diamond collected event and decrease this count each time. Once you reach zero you can initialise the object you want. Hope that helps 😊
@KBforJesusChrist
@KBforJesusChrist 2 жыл бұрын
@@KetraGames it's like i want an item to spawn at a certain location after a player collects 7 diamonds i made a parkour game that you can only win by collecting a special item but i want that item to only spawn when you collect a specific amount of gems . I'm a beginner with no knowledge of coding but I'm halfway done with my game I'm making with just tutorial
@hballamco
@hballamco 2 жыл бұрын
A beginner question, in the "InventoryUI" script, why did you put argument for the "UpdateDiamondText" method? What was the source of that argument to make the method work? Thank you,
@KetraGames
@KetraGames 2 жыл бұрын
Hi, the UpdateDiamondText uses the PlayerInventory parameter to get the number of diamonds that have been collected. playerInventory.NumberOfDiamonds.ToString(); This is passed through when the event is invoked from the PlayerInventory. OnDiamondCollected.Invoke(this); In this case 'this' refers to the PlayerInventory invoking the event. Hope that makes sense 😊
@hballamco
@hballamco 2 жыл бұрын
@@KetraGames I see, thanks a lot
@Rovtar_
@Rovtar_ 2 жыл бұрын
How to move box collider?
@KetraGames
@KetraGames 2 жыл бұрын
Hi, the box collider position is linked to the transform of the object it is attached. You can change the center position to offset it however you want. Hope that helps 😊
@mxbshr4276
@mxbshr4276 Жыл бұрын
my fpc character just runs straight through the gems, i followed your code exactly and i cannot get it to work
@KetraGames
@KetraGames Жыл бұрын
Hi, do you see any errors in the console window?
@alfredb.4485
@alfredb.4485 2 жыл бұрын
Perfect! "thx you";
@KetraGames
@KetraGames 2 жыл бұрын
Thanks 😊
@dimassuhada1230
@dimassuhada1230 2 жыл бұрын
Thank uu
@KetraGames
@KetraGames 2 жыл бұрын
👍😊
@nimomaniachannel
@nimomaniachannel 2 жыл бұрын
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.
@KetraGames
@KetraGames 2 жыл бұрын
Hi, yes, usually the name of the file is the same as the name of the class.
@CCLawhon
@CCLawhon Жыл бұрын
If you are looking to add sound to these collectibles where it plays once...I found a solution :) I made a tutorial here: kzbin.info/www/bejne/q5LdoYKElJV9mqM (Edited because the parent object sound didn't always work, and you couldn't keep it from playing anytime you entered the area even if collectable was gone). ...basically just add a sound object on top of the collectable... and give that its own collider, audio source, and the "Play Sound on Enter" script in the tutorial :)​ I got the sound script from @ChrisTutorialsYT kzbin.info/www/bejne/e2iQeXSAaamVbJY, then I added a bool for "if already played".
@sajjadkhan2858
@sajjadkhan2858 2 жыл бұрын
I had requested you to make tutorial on how we can access our collected coins from other scenes...
@KetraGames
@KetraGames 2 жыл бұрын
Hi, we've added it to the list to cover in a future video 👍
@mamtapatil1892
@mamtapatil1892 2 жыл бұрын
How we can spawn diamonds randomly on terrain, please help 😊
@KetraGames
@KetraGames 2 жыл бұрын
Hi, you could generate a navmesh for the walkable area of your terrain. Then you could find random points on the navmesh to place diamonds. This link may help answers.unity.com/questions/475066/how-to-get-a-random-point-on-navmesh.html
@mamtapatil1892
@mamtapatil1892 2 жыл бұрын
@@KetraGames Thank you for replying so quickly. Actually you know what, i am a total beginner and i have to submit my project after 2 days. So can you please make a quick video on this topic i am sure many us want a video on topic. Please
@DiGiFanboy
@DiGiFanboy Жыл бұрын
@fazyrajput7999
@fazyrajput7999 10 ай бұрын
Thanksalot
@JejoGames-b7x
@JejoGames-b7x Жыл бұрын
a me non va
Creating Simple Animations (Unity Tutorial)
6:20
Ketra Games
Рет қаралды 139 М.
Using Terrain Tools to Create 3D Landscapes (Unity Tutorial)
23:28
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 47 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 19 МЛН
Creating a Day/Night Cycle (Unity Tutorial)
20:28
Ketra Games
Рет қаралды 44 М.
How to Collect Coins in Unity 3D Tutorial 2023 (Updated)
5:07
Rigor Mortis Tortoise
Рет қаралды 19 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
How to use Animation Transitions (Unity Tutorial)
9:59
Ketra Games
Рет қаралды 187 М.
I Made My First Game in Godot in 3 Weeks...
26:21
Jack Sather
Рет қаралды 454 М.
How I learned Unity without following tutorials (Developing 1)
18:11
Game Maker's Toolkit
Рет қаралды 2,1 МЛН
HOW TO MAKE AN FPS IN UNITY 6 - GAME TUTORIAL 01 BEGINNERS INTRO
13:11