Skip to content

Instantly share code, notes, and snippets.

@Kaundur
Created June 11, 2018 15:00
Show Gist options
  • Save Kaundur/c34dd71e991b7029805d53faf6824e62 to your computer and use it in GitHub Desktop.
Save Kaundur/c34dd71e991b7029805d53faf6824e62 to your computer and use it in GitHub Desktop.
Unity Simple Crosshair
void OnGUI()
{
const int crossHairWidth = 10;
const int crossHairHeight = 10;
GUI.Box(new Rect(Screen.width/2 - crossHairWidth/2, Screen.height/2 - crossHairHeight/2, crossHairWidth, crossHairHeight), "");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment