i’m having a problem to create the text that says press any button and making it blink. i have create the background and the text but i can’t make it blink. i’m doing it in C#. here is my code
using UnityEngine;
using System.Collections;
public class MainMenu : MonoBehaviour {
public GUITexture guiTexture;
private int GuiLabel = false;
void OnGUI(){
CreateBackgroundBox();
GuilabelStart();
if (displayLabel == true)
GUILayout.Label("Press Any Button");
}
private void CreateBackgroundBox(){
GUI.Box(new Rect(0, 0, Screen.width, Screen.height), "");
}
private int GuilabelStart(){
while(1){
GuiLabel = true;
yield return new WaitForSeconds(.5);
GuiLabel = false;
yield return new WaitForSeconds(.5);
}
}
}