I am using Unity WebGL for my project and want to communicate from browser JavaScript to C#. One way is to call C# function from JavaScript using SendMessage. I am easily making call using this code snippet in javascript:
gameInstance.SendMessage("MyObjectName","MyFunctionName",myParameter);
But there is a problem it is not returning any value. For getting a value I have to implement a separate function that run another function. Can I return value directly? Send Message docs clearly stating it don’ t return any value, so other than sendMessage is there any way available to get return value from directly function calling?