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
1
Question by Clavus · Jun 06, 2014 at 10:52 AM · plugin.net

Can't get this .NET DLL working in Unity. Why not?

Here's a download: https://dl.dropboxusercontent.com/u/11217331/VSDK.zip

The .NET dll of this SDK is a wrapper for the unmanaged code in the CPP dll. For some reason, Unity doesn't import the .NET dll whatever I try.

I tried making a Mono DLL of my own that imports the SDK .NET dll, in an effort to forward the functionality, but I just get a TypeLoadException in the class where the SDK is referenced (since, I guess, the SDK dll still has to be loaded by Unity).

I don't know what's causing this. The SDK .NET dll is build with .NET 2.0, and doesn't seem to have any incompatibilities with Unity's version of Mono. I'd love to hear why it's not working.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by TristanChambers · Aug 04, 2016 at 05:05 AM

Is it possible you just need to run unity or the build as an administrator? I have an issue right now where a dll does not load unless I right click then "Run as Administrator". Even though the user is obviously an administrator.

Unity loads this dll fine on all of my other computers except my windows 8 computer. Perhaps there is something special with windows 8?

P.S. I realize this is an old question, but this showed up in google when I was searching for a solution to my problem and it appears some people are still having this issue.

Comment
Add comment · 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
2

Answer by Bilelmnasser · Jun 06, 2014 at 11:00 PM

i downloaded your Dll and your Plugin Work Fine, and your unity too, make sure you put your DLL under The Folder Plugins under the Main Assets Folder (create a new folder if there is none and put all DLL there that unity can access them):) and see this tutorial DLL c/c++ Tutorial plugin in unity (free/pro/any license)

Comment
Add comment · Show 8 · 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 Clavus · Jun 07, 2014 at 01:12 PM 0
Share

Is it possible you can give me your entire Unity test project in which you got this dll to load? I've tried what you said many times before, but it doesn't load the SD$$anonymous$$ dll, or it displays errors when loading my own $$anonymous$$ono dll that imports the SD$$anonymous$$ dll.

avatar image Bilelmnasser · Jun 07, 2014 at 05:11 PM 0
Share

http://goo.gl/v2k$$anonymous$$eO the test scene is just printing a dll member , i don't really know how to use your dll and what for it's just test of using your dll and accessing it :)

avatar image Bilelmnasser · Jun 07, 2014 at 05:12 PM 0
Share

and it's a package, create a new project and import the package i uploaded good luck :)

avatar image Clavus · Jun 07, 2014 at 05:28 PM 0
Share

So that works for you? I've tried this approach a lot. I get "Assets/Scripts/test.cs(3,7): error CS0246: The type or namespace name `ViconDataStreamSD$$anonymous$$' could not be found. Are you missing a using directive or an assembly reference?". $$anonymous$$eaning it still doesn't load for me. But at least SO$$anonymous$$EONE got it working! Can I ask you what OS and Unity version you're using? Anything special in how you set Unity up (compiler changes 'n stuff)?

avatar image Bilelmnasser · Jun 07, 2014 at 05:45 PM 0
Share

yeah i see your problem now, here is a tutorial how to fix unmanaged code in the CPP dll into unity (pro /non pro/free license /any unity )

$$anonymous$$y Tutorial Link about c++ Dll import into any licensed unity (free/pro/non pro)

the technic is simple, create a C# Dll that allow you to use c++ Dll and that's it as simple as that :)

Show more comments

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

25 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I use .NET 4.5 managed DLL called by a native DLL (Not easy, I swear I read doc) 0 Answers

Can I use .NET 4.5 assembly as external library? 1 Answer

Trying to use SDK as plugin that compiled with .NET Framework 4.0 in Unity 1 Answer

Getting SSH.NET to work in Unity 1 Answer

Scripting Generic stat modifiers. 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