> For the complete documentation index, see [llms.txt](https://dotsnet.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dotsnet.gitbook.io/docs/user-manual/selective-system-authoring.md).

# Selective System Authoring

### Systems with Multiple Implementations

In some cases, we can have an abstract system type with multiple implementations. For example:

* **Transports**: we have one abstract **TransportServer/ClientSystem** class, but can have multiple implementations like **kcp**, and later Websockets/Steam/etc.&#x20;
* **Interest Management**: we have one abstract **InterestManagementSystem**, and an explicit **BruteForceInterestManagementSystem**. We might also have a grid system, room system, etc. later.

By default, ECS always creates all systems in the project.

This is a problem, because even if our project has 3 different interest management implementations, we only ever want to use one of them.

### The Solution

The solution is to **disable** systems by default, and only **enable** them if an authoring component is added to the scene:

1\. Add the **`[DisableAutoCreation]`** attribute to systems with multiple implementations:

```csharp
using DOTSNET;

[ServerWorld]
[DisableAutoCreation]
public class BruteForceInterestManagementSystem : InterestManagementSystem
{
}
```

2\. Create an Authoring component that implements our **`SelectiveSystemAuthoring`** interface:

```csharp
using DOTSNET;

public class BruteForceAuthoring : MonoBehaviour, SelectiveSystemAuthoring
{
    // add system if Authoring is used
    public Type GetSystemType() =>
          typeof(BruteForceInterestManagementSystem);
}
```

So far, the system is still disabled by default.

3\. Add the Authoring component to the NetworkServer/NetworkClient GameObject:

![](https://lh3.googleusercontent.com/OUOzB_1GlgP_YxMD8Osmk6A23nXRIfHoaPLrvHyBoaDh6oWAFrvcqEiUOm1I2tWjynb00gAEOLGBvXnDD-Vp8CsJd1Ircb6wtAOCdE41yNSq1ZXVQ25s7qbJ4dSBNSrauJ3ckt4H)

When DOTSNET starts, it will scan the Hierarchy for all **SelectiveSystemAuthoring** components, and then create the systems specified in **GetSystemType** automatically.
