How to make the arrow to follow the character's moving in minimap?

The character’s moving direction should be showed in the minimap by a arrow(texture),so how can I make the arrow’s direction to follow the character?

You must use GUIUtility.RotateAroundPivot: this function modifies the GUI matrix to draw GUI elements rotated at the specified angle around the pivot point.

Find the pivot point in GUI screen coordinates (y=0 means top), and set the angle based on the character forward direction:

var arrow: Texture2D; // drag the arrow texture here
var rArrow: Rect(10, 10, 110, 110); // rectangle where to draw the arrow

function OnGUI(){
  var svMat: Matrix4x4 = GUI.matrix; // save the current GUI matrix
  // find the pivot and rotation angle:
  var pivot = rArrow.center; // get the arrow center point
  var ang = transform.EulerAngles.y; // get the character angle
  // set GUI matrix to rotate ang degrees around the pivot:
  GUIUtility.RotateAroundPivot(ang, pivot);
  GUI.DrawTexture(rArrow, arrow); // draw the arrow
  GUI.matrix = svMat; // restore the matrix to not affect other GUI items
}