HI,
I’m trying to increase text size over time, but getting an int - float error with the time part.
public class Opening : MonoBehaviour {
public GUISkin skin;
bool title = true;
int size = 10;
bool closedCapOne = false;
bool closedCapTwo = false;
bool closedCapThree = false;
bool closedCapFour = false;
bool closedCapFive = false;
void Start () {
StartCoroutine(Open());
}
void Update () {
while(title){
size += 4 * Time.deltaTime; // Smooth time?
}
}
IEnumerator Open () {
CameraFade.FadeOutMain(0.1f);
yield return new WaitForSeconds (5);
title = false;
}
void OnGUI () {
GUI.skin = skin;
skin.label.fontSize = size;
if(title)
{
GUILayout.BeginArea(new Rect(0,0,Screen.width,Screen.height));
GUILayout.Label("Game Title");
GUILayout.EndArea();
}
}
}
How would I get around this in unity?