Question

According to docs, we can make a call to JS function inside a page, that host a unity game:

Application.ExternalCall( "SayHello", "The game says hello!" );

Where 'SayHello' is the function name in JS. But if i want to make a call to function that a method of some JS object?

Will it work?

Application.ExternalCall( "JsObject.SayHello", "The game says hello!" );

Thanks!

Was it helpful?

Solution

Maybe something like this

var f = function(){ JsObject.SayHello(); };
Application.ExternalCall( "f", "The game says hello!" );
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top