Search Unity

Wait to run code until confirmed with button click?

Discussion in 'Scripting' started by jcfrizz, May 3, 2018.

  1. jcfrizz

    jcfrizz

    Joined:
    Jul 22, 2017
    Posts:
    11
    I basically have a function that I need to run, but I don't want this function to actually run until the user clicks a UI button on the screen that says "Ok", to confirm that the user is ok with going through with the action. How would I do this?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
  3. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278