- Install dotnet 5.0.408
- You need to have the server built (see Build Instructions for instructions, or just download the raw build)
- In a folder, run
dotnet new classlib -n PluginName
(change PluginName to your plugins name)
- Open the csproj in Visual Studio 2019
- Right click on Dependencies and click Add Project Reference, then at the bottom right click browse, then select ServerShared.dll from the build from step 2*
- Code your plugin (look at the sources of other plugins for reference)
- Click Build at the top and click Build Solution
- Simply add your plugin's .dll file from your plugin's bin/Debug/net5.0/ into the servers plugins/ folder!
*While developing some plugins, you may need to add more dependencies. For the Broadcast plugin, I had to add Lidgren.Network.dll and UnityEngine.CoreModule.dll along with ServerShared.dll
*While developing some plugins, you may need NuGet packages. I believe you can make the users install the extra dlls along with the plugin, or you can use Fody and Costura.Fudy to make all your dependencies go into one plugin dll