How is your library setup? Have you tried calling these functions from a script inside your project?
I’m surprised you didn’t have issued building a library, every-time I have built a dll for Unity it has had to exclude anything Unity related and just work of the .Net framework.
I’m referencing both UnityEngine.dll from /Applications/Unity/Hub/Editor/2020.1.0f1
And UnityEngine.UI from my unity app which is /path/to/app/Library/ScriptAssemblies/UnityEngine.UI.dll
I have actually have 2 libraries, one that I build and move the library directly to the Assets folder and one that I load after runtime using Assembly.LoadFrom(“path/to/dll”);
I always had issues trying to build a library reliant on Unity. These days if its a library I am building, I will keep it to just dot net framework.
Sorry, that’s not an answer to your problem. But tbh, your better of just creating scripts.
Is its because your trying to make an asset for the unity store? If that’s the case, its another reason to not build with unity DLLs. Someone who purchases your asset would not be able to make any version change fixes.
@Gorjeck I’ve ran into the exact same issue with Unity 2020.3.7f1. I’m including the UnityEngine.dll from Hub/Unity into my csproj dependency list but for some reason UnityEvent is not being found inside UnityEngine.dll even though it should be in the UnityEngine.CoreModule…