总结: .tag作用: 1、比对标签 。2.、动态的给物体设置标签。 .CompareTag: 仅比对标签。 如果只是比对标签,CompareTag方法,效率更高 链接: Unity gameObject.CompareTag和gameObject.tag性能对比