- Home /
How do I reference components inside a managed .dll?
Hello!
I have this problem where script files in a .dll don't get recognised.
I am developing my asset for release to the Asset Store. I want the package to contain a .dll source file together with some prefabs. Once I compile all of the scripts into a .dll, I get the resulting structure: I then go ahead and export it as a .unitypackage (except for the scripts folder)
Later, however, when imported into a different project, the prefab loses all of the references to the scripts in the .dll library.
The thing is that if I try to add the components compiled in the .dll, I get the following error:
I can't find a way get around the problem and I don't know what I am missing.
I would appreciate some help. Thank you
Assu$$anonymous$$g you attached images to your question: They're not showing. As for errors, copying the error message should be enough.
Answer by Magius96 · Nov 23, 2016 at 09:21 PM
I don't think you can put scripts into a compiled DLL and attach them to objects. The best you can do is put the functionality in the DLL and call that functionality from a script in your project.
Your answer
Follow this Question
Related Questions
How do I use a C# dll library from a script? 2 Answers
Using 2 DLLs with the same name 2 Answers
PackageCache folder error 2 Answers
How do you integrate the EPPlus library into Unity? 2 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers