From 849c109ae26960be15722f01b9ea8230f4a2efc2 Mon Sep 17 00:00:00 2001 From: Alee Date: Mon, 10 Jun 2019 12:13:55 -0400 Subject: Localisation (Working progress) --- Assets/Scripts/Localisation/TextLocaliserUI.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Assets/Scripts/Localisation/TextLocaliserUI.cs (limited to 'Assets/Scripts/Localisation/TextLocaliserUI.cs') diff --git a/Assets/Scripts/Localisation/TextLocaliserUI.cs b/Assets/Scripts/Localisation/TextLocaliserUI.cs new file mode 100644 index 0000000..a56afb0 --- /dev/null +++ b/Assets/Scripts/Localisation/TextLocaliserUI.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using UnityEngine; + +[RequireComponent(typeof(TextMeshProUGUI))] +public class TextLocaliserUI : MonoBehaviour +{ + TextMeshProUGUI textField; + + public string key; + + // Start is called before the first frame update + void Start() + { + textField = GetComponent(); + string value = LocalisationSystem.GetLocalisedValue(key); + textField.text = value; + } + +} -- cgit v1.2.3