28 lines
678 B
C#
28 lines
678 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace RothenburgAR.UI
|
|
{
|
|
public class FontsizeSelector : MonoBehaviour
|
|
{
|
|
public FontsizeClass SizeClass = FontsizeClass.Body;
|
|
|
|
void Start()
|
|
{
|
|
var tmproText = gameObject.GetComponent<TMPro.TextMeshProUGUI>();
|
|
if (tmproText != null)
|
|
{
|
|
tmproText.enableAutoSizing = true;
|
|
tmproText.fontSizeMax = FontsizeManager.Instance.GetFontsize(this.SizeClass);
|
|
tmproText.fontSizeMin = tmproText.fontSizeMax * 0.8f;
|
|
}
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
} |