Hello,
This is my first post on the NGUI forum. I'm doing some in-game instructions and I have them working with Localization. I am also resizing the text bkgd to fit the text. I used the code example from UITooltip for the resizing and it works great.
Here's the problem I'm having: I added in a couple of forced line breaks, so that the text is shifted upward to allow for a "Tap to Continue" text on the bottom.
This works well EXCEPT for the first time. When the function is called, it activates the UIlabel's parent, properly fills the UILabel's text field from the Localization text file, and resizes the bkgd, but the extra text isn't being added. I tried to prefill the Label's text in the Inspector, but that didn't work either.
Here's an abridged code snippet:
public void Instruct(string currentInstruction)
{
instructionParent.SetActive(true);
instructionLocalize.key = currentInstruction;
instructionLocalize.Localize();
//add in forced line breaks to leave room for the "Tap to continue" text
instructionLabel.text += "\n\n";
//resizing code happens here and works well
}
If anyone has any advice or experience with this, it would be much appreciated.
thanks!