Hi there,
I’m working with webplayer and have some communiction between webplayer and embedding website via unit.sendMessage(…). In my tests i found out, that you can call every function, if you just know object’s and function’s name. Is there a way to restrict access to objects/methods (e.g. via whitelist/blacklist, …) ?
Example:
(embedded in Webplayer.html’s javascript ):
…
// get unity object
function GetUnity() {
if (typeof unityObject != “undefined”){
info(“GetUnity: found unity object”);
return unityObject.getObjectById(“unityPlayer”);
}
return null;
}
// call to Object.FunctionName(“Parameter”) in current scene.
var unity = GetUnity();
unity.SendMessage(“Object”, “FunctionName”, “Parameter”);
…
What i want:
Restrict access to one object (to handle and validate calls).
Please don’t come up with “i belive…”, “i think…” answers - this is development and not religion.