so, i use this script to check collision.. i attach the script to a prefab object that will be spawned 10 times later..
void OnCollisionEnter2D(Collision2D sdd)
{ Destroy (sdd.gameObject); }
the object already has rigidbody2d and collisionshape for 2d.. it works.. but it only destroy the orignal prefab object that i added to the scene.. not the clone of it.. anyone know how to fix this ?
↧