Check out example codes for "unity drawline". It will help you in understanding the concepts better.

Code Example 1

public Transform target;

    void OnDrawGizmosSelected()
    {
        if (target != null)
        {
            // Draws a blue line from this transform to the target
            Gizmos.color = Color.blue;
            Gizmos.DrawLine(transform.position, target.position);
        }
    }

Learn ReactJs, React Native from akashmittal.com