Generate a random direction within min and max angles

Hello, everyone.
I was wondering how I would go about generating a random direction that was within the minimum angle and the maximum angle. I need this functionality in order to simulate bullet spread with my raycasts. Thanks in advance!!

You should generate two random numbers between min and max (probably -30, +30, something like that. Then use the first number to rotate transform.forward on x and the second number to rotate the result on y.

Just cast a ray, then get direction Ray.direction with
Quaternion.LookRotation(Ray.direction), then add the random spread values to its .eulerAngles.x and .y and apply back to Ray.direction and cast again