How to retrieve data from WebGL Instance
Using Unity 2019.2.15f1
I am creating a project, which has the generated WebGL player embedded into AngularJS view. I have managed to set up everything so that I am able to send data to the game using instance.SendMessage()
function from Js.
I have implemented the jslib file successfuly, and it is able to print data from the game into the console. My question is, how to access the function within the generated script (the one with a random alphanumerical name) so that I can access the data and fetch it to AngularJS' controller for processing
My jslib plugin:
mergeInto(LibraryManager.library, {
receiveText: function(text) {
console.log(Pointer_stringify(text));
return Pointer_stringify(text);
}
});
The problem is that I do not know how to catch the value that is being returned by this function, how/from where can I call it to get the data I need?
Your answer
Follow this Question
Related Questions
How to integrate Unity WebGL with Angular 5? 1 Answer
WebRTC in Unity using FrozenMountain 4 Answers
Was Unity's WebGL loading changed in 5.4? 1 Answer
Rotating object with mouse movement. 0 Answers
I cant build WebGL 3 Answers