Calling COM Object from Standalone unity project/exe


We have build an environment/scene withing unity3d and it works great, however we have a com object on the client installed, which we have to call, how to do ionstantiate this object and call the methods we have within this com object from the Unity3d application

Thanks for any help



Unity automatically imports any managed DLL you put in your Assets folder, and Visual Studio has a tool named TlbImp.exe that takes a COM TLB file and creates a managed DLL file. Using this is your best bet. Unfortunately I have no COM library to try it with (and frankly I always despised COM so I'm unable to make even a simple one) so you'll have to try it yourself.

Keep in mind however - if it works - this imposes a few requirements on your Unity app. First of all it will only work in Windows. MacOS has no COM. It might work in a web player in Windows if the client has your COM library installed, but I wouldn't bet on it with browser sandboxing and what not.