- Home /
TextAsset Split not Working right?
Hi to everyone, I'm doing a simple dialog box where I show the text of a .txt file, this I'm separating by ";" (text.Split (';')). What happens that everything was working perfect, until I passed new dialogs to paste in the .txt file ... but when I run the game it does not read them ... I repeat, everything worked fine .... so So look everywhere if it could become the format of the text that you copy and paste? paste it directly into the Visual Studio and save the .txt file, which is in the "Resources / dialog" folder.
I put the txt file to a TextAsset and then i use this in the start method:
Filename = the name of the dialog that i want to load
TextComp = Resources.Load(""+Filename) as TextAsset
List<string> ListDialogs = new List<string>();
ListDialogs = TextComp.text.Split(';').ToList();
Now, this was working right but when i modify the dialog.txt pasting the new text, not works....and when i put the old texts, WORKS!... soooo..i m really lost here because the old text is ok, then past new text not works.... :O.... i was thinking that may be could be the text format where i copy the new dialog???? thanks to everyone and sorry for bother if is a simple thing.
Answer by Mania1 · Nov 13, 2018 at 08:16 PM
Well, surprise, i take the txt file and saved in unicode and works, so thing the problem was that the other files where in ANSI. For now is working...
Your answer
![](https://koobas.hobune.stream/wayback/20220612182045im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
[Solved]Android build black screen 0 Answers
ParticleSystem is not emitting particles. 0 Answers
Particle System is not showing in playmode 0 Answers
Mobile game crashing, adb, visual studio, google play not showing anything 1 Answer
Why there is no shadows in the build?,Why no shadow in my FPS Microgame Final Build? 0 Answers