Rather than using other.tag == "Player"
it is more efficient to use other.CompareTag("Player")
as this avoids the extra memory allocation performed when accessing other.tag
, and the subsequent garbage collection cost.
See this tutorial for more details.
But really we should consider using Layers - they can be five times faster!