How to get angle of terrain?

Hi! I’m developing a game for my final year project and it is a bike simulator game that uses a real bicycle as an input through Arduino and has a moving platform based on the angle of bike in the game. I want to get the angle of the terrain where the bicycle is oriented. I have searched but can’t find the right solution. I think, to get the angle is to use raycast functon or Vector3.angle.

Please help me. Thanks

ALTERNATIVE WAY :
1-Create a little box. 2-Assign Rigidbody to the box. 3-Put the box where you want to know angle of terrain. 4-Get box’s angle values.

(Also you can get bicycle’s current angles)

Maybe this can help to you.