How to draw a line between objects and get distance

Hi Everyone,

Im just working on my enem behavior script.
For debug reasons I want a red line from the enemy drawing to the player.
I tried Debug.DrawLine but i somehow cant get it to work o.O

Also I want to get the distance between the two objects, how can I do that?

Thanks in advance!

Debug.DrawLine seems the best solution, maybe you can post the code to let us view how you’ve used it.

To get the distance between two objects you can do that:

Vector3.Distance(object1.transform.position, object2.transform.position);