EMGUCV with Unity : System.Windows.Forms.dll assembly is referenced by user code, but is not supported on Android platform.

Hi guys,

I have integrated emgucv with unity to make some body detection app. My program is working fine in editor but I am not able to build standalone or android application properly. I am getting this warning “System.Windows.Forms.dll assembly is referenced by user code, but is not supported on Android platform. Various failures might follow. UnityEditor.HostView:OnGUI()” whenever I am trying to build android or standalone app.

Any suggestion is greatly appreciated.
thanks,

You should use Platform Dependent Compilation in your coding when you use platform dependent libraries (Android can’t use Windows Forms), do it like this:

#if UNITY_ANDROID
//your android version of some code
#elif UNITY_STANDALONE_WIN
//your windows version of some code
#endif

Same goes for namespace using.