Setting up environment
Unturned Plugin Development #1
MCrow • 7 months ago
MCrow • 7 months ago
Setting up your development environment is the first step to creating plugins for Unturned. This guide will help you set up Visual Studio and install project templates for creating plugins.
This blog series assumes you have a basic understanding of C# programming language and experience in hosting Unturned servers. If you are new to C# programming, I recommend you to learn the basics of the language before starting with plugin development. I personally recommend Bob Tabor's C# Fundamentals for Absolute Beginners course on Microsoft Virtual Academy.
Visual Studio is an integrated development environment (IDE) from Microsoft that is used for developing applications in C# and other languages. It is the recommended IDE for developing Unturned plugins.
We have created a custom project template for creating Unturned plugins. This template will help you get started with plugin development quickly and let you more easily create new plugins in the future.
Before you can install the templates, you need to install the .NET SDK. The .NET SDK contains the .NET CLI, which is required to install custom project templates for Visual Studio.
Go to dotnet.microsoft.com and download the latest .NET SDK.
Run the installer and follow the instructions.
Open a terminal or PowerShell window and run dotnet --version
to verify the installation. You should see the version of the SDK you installed.
Now that you have the .NET SDK installed, you can install the Unturned project templates.
Close Visual Studio if it is open.
Open a terminal or PowerShell window and run the following command:
dotnet new -i RestoreMonarchy.UnturnedTemplates
You should see output similar to the following:
Open Visual Studio and click on Create a new project
.
Search for Unturned
. You should see the list of Unturned templates.
You have now set up your development environment for creating Unturned plugins. In the next guide, we will create a new plugin using the Unturned Plugin project template we installed.