Files
JJBB/Assets/Project/Script/GUI/Base/UIImgText/UIImgFont.cs
2024-08-23 15:49:34 +08:00

22 lines
524 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIImgFont : MonoBehaviour
{
public Dictionary<char, UIImgChar> _DictImgChars;
public void InitChars()
{
if (_DictImgChars != null)
return;
_DictImgChars = new Dictionary<char, UIImgChar>();
var childChars = GetComponentsInChildren<UIImgChar>();
foreach (var childChar in childChars)
{
_DictImgChars.Add(childChar._Char, childChar);
}
}
}