Unity in a WindowsFormsApplication

hello,

i would like to insert the unity webplayer inside a .net C# project with Visual Studio exactly like Zumwalt did here : http://forum.unity3d.com/threads/10855-Unity-in-a-Window or http://forum.unity3d.com/threads/82071-Webplayer-Deployment-in-Visual-Studio?highlight=disableContextMenu

i’ve managed to insert the ActiveX Unity Web player inside a usercontrol without any problem . I use the Dll (AxInterop.UnityWebPlayerAXLib.dll,Interop.UnityWebPlayerAXLib.dll)

I also manage to use the OnExternalCall and SendMessage functions to interact between Unity and a C# project.

However i can’t find the way to send the parameter “disableContextMenu” to my ActiveX and this is my only problem

has anybody have any idea about it ?

thank you

Can you post your VS solution?

yes

781767–28564–$UnityActiveX.zip (168 KB)

thank you

Nobody has an idea?

If you want to set a parameter into disableContextMenu property in ActiveX Unity Web player, you need to prepare IPropertyBag.Read Method in your program (IPropertyBag.Read(String, Object, IErrorLog, UInt32, Object) Method (Microsoft.VisualStudio.OLE.Interop) | Microsoft Learn).

I made a sample C++ program (Visual Studio 2010) which set “true” parameter into disableContextMenu property. See http://www.nibiirosoft.com/download/UnityActiveXSample.zip

And using that codes, I made a player for .unity3d files (http://www.nibiirosoft.com/Product/UniPlayer_en.html).

I hope it will be helpful to you.