using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; /* 本段代码控制登录页面语言设置 */ public class LoginLangController : MonoBehaviour { // Start is called before the first frame update void Start() { //login 场景canvas语言配置 LoginCanvasLangSetting(); } // Update is called once per frame //void Update() //{ //} void LoginCanvasLangSetting() { //读取Login Canvas语言设定 string textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "canvas", "login", "button", "login", EnviromentSetting.languageCode }); GameObject.Find("Login Button").GetComponentInChildren().text = textValue; textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "canvas", "login", "button", "forget_password", EnviromentSetting.languageCode }); GameObject.Find("Forget Password Button").GetComponentInChildren().text = textValue; textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "canvas", "login", "button", "quick_start", EnviromentSetting.languageCode }); GameObject.Find("Quick Start Button").GetComponentInChildren().text = textValue; textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "canvas", "login", "label", "user_name", EnviromentSetting.languageCode }); GameObject.Find("User Name").GetComponentInChildren().text = textValue; textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "canvas", "login", "label", "password", EnviromentSetting.languageCode }); GameObject.Find("Password").GetComponentInChildren().text = textValue; textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "canvas", "login", "place_holder", "user_name", EnviromentSetting.languageCode }); GameObject.Find("UserName Placeholder").GetComponentInChildren().text = textValue; textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "canvas", "login", "place_holder", "password", EnviromentSetting.languageCode }); GameObject.Find("Password Placeholder").GetComponentInChildren().text = textValue; } }