- Home /
Unity communication to JavaScript in browser with return
Is it possible to call a JavaScript Function from UNITY and have that webpage JavaScript return a variable ?
something like.. UNITY (pseudo code)
response1 = Application.ExternalCall( "Passback", "Hello");
Where in the HTML page that launched Unity, the function Passback, will do a call up the chain to an API that will then return a value ?
I have see the example of a call to a function that then uses a call to communicate back to unity, is that the only way?
Answer by Graham-Dunnett · Oct 27, 2011 at 10:00 PM
Yes, that is the only way, since the ExternalCall() is non-blocking.
Answer by Heffiros · Jul 29, 2016 at 01:10 PM
Hello
I try this but for me Application.ExternalCall have a void type return so i can't stock this one in a variable
Did you have an idea ?
Thx
Your answer

Follow this Question
Related Questions
Scripting error! 1 Answer
Setting Scroll View Width GUILayout 1 Answer
Display variables in GUIText? 1 Answer
Static var wont work 2 Answers
Where is the missing semicolon? 1 Answer