Currently im using this one. But i need it to be specificly a GUITexture, so i could do a HitTest. With this one i cant. Maybe you know a way i could call a touch on Texture2D?
Is this at all helpful? It seems it may address what you want. http://docs.unity3d.com/ScriptReference/RaycastHit-textureCoord.html
Meh, ended up working with DrawTexture. It would have been easy to do this with mousePosition, but in this case i needed touch, so thats why i wanted GuiTexture, so i could use HitTest. But with DrawTexture i couldnt. Thanks for the help tho guys. In case you would like to see the code: Code (csharp): GUI.DrawTexture(slotRect, slots[i].itemIcon); foreach (Touch touch in Input.touches) { Vector3 inputGuiPosition = touch.position; inputGuiPosition.y = Screen.height - inputGuiPosition.y; if(Input.touchCount > 0) { if(slotRect.Contains(inputGuiPosition)) { ItemRec(slots[i]); //Debug.Log(currentItemId); if(currentItemId == 2) { Debug.Log("Touched Ms"); } if(currentItemId == 3) { Debug.Log("Touched Mn"); } } } }