Hi, I have a problem regarding guitexts. I have 2 Guitexts on the scene. The scene is 2D and is supposed to be like an open book. So 1 guitext displays text on the left side of the book, the other one on the right side. My problem is that i have a button that is supposed to allow the user to flip the page, so the contents of the 2 guitexts need to be updated. As of now, I place the setting of texts onto the guitexts in Start. I used for loops since I try to text wrap them and the source of the texts are from an array of strings. I have thought of moving the setting of texts into Update but I dont know how to inform Unity to stop at that point of the loop and wait til the next page button is clicked.
You might be able to get the effect you want by starting a coroutine when the next page button is clicked. Or, you could do something like this in the Update function:-
var turningPage: boolean;
function Update() {
if (turningPage) {
// for loop
turningPage = false;
}
}
You would set the value of turningPage to true when the button is clicked to activate the turning of the page.