How to make collectibles

How do I make collectibles like coins that I can pick up. the number of coins should add to my score

A simple solution is to add a collider to your coins and enable “Is Trigger”.

Then you can respond to events where you pick up your coins.

// Example script that could be attached to the Player
// Example requires coins to be tagged "Coin" for this to work.
public int score;
void OnTriggerEnter(Collider other)
{
    if (other.tag == "Coin")
    {
        score += 10;
        Destroy(other.gameObject); // Or whatever way you want to remove the coin.
    }
}

alt text

Two videos regarding colliders and triggers:

69036-icon.png

Well, if you are looking for a ready solution you might like this one

Collect Me 8 - https://www.assetstore.unity3d.com/en/#!/content/59501