2D LookAt() unity code example
Example 1: look at Unity 2D
Vector3 diff = Camera.main.ScreenToWorldPoint(Input.mousePosition) - transform.position;
diff.Normalize();
float rot_z = Mathf.Atan2(diff.y, diff.x) * Mathf.Rad2Deg;
transform.rotation = Quaternion.Euler(0f, 0f, rot_z - 90);
Example 2: unity look at 2d
transform.right = target.position - transform.position; // Works like a CHARM.