> For the complete documentation index, see [llms.txt](https://maxim218.gitbook.io/unity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://maxim218.gitbook.io/unity/sozdanie-pritsela.md).

# Создание прицела

```
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ddd : MonoBehaviour {
    public Camera camera = null;

    void Start () {
        // курсор всегда в центре
        Cursor.lockState = CursorLockMode.Locked;
        // сделать курсор невидимым
        Cursor.visible = false;
    }

    void Update () {
        // пусто
    }

    void OnGUI()
    {
        int n = 12;
        float xxx = camera.pixelWidth / 2 - n / 2;
        float yyy = camera.pixelHeight / 2 - n / 2;
        GUI.Label(new Rect(xxx, yyy, n, n), "+");
    }
}
```
