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
5
Question by Magnus Wolffelt · Jul 27, 2010 at 11:59 AM · dllpluginsmonoopencvemgucv

Mono and missing types using external library

Hi,

we're trying to make use of EmguCV, which is a pure .Net library that interfaces to the native library OpenCV. We're using Unity 3.0 beta 4 for the modern Mono version.

However, when trying to create cameras for capture, we run into some missing type problems:

Unhandled Exception: System.TypeLoadException: Could not load type 
  'System.ServiceModel.ServiceBehaviorAttribute' from assembly 'Emgu.CV'.

So I locate this type in the Mono System.ServiceModel.dll, and paste the dll into our plugins directory. Then I get this:

Unhandled Exception: System.MissingMethodException: Method not found:
  'System.Security.SecurityCriticalAttribute..ctor'.

And I find this type inside mscorlib.dll, which is also in Mono. I paste this library into the Plugins directory aswell. This causes the Unity compiler to hang for a LOOOONG time, and in the end it doesn't seem to find the type anyway - still the same error message.

Any pointers and tips on how to make this work? Is it at all possible? Any idea why SecurityCriticalAttribute is missing from Unity's Mono version?

Is there a better way to resolve these issues than just pasting various DLLs into your Plugins dir to see if it works?

Comment
Add comment · Show 1
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 DaveA · Oct 21, 2011 at 10:58 PM 0
Share

Will you be publishing your code (open source licence) or did you go with the commercial license?

2 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by Magnus Wolffelt · Jul 28, 2010 at 05:35 PM

First of all, kudos to Jens for solving this!

The problem lies in API compatibility in Player settings in the editor. It was set to .NET 2.0 reduced, instead of just .NET 2.0.

So, if you have big/complex .NET libraries that cause problems, check API compatibility settings.

Happy coding!

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 volk · Aug 11, 2010 at 09:02 AM 0
Share

Thanks, worked like a charm.

avatar image andresp · Apr 12, 2012 at 03:27 PM 0
Share

isn't Emgu CV only for .NET 3.5+? how did you get this to work with Unity?

avatar image
0

Answer by goorioles747 · Nov 01, 2011 at 07:23 AM

Sorry to bump an old thread, but I am getting the first problem you had. When I try to make a Capture object in MonoDevelop, it gives me

 Unhandled Exception: System.TypeLoadException: Could not load type 

'System.ServiceModel.ServiceBehaviorAttribute' from assembly 'Emgu.CV'.

I have trued putting emgu.cv.dll, emgu.cv.ui.dll, and emgu.util in the assets/plugins folder and added them as a reference to the monodevleop project.

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 syclamoth · Nov 01, 2011 at 07:24 AM 2
Share

Ins$$anonymous$$d of bumping an old question, why don't you make a new one, and delete this?

avatar image goorioles747 · Nov 01, 2011 at 06:35 PM 0
Share

Because $$anonymous$$agnus Wolffelt had the same exact problem as me, and solved it...

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

Plugins on OSX (OpenCV and EmguCV) 2 Answers

How to make Unity find .dylib files? 5 Answers

opencv split method crashed in unity ,OpenCV split (frame,vector) method crashed in Unity 0 Answers

How to link to scripts in the Package Manager when building a dll. 0 Answers

Unity XR plugin manager Tries to load oculus dll on windows even if its disabled. 0 Answers


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