using UnityEngine;
using System.Collections;
public class InputTest : MonoBehaviour {
bool swapColor;
void Update ()
{
if( !UICamera.inputHasFocus && Input.GetKeyDown (KeyCode.A) )
{
swapColor = !swapColor;
}
}
void OnGUI () {
if( swapColor )
{
GUI.color = Color.red;
}
else GUI.color = Color.white;
GUI
.Button (new Rect
((Screen
.width * 0
.5f
) - 100,
(Screen
.height * 0
.5f
)-15,
200,
30),
"Press A"); }
}