- Home /
WebPlayer UnityObject2.getUnity().SendMessage() method is missed in IE 11
Dom element OBJECT returned by getUnity() not contains SendMessage. How i can use SendMessage in IE?
Hard to know how to help. If your script code is working on Firefox, IE10, but not IE11, then yes, this must be some IE11 issue. I've not heard of people complaining that Unity web player isn't working on IE11. I'll take a quick look.
Thanks for the answer.
In Firefox and Opera all works fine. They Unity webplayer object has method Send$$anonymous$$essage.
Webplayer works in IE but I need some comunication with javascript websocket. And I cant find way to do it without Send$$anonymous$$essage.
I has same case in IE11 and in emulated IE10 mode. I don't yet checked in native IE10.
There is IE console out log (unityInstanse is UnityObject2 instance):
Answer by Schubkraft · Nov 05, 2015 at 02:38 PM
Can you please file a bug report with a minimal repro project and ping me the case number here? Thanks.
We're also having this problem. Where can I file a bug report? I'm on the issue tracker page but don't see how to create an issue.
Here's a simple test page showing a $$anonymous$$imal unity scene, the plugin status, player version, and the typeof UnityObject2.getUnity().Send$$anonymous$$essage
http://content.whiteboxlearning.com/unity-sendmessage.html
In Firefox, the value is "function", as expected. In IE, the value is "unknown".
Unfortunately I'm not the Unity programmer - I'm just interacting with the scene using Send$$anonymous$$essage. Does this link suffice for a bug report/test? http://content.whiteboxlearning.com/unity-sendmessage.html
I used a bug report in editor to send example project (similar to in you link). Waiting for a callback letter with issue track id.
Here link to case number 742387 with attached $$anonymous$$imal project https://fogbugz.unity3d.com/default.asp?742387_q75tthssndv4edqi
Reproduced it and passed on to the devs. Thanks for the very nice report!
There's been a month since the issue was open here : https://fogbugz.unity3d.com/default.asp?742387_q75tthssndv4edqi by @evilnya. @Schubkraft, has been there any progress that you know. This is pretty blocking for us to ship our software for now. Thanks for your answer.
Answer by jwmickey · Dec 15, 2015 at 08:56 AM
I found that while you can't check for the existence of SendMessage in IE, you can still call the method. It's unfortunate that you can't test for the method, but this may be a limitation of IE and not a UWP bug.
typeof uo.SendMessage; // -> "unknown"
uo.SendMessage("foo"); // -> "Invalid number of parameters"
At least in the second case we get a message from the plugin which was expecting three parameters, indicating that SendMessage is actually working.
Hope this helps!
Hi @jwmickey, can you provide us with you IE version please ? Also, do you get you uo
object by calling getUnity()
on an UnityObject2
instance ? Thanks for the details !
I tested in IE11. Yes, the uo var is from getUnity() - poorly named in my example, sorry!
var uo = new UnityObject2();' 'uo.initPlugin($("#unity-container")[0], 'my-game.unity3d');' 'var unity = uo.getUnity();' 'unity.Send$$anonymous$$essage("foo");
Ok, no problem thanks.
$$anonymous$$aybe you have an old version of the Unity WebPlayer that works with IE11 ?
Well, since this still doesn't work for me, I found out that I could make IE11 work with WebGL while the WebPlayer is still bugged. This needs some hacks but works pretty good in my case.
Thanks @jwmickey