# Creating Plugin Project

{% hint style="info" %}
All examples created in Visual Studio 2022
{% endhint %}

### Libraries

Creating Plugin require Unity Engine libraries and main game library. You can download libraries archive here:\
[Link to archive](https://drive.google.com/file/d/1vl0kGWW_CETIImqN_4F5IYTrLdzrAB_6/view?usp=sharing)

### Creating Solution

We recommend to use .NET Framework 4.7.2(because only this version tested).

1. Create C# .NET Framework Library.
2. Connect downloaded libraries to your project.
3. Create Plugin Information class.
4. You are ready to go!

### Plugin Information Class

Each plugin must contain plugin information, otherwise it will not be loaded.\
There no rules of naming this class.\
Here is example of plugin information class(we named it "Info").

```csharp
public class Info : Akequ.Plugins.PluginInfo
{
    public override string Name => "Test Plugin";

    public override string Id => "com.akequ.test";

    public override string Version => "0.0.1";

    public override ushort BundleVersion => 1;

    public Info() { }
}
```

We will not Name, Id, Version, BundleVersion. We will not consider filling out these fields, since it should be clear to everyone why they are needed.\
We will only check "MustSpawnClasses", this property contain class names, that must spawn after successfull map generation and will also be spawned on clients, to send messages between server/client.\
\
Example Solution can be downloaded here:\
[Link to archive](https://drive.google.com/file/d/1xD7ZDgLo3AuOLGqXF9rD0YS-7FJ4OjM3/view?usp=sharing)

### Testing

Now we can compile this plugin and move library to server plugins folder according to [Folder Structure](/scp-classified-site-plugin-api/docs/folder-structure.md)\
\
After starting server we must see this message:<br>

<figure><img src="/files/2AvoP1HvklX6jjP99sNg" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://akequ.gitbook.io/scp-classified-site-plugin-api/docs/creating-plugin-project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
