Unity making a block spin code example
Example 1: object spin unity
void FixedUpdate()
{
gameObject.transform.Rotate(0, 0, +1)//Rotate(x, y, z) + = add one per update
}
Example 2: how to rotate object unity
public Transform Position; // make reference in inspector
Position.Rotate(x, y, z);