Skip to content

Writing Plugins

Jeff Campbell edited this page Jun 19, 2021 · 2 revisions

Overview

With Genesis v2, code generation plugins are written as classes implementing plugin interfaces in .Net Core assemblies. The Genesis.Plugin Nuget packages exists to give easy access to these interfaces and other related types to extend Genesis functionality enable these assemblies to be loaded by the Genesis.CLI application.

For Unity Users

If custom configuration or parameters need be supplied to these plugins from Unity, this can be done by creating a .Net Standard Assembly using the Genesis.Shared Nuget package. This gives access to AbstractConfigurableConfig and IConfigurable. This package/assemembly is .Net Standard 2.0 so that any custom assemblies at that .Net level can reference this and be loadable in Unity. In addition, any .Net Core assemblies such as those containing Genesis Plugins can also reference it. In Unity, these settings can be configured in a GenesisSettings asset and when code generation is executed will be sent to the Genesis.CLI application and will be available for any Genesis Plugins.

Nuget Packages

  • Genesis.Plugin => A .Net Core Assembly that offers access to types for implementing Genesis Plugins
  • Genesis.Shared => A .Net 2.0 Standard Assembly that offers access to configuration types and functionality that can be used in Unity to create custom GenesisSettings configuration.

See this tutorial here for practical instructions on creating custom plugins.

Clone this wiki locally