How to onCollision activate a prefab

Hi! my idea is when the player touch one cube one prefab (fire) appears. How I can do it?

Thanks.

Set your player’s Tag to Player.
Then create a new C# script, attach it to the cube, and insert this:

public Object FirePrefab;
void OnCollisionEnter(Collision col)
{
    if (col.gameObject.tag == "Player")
    {
        GameObject fire = Instantiate(FirePrefab, this.transform.position, Quaternion.identity) as GameObject;
    }
}

In the editor select the cube and drag the fire prefab to the “Fire Prefab” box

Its the script attached to the enemy. When my player touch the enemy it disappears, is destroyed. Now I need one prefab like exlosion after it dissapears. How I can do this?

Thanks.