using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CrossHair : MonoBehaviour
{
public Texture2D crosshairTexture;
public Rect position;
public bool originalOn = false;
private void Start()
{
Cursor.lockState = CursorLockMode.Locked;
position = new Rect((Screen.width - crosshairTexture.width) / 2, (Screen.height -
crosshairTexture.height) / 2, crosshairTexture.width, crosshairTexture.height);
}
private void OnGUI()
{
if (originalOn == true)
{
GUI.DrawTexture(position, crosshairTexture);
}
}
}
The texture is too much to the left side not in the middle.
And it’s very big i want it to be very small almost like a dot(cross hair).