1 Visual Studio Software opens after you create a project
2 and select the class library type
3 Write a simple code to see the effect (the discovery will be error), mainly do not add class library, and using Unityengine; reference space
4 adding class libraries, referencing spaces
The discovery will still error, this needs to add the application library Unityengine.dll, the method is as follows
Find the UnityEngine.dll installed in the Unity directory, and you'll find that the red place disappears when you add it.
5 Right-click Solution, Build Solution
Prior to this you need to select the running. Framwork version, which needs to be consistent with unity's usage version, Mine is under. framwork3.5
6. At this point you can find the DLL file in the project and join the Unity
Calling a DLL in code requires a using-namespace
Caveats: Methods in C # functions encapsulated as DLLs must use static public methods
This is what I do. Link: https://pan.baidu.com/s/1i3LBHrkQOg7eCh9Sf-EQVw Password: AQVP
What's the good way, great God, a lot of messages
Unity Code C # encapsulated as DLL