我想统一检测触摸,但我遇到了一个奇怪的错误
我期待得到调试日志
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class toucth : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void OnCollisionEnter(Collision col){
if(col.gameObject.name = "Cube(10)"){
Debug.Log("col");
}
}
}