In this Unity tutorial we're going to look at how how to pick up collectables when the player collides with them.
We'll start by creating a diamond prefab that we can then reuse all over the scene.
We'll add a collider to the diamonds and show how to write a script to allow the player to collect the diamonds on collision.
Finally we'll add some UI elements to show the player how many diamonds they have collected.
The project files are available to our patrons here:
► [ Ссылка ]
Want to follow along? This project is a good starting point
► [ Ссылка ]
The final script can be found here
► [ Ссылка ]
The diamond sprite used in the tutorial can be found here
► [ Ссылка ]
Help support our work:
► Patreon: [ Ссылка ]
► Ko-fi: [ Ссылка ]
Follow us:
► Ketra Games: [ Ссылка ]
► Patreon: [ Ссылка ]
► Twitter: [ Ссылка ]
► Facebook: [ Ссылка ]
Introduction - 0:00
Getting Collectable Items from the Asset Store - 00:34
Creating a Diamond Prefab - 1:07
Setting up the Diamond Collider - 3:11
Creating Scripts to Pick Up the Diamonds - 4:13
Adding UI Elements - 7:22
Adding Scripts to Update the UI - 10:04
Adding more Diamonds - 13:07
Summary - 13:50
#KetraGames #LearnUnity #UnityTutorials #UnityTips
How to Collect Items (Unity Tutorial)
Теги
Collect Items UnityCollectables UnityOnTrigger UnityCollider UnityCollisions UnityPick Up Item UnityCollect Items Unity 3dCollectables Unity 3dOnTrigger Unity 3dCollider Unity 3dCollisions Unity 3dPick Up Item Unity 3dUnityUnity Tutorialunity3dUnity3d TutorialLearn UnityLearn Unity3DUnity 3dUnity Tutorialsunity 3d TutorialTutorialGame Development UnityUnity Game TutorialUnity Tutorial for BeginnersUnity Beginner Tutorial