What is the difference between this two codes :,Quelle est la différence entre ces deux codes : ,Quelle est la différence entre ces deux codes :

void OnTriggerEnter2D (Collider2D other)
{
if (other.gameObject.CompareTag (“laserRay”))
Destroy (gameObject);

}

// AND…

void OnTriggerEnter2D (Collider2D co)
{
	if (co.name == "laserRay")
		Destroy (gameObject); 
},	void OnTriggerEnter2D (Collider2D other)
{
	if (other.gameObject.CompareTag ("laserRay")) {
		Destroy (gameObject);
	}
}

et…

void OnTriggerEnter2D (Collider2D co)
{
	if (co.name == "laserRay")
		Destroy (gameObject); 
}

,

tag is tag of gameobject, you can set it in inspector, default is “Untagged”.

.name is just name of object showed in hierarchy defaul is “New GameObject” or something like that