Creating Collectables In Unity
Apr 25, 2021
At this level, it’s pretty easy to handle collectables in Unity: Just sure to check the collider’s are is Trigger and do not forget to add Rigidbody. Thus, I have created a Coin script for the spheres (hey! they are our future coins!).
Certainly, our player needs to know how many coin that we have collected and a function to update the coins and UI Manager.
And certainly, the UI Manager. We need to remember the best practice — use Singleton!
And that’s all :).