I already learnded (Component.CompareTag(“Tag”)) is faster than (Component.tag == “Tag”)
To use it like this:
function OnTriggerEnter (other : Collider) {
if (other.CompareTag ("Player")) {
Destroy (other.gameObject);
}
}
So is it the same for (other.ToString == "name) instead of (other.name == “name”) ?
Or is it just the same ?
Thank you!