I was wondering if there was some kind of code that can let me increase the size of a specific string. I made it so that if you are using the default pistol the UI will show an ∞ symbol but it is a little too small. Is there some kind of .fontsize = 14 type deal I could use to make it bigger? I read some of the threads on here but I don’t think they describe what I’m talking about. That or they went over my head. I don’t want to change the rest of the font size. Just that symbol. Here is the code.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AmmoDisplay : MonoBehaviour
{
private int ammoD;
public Text ammoDisplay;
public Text reloadDisplay;
public Text currentScore;
private string defMax;
void Update()
{
defMax = GetComponent<Shoots>().clip.ToString();
if (defMax == "999")
{
defMax = "∞";
}
ammoDisplay.text = GetComponent<Shoots>().ammo.ToString() + "/" + defMax;
currentScore.text = GetComponent<Score>().score.ToString();
if (GetComponent<Shoots>().isReloading == true)
{
reloadDisplay.text = "Reloading...";
}
if (GetComponent<Shoots>().isReloading == false)
{
reloadDisplay.text = " ";
}
}
}