C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using UnityEngine;
namespace GAim {
public class GAim_GUI : MonoBehaviour {
private bool ShowAim = true;
public Texture2D Taskelis;
public void Start() {
byte[] Byteimage = System.Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKBAMAAAB/HNKOAAAAHlBMVEUAAAAAAAEAAAEAAAEAAAH////y8vKtra0mJifv7+/kN/yFAAAABXRSTlMA8q1Ehq9quroAAAAuSURBVAjXY2AwElRmYGBpT6twYLCYGhrZzKAeGhpaxCAGJBMhJEQEIgtRCdEFAKbfDjcgZsgTAAAAAElFTkSuQmCC");
Taskelis = new Texture2D(10, 10, TextureFormat.RGBA32, false);
Taskelis.LoadImage(Byteimage);
Debug.Log("Start AIM Dot By Gintaras");
}
public void OnGUI() {
int w = Screen.width, h = Screen.height;
Rect Mikpos = new Rect(0, 0, 60, 16); {
if (Input.GetKeyDown(KeyCode.F2))
{
if (ShowAim) {
ShowAim = false;
} else {
ShowAim = true;
}
}
}
if (ShowAim) {
GUI.DrawTexture(new Rect(w / 2 - h / 400, h / 2- h / 400, h / 200, h / 200), Taskelis, ScaleMode.StretchToFill);
}
}
}
}