📅  最后修改于: 2022-03-11 14:49:03.793000             🧑  作者: Mango
private void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.layer == layerToIgnore)
Physics.IgnoreCollision(collision.gameObject.GetComponent(), GetComponent());
}