How do I get the Rotation postition of a gameobject

I have a cube rotating every 90 degrees on a left mouse click and a -90 on a right mouse click. How do I get the rotation position of the gameObject (0, 90, 180, 270)?

1 Answer

1

GameObject has a transform property that contains properties for rotation and position, among other things.