How can I change GUI Label text size?

sorry guys. I asked it somewhere else but I didn’t get the answer… I want to get larger size text… can I do anything with this order?

using UnityEngine;
using System.Collections;

public class WarningArea : MonoBehaviour
{
    string message = "";

    void OnTriggerEnter(Collider otherObjective)
    {
        if (otherObjective.tag == "MainCamera")
        {
            audio.Play();
            message = "Warning text or something!";
        }
    }
    
    void OnTriggerExit(Collider other)
    {
        message = "";
    }
    
    void OnGUI()
    {
        GUI.Label(new Rect(0, 0, 200, 20), message);
    }
}

1 Answer

1

You have to set up another 1 and/or 2 (reference).

Check out GUIStyle.fontSize!

Then pass that style to the Label call.

Thats quite alright. On closer inspection it looks like maybe you can bind directly to fields from value actions too. So that would be shorthand for getting the mouse position I havent tried it but thats what it looks like from the video I made