[C#] how do I get the name of the object under the player?

Hello, I am trying to make a quick little prototype. Right now I am trying to have it so when the player intersects with an enemy, it goes into a battlefield. The battlefield is different depending on the area they are in, so I want to be able to get the name of the game object under the player (preferably a terrain). How would I do that?

1 Answer

1

Character controller hit, look it up on script ref.

thanks! That helped a lot! :)