Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Async Help please!

Discussion in 'Editor & General Support' started by tclancey, Oct 1, 2020.

  1. tclancey

    tclancey

    Joined:
    May 19, 2017
    Posts:
    143
    Hi there.

    I'm really struggling trying to find a simple Async examples that makes sense and works. I'm finding references to all sorts of things that don't work at all.

    Scenario.
    I have a button on a canvas. I want to click the button (run the function) async becuase it does a lot of things! Why on earth isn't this just easy? In my old VB days I'd kick of a new thread, job done.

    Could some kind soul please post me something simple that a monkey might understand? I'm spending more time killing and restarting Unity than working. And on another note WE NEED A WAY TO KILL THE HOLD ON WINDOW!!!

    Thanks.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,756
    Have you considered coroutines? Doesn't work for all situations but since they run cooperatively, they certainly do fall under the category of "easy" and "predictable" once you get the hang of them.
     
  3. tclancey

    tclancey

    Joined:
    May 19, 2017
    Posts:
    143
    I did and it didn't work, but I might revisit them.