Using the native Unity Package Manager introduced in 2017.2, you can add this library as a package by modifying your
manifest.json
file found at /ProjectName/Packages/manifest.json
to include it as a dependency. See the example below
on how to reference it.
The package is available on the npmjs registry.
{
"dependencies": {
"com.playdarium.unity.entitas-redux": "x.x.x"
},
"scopedRegistries": [
{
"name": "Playdarium",
"url": "https://registry.npmjs.org",
"scopes": [
"com.playdarium.unity"
]
}
]
}
Open Window -> Package Manager
choose Packages: My Regestries
and install package
"com.playdarium.unity.entitas-redux": "https://gitlab.com/pd-packages/entitas-redux.git#upm"
This version of Entitas Redux is a reworked version of EntitasRedux with a sole focus on Unity.
- Min Unity Version: 2022.3
To create your first Context in assembly, you need to declare it using attribute.
Example:
using JCMG.EntitasRedux;
public sealed partial class MyFirstAttribute : ContextAttribute
{
}
After code analysis detects your attribute, it's automatically generating all implementations for Context and Entity classes.
Analyzer detects components by name of a class or base type it must end with Component
and have one or greater
attributes
Examples:
using JCMG.EntitasRedux;
[MyFirst]
public class MyFirstComponent : IComponent
{
}
[MyFirst]
public class MySecond : IComponent
{
}
Examples:
using JCMG.EntitasRedux;
[MyFirst]
public class InheritedComponent : MyFirstComponent
{
}