Quantcast
Channel: Questions in topic: "dllimport"
Viewing all articles
Browse latest Browse all 160

Using a DLL in a unity project

$
0
0
Hi, I'm trying to compile a DLL and then import it in my Unity project. I followed the steps mentioned there but it doesn't work: http://docs.unity3d.com/Documentation/Manual/UsingDLL.html In visual Studio 2010, I created a new solution with a Class Library project. I created a simple class with a public method that returns a string. I changed the project framework to be 3.5 and the target platform to be x86 (without that I had an error) and then compiled the DLL in release and debug mode. (Tried both) I dragged the newly compiled DLL in the project view in unity beside another C# script. When I open that script in Visual Studio, I see in the project references(Assembly-CSharp-vs) that the DLL is references, but I can't access any namespace nor class in it. Back in the unity editor, when I click on the DLL, I can't expand it and when I click the "open" button in the inspector, I get a warning saying "Unable to open Assets/TestAPI.dll: Check external application preferences" What should I do to make it work? By the way, I have Unity v4.2 Thank you for your help.

Viewing all articles
Browse latest Browse all 160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>