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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

WebGL jslib and jquery promises

Discussion in 'WebGL' started by TRsiew, Jul 30, 2015.

  1. TRsiew

    TRsiew

    Joined:
    Jul 5, 2013
    Posts:
    13
    my quest is wanna ask can i use jquery promises function ? how to implement it in WebGL ?
     
  2. mnml_

    mnml_

    Joined:
    Jun 17, 2015
    Posts:
    44
    what exactly do you want to archieve? you can always have a
    'normal' handler in your .js(lib) and call (c#)-script-code from there.

    there're ways to hand over callbacks from (c#)script to .js(lib),
    but the calling syntax is a bit more complex, so you can't
    put them directly into the various promise-callbacks.

    you can also take a look here and see how i'm calling back
    to the script after the filereader class did it's job.