hi, I am trying to make a code that will register the tag of the object it most recently collided with, but I am getting the “no monosbehaviour scripts in the file” error. I checked the file name, and they match, as I am fairly new to c# this is probably a dumb error on my part, but if you could help me that would be great.
thanks
here is the code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class wandSocket : MonoBehaviour
{
public string wandConfirmation;
void OnCollisionEnter(Collision collision)
{
wandConfirmation = collision.gameObject.tag;
}
}