12345678910111213141516171819202122232425262728 |
- using System.Collections;
- using System.Collections.Generic;
- using Core.Language;
- using UnityEngine;
- using UnityEngine.UI;
- public class TextLanguageMono : MonoBehaviour
- {
- public int id;
- // Start is called before the first frame update
- void Start()
- {
- Text text = gameObject.GetComponent<Text>();
- if (text != null)
- {
- text.text = LanguageManager.Instance.Text(id);
- }
- else
- {
- TextMesh textMesh = gameObject.GetComponent<TextMesh>();
- if (textMesh != null)
- {
- textMesh.text = LanguageManager.Instance.Text(id);
- }
- }
- }
- }
|