mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2025-02-17 10:54:22 +01:00
35 lines
652 B
C#
35 lines
652 B
C#
|
using Fie.Manager;
|
||
|
using TMPro;
|
||
|
|
||
|
namespace Fie.UI
|
||
|
{
|
||
|
public class FieUITextMeshProObject : FieUILocalizedTextObjectBase
|
||
|
{
|
||
|
protected TMP_Text _tmpTextObject;
|
||
|
|
||
|
public TMP_Text TmpTextObject
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
if (_tmpTextObject == null)
|
||
|
{
|
||
|
_tmpTextObject = base.gameObject.GetComponent<TMP_Text>();
|
||
|
}
|
||
|
return _tmpTextObject;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
protected virtual void Awake()
|
||
|
{
|
||
|
_tmpTextObject = base.gameObject.GetComponent<TMP_Text>();
|
||
|
InitializeText();
|
||
|
}
|
||
|
|
||
|
public override void InitializeText()
|
||
|
{
|
||
|
_tmpTextObject.font = FieManagerBehaviour<FieEnvironmentManager>.I.currentFont;
|
||
|
_tmpTextObject.ForceMeshUpdate();
|
||
|
}
|
||
|
}
|
||
|
}
|