My idea: Keep each of the 26 blocks as separate GameObject
objects (8 corners, 12 edges, 6 centers), with each block's origin in the center of the cube. Separately you keep track of which block is currently where on the cube, for example in a 3D array.
Then when a face needs to be turned:
- Find out which blocks belong to the face.
- Rotate each of those blocks around the axis of rotation (through the middle of the cube) using Unity's normal rotation functionality.
- Update the information on which blocks are where.