using guitexture for sprites is a totally horrible idea anyway.
It won’t batch, you can’t do uv animations etc, many good reasons to not even consider it.
Use a mesh based system for sprites and alike, if you don’t want to start at 0, use SpriteManager1, if you want a cool editor, animation etc, then invest into Sprite Manager 2
This essentially makes my GUITexture rotate properly. The solution is more complex than a .rotation property for a reason. Make sure to define “myRotatingTexture” using your own methods (Resources.Load or WWW or whatever.) Works great with scanner/radar sweeps, eyeballs, clock hands, map compass, “follow mouse cursor”, etc.
private static int rotationAngle = 0;
void onGUI() {
//do other GUI stuff here - it will not be rotated, example:
//GUI.Label(new Rect(0,0,Screen.width,100), "Hello World");
//rotating 256x256 GUITexture in a GUI Group:
GUI.BeginGroup(new Rect(0,0,Screen.width,Screen.height));
rotationAngle += 5;
GUIUtility.RotateAroundPivot(rotationAngle , new Vector2(Screen.width/2, Screen.height/2));
GUI.DrawTexture(new Rect(Screen.width/2 - 128, Screen.height/2 - 128, 256, 256), myRotatingTexture);
GUI.EndGroup();
}
@Dreamora GUITexture have an advantage against Canvas and any other newer GUI based system…
the advantage is that all GUITextures will match any sort of resolution and aspect ration, even if you anímate it with Transform… i tried a lot with canvas and ngui for this with no result… the animated (transform transition) sprite gets out of bounds when aspect ratio switches…