Version: 2019.2
public float distance ;

説明

Gets the distance between two colliders.

The distance between two colliders is defined as the length of a Vector2 between pointA and pointB. The distance between these points can be positive indicating that the Collider2D are separated (not overlapped), zero indicating that they are touching (but not overlapped) or negative indicating that they are overlapped.