I want to change the GUI font for a little flappy bird clone-ish game i’m making. I’m stumped. This is in C#. This entire script also generates the endless “rocks”, as you would expect in this kind of game.
using UnityEngine;
public class Generate : MonoBehaviour
{
public GameObject rocks;
int score = 0;
// Use this for initialization
void Start()
{
InvokeRepeating("CreateObstacle", 1f, 1.3f);
}
// Update is called once per frame
void OnGUI ()
{
GUI.color = Color.black;
GUILayout.Label(" Score: " + score.ToString());
}
void CreateObstacle()
{
Instantiate (rocks);
score++;
}
}
Any ideas?