Generate Dll For Unity In Mono

1 . Create an empty C# class library

Generate Dll For Unity In Mono_第1张图片


Generate Dll For Unity In Mono_第2张图片

2. Compile you class


Generate Dll For Unity In Mono_第3张图片

Change you target .Net Framework (int unity 5.5.1, it need to be .NET3.5 or lower

Generate Dll For Unity In Mono_第4张图片


Generate Dll For Unity In Mono_第5张图片

then build your project


get back to you project in files, you will get you own dll under path bin/Debug


Generate Dll For Unity In Mono_第6张图片


drop to you unity project


Generate Dll For Unity In Mono_第7张图片


Generate Dll For Unity In Mono_第8张图片


Use dll in unity


Generate Dll For Unity In Mono_第9张图片


Add references of UnityEngine.dlland/orUnityEditor.dllto the project, you can do so by browsing into the folder (typically, depending on your specific Unity3D installation directory):

Mac:              /Applications/Unity/Unity.app/Contents/Frameworks/Managed/

Windows:      C:\Program Files\Unity\Editor\Data\Managed


Generate Dll For Unity In Mono_第10张图片
Generate Dll For Unity In Mono_第11张图片

你可能感兴趣的:(Generate Dll For Unity In Mono)