Code-generated ui text disappear when installed on android device
Using Unity 5.0.0p2 x64
I have some UI text boxes containing some text from a XML file, The problem is that only when Iam running the APK on my android phone, suddenly the text is gone. I can see it when Iam on play mode and even when Iam emulating the project with Unity Remote, also when I build the project to Windows everything is fine, but when Iam runing it on my phone it doesnt work!!
here's my code for reading the XML files :
public string ReadXmlFile (string fileName, string data)
{
string path = Application.dataPath + @"\XML\";
if (File.Exists (path + fileName + "Data.xml")) {
XmlTextReader xmlReader = new XmlTextReader (path + fileName + "Data.xml");
if (data == "Target") {
while (xmlReader.Read ()) {
if (xmlReader.Name == "Target")
return " " + xmlReader.ReadString ();
}
}
if (data == "Data") {
while (xmlReader.Read ()) {
if (xmlReader.Name == "Data")
return " " + xmlReader.ReadString ();
}
}
}
return data;
}
Cant find any solution on google.. I HAVE TO WORK IT OUT SOMEHOW PLEASE HELP!!!
Your answer
Follow this Question
Related Questions
Accessibility Content labeling on android (have a label readable by screen readers) 1 Answer
Weird glitch in TMPro text on android builds 0 Answers
How To Load TTF Font From External File 0 Answers
How to make Textmesh Pro effects on only one text object? 1 Answer
Unity 5.3 Android UI Glitch 12 Answers