- Home /
 
Help with GUIStyle showing up
Hey, I am making a countdown and I want a GUIStyle to change the font and colour of the text but for some reason the GUIStyle is not applying to the actual text when I change it here is the script:
using UnityEngine;
using System.Collections;
public class countDownTimer : MonoBehaviour {
 float timeRemaining = 15;
 public GUIStyle myStyle;
 void Start () {
 
 }
 void Update () {
     timeRemaining -= Time.deltaTime;
 
 }
 void OnGUI(){
     if (timeRemaining > 0) {
         GUI.Label (new Rect (450, 100, 200, 100), "" + (int)timeRemaining);
     } else {
         GUI.Label (new Rect (450, 100, 200, 100), "MELTDOWN");
     }
 }
 
               }
Just write down GUIStyle function too maybe There is no connect with GUIStyle and Void OnGUI how can it understand what you are doing
I am used to Javascript so C Sharp is very new to me haha I just started using it in Javascript you only need a variable GUIStyle usually, so how do I connect it together?
Your answer
 
             Follow this Question
Related Questions
Unity 2D - Text UI and Textbox scripting issue - HELP ASAP! 2 Answers
create a button with name and text for every game object with tag 0 Answers
How can I apply a text variable to a prefab 2 Answers
Make text appear and stay when clicking. 1 Answer
Can't see text for menu in unity with a texture placed 1 Answer