📜  碰撞时按第 2d 层统一输入 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:59.861000             🧑  作者: Mango

代码示例1
void OnCollisionEnter(Collision collision)
     {
         if (collision.gameObject.layer == 8/*the layer number*/ )
             debug.log(collision.gameObject.layer.number.ToString() "touched")
    }