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

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.