Unity incluye herramientas para inspeccionar lo que ocurre durante el juego.
Debug.Log("Mensaje");
Debug.LogWarning("Advertencia");
Debug.LogError("Ocurrió un error");
Debug.Log($"Vida: {vida}");
Dibuja una línea temporal en la Scene View.
Debug.DrawRay(
transform.position,
transform.forward * 5f,
Color.red
);
Muy útil para Raycasts.
Permiten dibujar ayudas visuales en el Editor.