I like to control the question and answers by one script. What is the command to change the buttons text in javascript?
Button1.GetComponentInChildren(UI.Text).text = “Hello”;
Its very simple, Im sure you have your question array set up, so when one of these questions is set up in use, it will access an array of 4 answers, this array being comprised of strings. And i nthe button, where you wold put “answer” Put the array name and the index numer
QUESTION 1 "WHATS A LOL"
answer 1
(buttonstuff, Answers1[0]);
answer 2
(buttonstuff, Answers1[1]);
answer 3
(buttonstuff, Answers1[2]);
answer 4
(buttonstuff, Answers1[3]);
Remember though, arrays start at 0, not one.
Thank you, this was very helpful. Finally figured out I needed to include the new UnityEngine.UI at the top to access button text. Not sure why Monodevelop wouldn’t include that for me! What a godsend, now I can go watch movies with the kids!