Я пытался сделать, но безуспешно. Всегда один и тот же язык, не хочет меняться. Помогите, пожалуйста.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Translate : MonoBehaviour {
public Text Text;
public string ENG_Version;
public string BEL_Version;
bool eng;
bool bel;
void OnMouseUpAsButton () {
GameObject.Find ("Click Audio").GetComponent <AudioSource> ().Play ();
switch (gameObject.name) {
case "ENG":
eng = true;
bel = false;
break;
case "BEL":
eng = false;
bel = true;
break;
}
}
void Update () {
LocalThisText();
}
void LocalThisText () {
if (bel == true && eng == false) {
Text.text = BEL_Version;
} else if (eng == true && bel == false) {
Text.text = ENG_Version;
}
}
}