Question by
Benjim-Maccabomb · May 02, 2016 at 10:33 AM ·
javascriptuirandommenu4.6
Tips and Tricks Menu Help
i am new to coding but how would i make a tips and tricks menu whenever a scene is played, using UI text. the text would also be randomly chosen from a small list of hints, please help. i use Unity 4.6.
Comment
Answer by Jessespike · May 02, 2016 at 08:39 PM
Make an array of strings and randomly assign one to a UI.Text component.
string[] tips = new string[] {
"Tip 1",
"Tip 2",
"Tip 3"};
GetComponent<UnityEngine.UI.Text>().text = tips[Random.Range(0,tips.Length)];
Your answer
Follow this Question
Related Questions
How to make folding menu? 0 Answers
Unable to assign value to Text 0 Answers
I want to add a sticky element to my sliding menu 0 Answers
Move camera between canvases in UI menu 0 Answers
Pause menu not called when ESC pressed 2 Answers