Getting Script of the object that is in contact.

I’m needing help figuring out how to get the script of an object that is occupying the same space as another object. I don’t need it on collision, but I need to be able to call the object on command. Like, some way to ask which objects is this object touching? Help is greatly appreciated! Thank you for your time.

One thing that you can do is select the collider component of the object the script is on and check the “Is Trigger” box. You can then go into your script. Unity comes with built in methods: “OnTriggerEnter()” “OnTriggerStay()” and “OnTriggerExit()”. You can place your code in these methods and it should work!

Hope this helps!