September 2011
Beginner
408 pages
9h 52m
English
The pie clock is pretty neat, but it's sadly stuck to the top-left corner of the screen. It would be great if we could make it any size we wanted, and if we could move it anywhere on the screen.
We're not far off from that goal. Follow these steps to get a dynamically positioned and scaled pie clock:
OnGUI function:var pieClockX:int = 100; var pieClockY:int = 50; var pieClockW:int = 64; // clock width var pieClockH:int = 64; // clock height var pieClockHalfW:int = pieClockW * 0.5; // half the clock width var pieClockHalfH:int = pieClockH * 0.5; // half the clock height
In this example, 100 and 50 are the X and Y values where I'd like the pie ...
Read now
Unlock full access