C# Unity code - https://levidsmith.com/games/yatzy-di...
This is a quick example of how to programmatically get the value of rolled dice in Unity, based on the rotation of the GameObject's transformation.
Assumes that the die model has 4 up, 3 bottom, 2 front, 5 back, 1 left, and 6 right.