Search Unity

How to add a random value to the Button in unity 4.6?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Allahamora, Nov 9, 2014.

?

How to add a random value to the Button in unity 4.6?

Poll closed Nov 16, 2014.
  1. How to add a random value to the Button in unity 4.6?

    100.0%
  2. How to add a random value to the Button in unity 4.6?

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. Allahamora

    Allahamora

    Joined:
    Nov 9, 2014
    Posts:
    2
    Hello,
    I want to add value to my 4 buttons, 3 with random value and 1 with right answer.
    Please help me!
    thnx a lot!
     
  2. rushanedublin

    rushanedublin

    Joined:
    Nov 12, 2014
    Posts:
    2
    Just set the text of the button to a random value at run time in a script.

    Button.text = "" + Random.Range(float , float);
     
  3. Allahamora

    Allahamora

    Joined:
    Nov 9, 2014
    Posts:
    2
    thank you!