Search Unity

Change button text after clinking it on Unity

Discussion in 'Immediate Mode GUI (IMGUI)' started by Eviux, Oct 16, 2019.

  1. Eviux

    Eviux

    Joined:
    Oct 15, 2019
    Posts:
    1
    I have a button name GameMode and the text inside this button is "Game Mode : Casual".
    How can i change the button text after clinking the button ?
    Example : "Game mode : Casual" ---> "Game mode : Ranked" After clicking the button, and if I click the button again it change back to "Game mode : Casual".
     
  2. spilat12

    spilat12

    Joined:
    Feb 10, 2015
    Posts:
    38
    Let us see the code, then we might help.