Hi,
i read somewhere that a lot of buttons slow you heavily down and creating a buttonclass on your own is the better way to go.
Is that true? link: How can I create an Inventory system with GUI? - Questions & Answers - Unity Discussions
anothe thing is that when i used this code like this, unity creates my rect by default in the bottom left corner insted top left.
why?
using UnityEngine;
using System.Collections;
public class __GameMaster : MonoBehaviour {
Rect rect;
void Awake () {
DontDestroyOnLoad (gameObject);
}
// Use this for initialization
void Start () {
rect = new Rect(0, 0, 150, 150);
}
// Update is called once per frame
void Update () {
if (rect.Contains(Input.mousePosition))
print("Inside");
else
print ("outside");
}
}// this code creates a rect in top left, and prints if mouse is inside or not.
Greets Equal