So I’ve got a WebGL game that I’m trying to get running on facebook.
I’ve got everything to work fine as a vanilla WebGL game running from my own server, but as soon as I try the same in a Facebook iframe parameter passing between Unity (Applicaiton.ExternalCall) fails.
For example, my game will call: Application.ExternalCall(“doExternalEvent”, 1, 2, 3)
The external call works perfectly well on vanilla WebGL, but when built for facebook and displayed in their iframe, all parameters (1,2,3) are always 0 (or perhaps not set so are showing as 0 - I’m no expert with JS).
I’m also finding that when the external event finishes I call back to Unity from HTML/JS using gameInstance.SendMessage(“myObject”, “myMethod”, “myParam”);
But this send message call never get through on the Facebook iframe instance, but again works perfect with vanilla WebGL on my own server…
I assume this is some kind of Facebook iframe sandboxing/crippling/etc - but others have got this to work, so it must be doable some how.
What am I missing?