Building DLL for Unity with Mono


I have a ClassLibrary project I am using to create a DLL for use in a Unity project. Some of the classes inherit from Monobehaviour and I can't seem to find or link the Mono assembly properly in the references.

When I build the project I get this error :

TestScript.cs(8, 31): [CS0246] The type or namespace name 'Monobehaviour' could not be found (are you missing a using directive or an assembly reference?)

Can anyone help me out? Thanks.


1 comment
Comment actions Permalink

Hello Josh,
Is the project recognized as Unity Project? Do you see options like Attach to Unity Editor? How exactly the project was created: like general Class Library, in Unity, or using template .NET Unity Class Library? Would it be possible to provide me with a screenshot where I can see references list? Thank you in advance!


Please sign in to leave a comment.