I'm having a problem when I try to send the data from my unity code to the javascript code in my page, I need to get a list of strings but it returns undefined.
Code in unity script:
var activeFacility : Facility;
...
function getSpacesNames(){
return activeFacility.getSpacesNames();
}
Javascript code in the html page:
function getList() {
var list = u.getUnity().SendMessage("ObjectManager", "getSpacesNames", null);
console.log(list);
}
How can I get this data from Unity to the javascript code in the page?