IPlugin interface
public interface IPlugin The entry point of a Plugin’s C# half: the one public class in its code DLL that the engine creates and hands a PluginContext.
The host has a loader for it. It opens the DLL named by code in plugin.toml in its own collectible load context, looks for exactly one public, non-abstract type that implements IPlugin, and creates it with its parameterless constructor. Zero or two such types is an error naming them. The boot reads each Plugin’s manifest and resolves the load order, and each session’s server realm loads the code of every resolved Plugin whose side is both or server as it starts, in that order, and unloads it as it ends. A Plugin whose code doesn’t load, or whose Load throws, is left out of that session with a note naming it, and what it registered goes with it.
public sealed class Fungus : IPlugin
{
public void Load(PluginContext context)
{
}
public void Unload()
{
}
}
- Assembly
- EvilEngine.Api
- Commit
- 4ff877b1