I have a game object called game object 1 on screen. It holds an image called red . when i drag an image called "animal" on a game object 1 collision happening fine and destroys the "animal" in same layer. Then increment the score. But when i drag an image called "animal" on a game object 2 I want to decrement my score (with out collision). I know different layer collision is not happening.
void OnCollisionEnter2D(Collision2D col)
{
if(Input.GetMouseButtonUp(0))
{
if (col.gameObject.name == "Semi arid" )
{
//obj1.rigidbody.isKinematic = false;
scoreCalculate.currentScore+=10 ;
Destroy(gameObject);
//Debug.Log ("Scored1............"+scoreCalculate.currentScore);
Instantiate(obj1, ObjectSpawnPosition1, Quaternion.identity);
Instantiate(green, ObjectSpawnPosition1, Quaternion.identity);
obj1.renderer.enabled = true;
green.renderer.enabled = true;}