Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by swastiksoni · Apr 07, 2015 at 01:37 AM · androidwindows.netopencvemgucv

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,

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DoTA_KAMIKADzE · Apr 08, 2015 at 05:24 PM

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.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image swastiksoni · Apr 08, 2015 at 07:03 PM 0
Share

Hi there, I have tried it but I am still getting the same warning message. I have not used windows form anywhere in my code. It gives me this warning "System.Windows.Forms.dll assembly is referenced by user code, but is not supported on StandaloneWindows platform. Various failures might follow. UnityEditor.HostView:OnGUI()" when I build for windows standalone also.

I might not doing the the platform dependent compilation for namespace using correctly. can u please give me an example of that.

avatar image DoTA_KAMIKADzE · Apr 08, 2015 at 07:46 PM 1
Share

And you don't need to - some functions/dlls of E$$anonymous$$GUCV do.

You should download E$$anonymous$$GUCV source code and either compile features you need for Windows and then for Android or you could just add E$$anonymous$$GUCV c# codes in Unity's assets folder if the license allows you to do so and replace .net preprocessor statements (#if...) with the ones I have shown you in the answer.

In any case not a single person over here will help you with this because it's a ton of work, so if you don't understand how to do one of the above^ your best bet would be to contact someone from E$$anonymous$$GUCV crew and ask them to compile it for you for both Windows and Android build without "Winform and WPF"-specific features and for .net2.

P.S. You can also just omit dlls that use Winform and WPF features if they throw that in a separate dlls.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

OpenCV and Android with Unity3D 1 Answer

EmguCV CalibrateCamera - EntryPointNotFoundException 1 Answer

Unity analytics not working for android or windows builds 0 Answers

my andriod is not connecting to the unity editor 0 Answers

unity is not creating build on .NET 2.0 SUBNET and getting ArgumentException. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges