using UnityEngine;
using System.Collections;
public class testNGUI : MonoBehaviour {
public GameObject testingSprite_GO;
public UISprite testingSprite_S;
private bool spriteEnabled = true;
private bool gameObjectEnabled = false;
void OnGUI(){
if(GUI
.Button(new Rect
(100,
350,
100,
50),
"Sprite On")){ testingSprite_S.enabled = !spriteEnabled;
spriteEnabled = !spriteEnabled;
}
if(GUI
.Button(new Rect
(100,
400,
100,
50),
"GameObject On")){ testingSprite_GO.SetActive(!gameObjectEnabled);
gameObjectEnabled = !gameObjectEnabled;
}
}
}