I've made an object and when the player has pick it up, rise it up and stop it out of screen. But because you can see the shadow of that object, I will destroy it after the animation has played. But how can I do this whit Unity and C#?
Just destroy is just like this:
and start an animation like this:
private Animator _anim; // global variable _anim = GetComponent<Animator>(); // in start() methode _anim.SetTrigger("Picked"); // in other methode