1
NGUI 3 Support / UI Text List cuts off text when loading from text resource.
« on: March 28, 2015, 09:42:22 PM »
I have an issue with Chat Area (UITextList). I have predefined text resources which are loaded based on which game object (GO) the user taps on. These are paragraphs usually 10-20 lines of text. It loads properly in my production version (released in April 2014, not sure which NGUI version).
Now with NGUI 3.8.0 only the text which can be shown on the screen (without moving the scrollbar) is loaded. It looks like the script cuts off the rest and when you scroll down it is empty. You can see in the screenshot how the paragraph is cut off at: "the pressure is still the". There is more text after that which is not loaded.
Here is my code:
TextAsset txt = (TextAsset)Resources.Load("TextAssets/Centers/" + GO.name.ToString(), typeof(TextAsset));
string content = txt.text;
TextList.Clear();
TextList.Add(content);
//I also tried this as a public member: TextList.Rebuild();, no success
What am I missing
Thanks,
Petar
Now with NGUI 3.8.0 only the text which can be shown on the screen (without moving the scrollbar) is loaded. It looks like the script cuts off the rest and when you scroll down it is empty. You can see in the screenshot how the paragraph is cut off at: "the pressure is still the". There is more text after that which is not loaded.
Here is my code:
TextAsset txt = (TextAsset)Resources.Load("TextAssets/Centers/" + GO.name.ToString(), typeof(TextAsset));
string content = txt.text;
TextList.Clear();
TextList.Add(content);
//I also tried this as a public member: TextList.Rebuild();, no success
What am I missing
Thanks,
Petar