public void CreateCharacters() { int Counter; int FullWindow; int CurrentLine; int CurrentIndex; Counter = 0; FullWindow = 0; CurrentLine = 0; CurrentIndex = 0; for (int i = 0; i < Message.Length; i++) { if (Counter == MaxCharacterPerLine) { CurrentLine++; Counter = 0; } if (FullWindow <= (MaxCharacterPerLine * 3) - 1) { GameObject Character; Character = WindowManager.Letter(Message[i]); Character.transform.position = ThisWindow.WindowContainer.transform.position; Character.transform.position += new Vector3((ThisWindow.WindowSize.x * -1) + Counter * 0.40f, ThisWindow.WindowSize.y - CurrentLine); Character.transform.parent = Content.transform; MessageString.Add(Character); RemainingCharactersCount--; CurrentIndex++; FullWindow++; Counter++; } } if (RemainingCharactersCount != 0) { string NextMessage; NextMessage = string.Empty; for (int i = CurrentIndex; i < Message.Length; i++) { NextMessage += Message[i]; } Message = NextMessage; } }