Why don’t you just do something really, really simple. There are a couple of things, but they depend on exactly what you want to achieve.
First up, make a crosshair image in your pixel manipulator of choice. Import into your project, preferably with some kind of transparency so that you can see through parts of it.
Then, in your C# file put the line
public Texture2D crosshairImage;
in the variable declarations section.
This will allow you to drop a texture onto the component, and use it in your script!
Then, you can draw it on the screen with this-
void OnGUI()
{
float xMin = (Screen.width / 2) - (crosshairImage.width / 2);
float yMin = (Screen.height / 2) - (crosshairImage.height / 2);
GUI.DrawTexture(new Rect(xMin, yMin, crosshairImage.width, crosshairImage.height), crosshairImage);
}
This will draw the texture in the middle of the screen!
Of course, this isn’t always what you want. Sometimes, you need it to be drawn on the mouse position instead!
float xMin = (Screen.width - Input.mousePosition.x) - (crosshairImage.width / 2);
float yMin = (Screen.height - Input.mousePosition.y) - (crosshairImage.height / 2);
Hahahahaha
– Progressist