Using the WebPlayer inside the .Net WebBrowser control

I am experimenting with hosting the WebPlayer inside a WebBrowser control that is sitting on a .Net form.

I installed the Unity editor, built the sample Island Demo project, and then pointed my WebBrowser control at the .html file that was generated.

When I run the application, I get the “unity web player - install now!” image inside the WebBrowser control.

When I open the same .html file in IE8 directly, I get a security warning regarding blocked content and when I allow the content, I see the Island Demo sample running in the WebPlayer on the page.

Is there different script required to get the WebBrowser control to recognize that the WebPlayer is installed?

I am using VS2010 on Windows 7.

Thanks!

The actual script lines that are failing are:

set tControl = CreateObject("UnityWebPlayer.UnityWebPlayer.1")
    if IsObject(tControl) then

IsObject returns false.

I tried turning off the detection code and just assuming that the ActiveX control was installed and registered, but it fails to run inside the WebBrowser control, so I assume it is somehow actually only available in IE8 directly, but not in the WebBrowser control.

Any thoughts?

I posted the same question on the answers site with some more detail:

http://answers.unity3d.com/questions/17162/how-can-you-create-a-unity3d-activex-control-from-within-the-webbrowser-control