A set of Genesis plugins that I think are useful for a wide variety of projects that use C#, Unity, and Entitas Redux.
These plugins are intended to be used directly by the Genesis code generator. They are not intended to be used as a dependency for your own plugins, nor are they intended for use within the Unity editor.
This section describes the ways in which you can add these plugins to your project.
Install the package games.corundum.codegen.redux
from OpenUPM through the instructions described here.
Settings for this repo's plugins are prefixed with CorundumGames.Codegen.Redux.Plugins
unless otherwise noted.
If you don't need a particular plugin within the provided assembly, simply don't include it in your configuration.
Your next steps then depend on how you manage your project's Genesis configuration.
Each plugin's respective README.md
file lists configuration guidance.
The following sections describe configuration that is common to all included plugins.
If you configure Genesis with .properties
files (similar to Jenny),
you can use these plugins by modifying the following properties.
# Add the name of the assembly somewhere in the comma-separated list (line continuations are OK)
Genesis.Plugins = ... \
CorundumGames.Codegen.Redux.Plugins, \
...
TODO
This repo includes the following plugins, each of which has a README.md
file in its source directory:
- Context:
Assorted plugins that augment or rely on
Context
s. - Contexts:
Assorted plugins that augment or rely on
Contexts
(note the extras
). - Disposable Component:
Systems that clean up any
IDisposable
component when it's removed or replaced. EntityBehaviour
: GeneratedMonoBehaviour
s forEntity
s.GameObject
Component: Generate a component that contains aGameObject
. Mostly used as a prerequisite for other plugins.- Global Defines:
List the project-wide
#define
symbols that your game uses, to aid in debugging. - Index By Enum:
Generate an
EntityIndex
that makes a given component indexable by another component that contains anenum
.
This project can be built and used on Windows, macOS, and Linux. Install the latest version of .NET and build it on the command-line as follows:W
# Change directory to the cloned repo...
cd CorundumGames.Codegen.Redux
# Install all dependencies...
dotnet restore
dotnet tool restore
# ...then build and package the libraries.
dotnet build
If you have act
installed,
you can run the GitHub Actions workflow locally
by running the act
command within the repo's root.
Due to a mistake I made in writing the build pipeline, the 1.x series should not be considered stable. I didn't want to pull down a live version, so I just rolled with it. Version 2.x will be considered the first stable release.
This repository is primarily written for my own needs, but I'm happy to receive bug reports or pull requests.
All files in this repository are released under the MIT license, unless otherwise noted.
You own the output of each plugin, I make no ownership claims to it.