Skip to content

Releases: jeffcampbellmakesgames/Entitas-Redux

v1.3.1

30 Sep 01:42
Compare
Choose a tag to compare

Summary

This release contains several quality-of-life improvements and features for developers as well as a small thread-safe fix.

A "Refactor Mode" has been added that can be toggled through menu item Tools => JCMG => EntitasRedux => Enable Refactor Mode or Ctrl + Shift + R. This compiles out usage of component members so that a developer can easily refactor a component's structure without needing to modify auto-generated code. When complete, this mode can be toggled off using the same menu item path and/or shortcut.

image

A new Systems and Feature named ContextCleanupSystems and ContextCleanupFeature will be generated per context that contains all cleanup systems for that context. This enables a developer to add that one system to their Systems instance and future proof additional cleanup systems generated in the future by automatically including them.

Note: If you install EntitasRedux using a .UnityPackage you must also grab the latest release of Genesis as well from here as it is not included. For better dependency handling, I would recommend using OpenUPM instead.

ADDED

  • All static collections have been made thread safe through lazy loading and the [ThreadStatic] attribute.
  • Support for Unity's Experimental PlayMode options for avoiding reloading the app domain have been added such that any static state is reset when entering Edit Mode.
  • A Refactor Mode has been added to enable developers to easily refactor existing code without needing to modify auto-generated code from EntitasRedux.
  • A new code generator has been added that enables an aggregate Systems and Feature to be created per context that contains all auto-generated Cleanup systems for that context.

CHANGED

All new entity component code generated where members are used are now surrounded in preprocessor blocks to support refactor mode.

FIXED

  • Methods Entity.CloneTo and Context.CloneEntity previously marked as [Obsolete] are now available. Copying of components uses newer CopyComponentTo API and offers optional deep-copy support for reference members.

REMOVED

  • NA

v1.3.0

13 Sep 19:28
Compare
Choose a tag to compare

Summary

This version adds a new feature Blueprints to enable a developer to define sets of components in the Unity Editor at design-time and apply them to one or more entities as new components at runtime. This includes additional API and other functionality changes to support this feature.

image

In addition, the minimum supported Unity version has been bumped to 2019.4 LTS.

Note: If you install EntitasRedux using a .UnityPackage you must also grab the latest release of Genesis as well from here as it is not included. For better dependency handling, I would recommend using OpenUPM instead.

ADDED

  • A new entity component API CopyComponentTo has been created such that an existing component can have each of it's members be copied to a new component on an entity. Deep-copying support has been added in a limited measure using the ICloneable interface, including collections; more details on how that works and it's constraints can be found here.
  • A new feature Blueprints has been added that enables defining and sets of components in the Unity Editor at design time as either a MonoBehaviour component or a ScriptableObject. These Blueprints can then be applied to one or more entities such that the components defined are then copied to those entities as unique instances. Each context generates its own unique set of Blueprint types. For more information, please see here.

CHANGED

  • The minimum supported Unity version is now 2019.4 LTS in order to better support EntitasRedux into the future as the LTS versions receive 2 years of technical bug fixes.
  • The version of Genesis that is now required is v1.3.0.
  • The name of the code-generated event listener interface method created when a component is decorated with the [Event] attribute where the event type is EventType.Added to include Added as a post fix. For example, for a component Vector3Component decorated with the attribute [Event(EventTarget.Self, EventType.Added)], the generated listener interface method will be named OnVector3Added instead of OnVector3.

FIXED

  • Not applicable

REMOVED

  • The deprecated [CustomComponentNameAttribute] attribute has been removed in favor of the existing [ComponentName] attribute.

v1.2.3

19 Aug 12:09
Compare
Choose a tag to compare

Summary

This release adds the ability to generate ICleanup systems from components decorated with the [Cleanup] attribute.

  • Decorating a component with [Cleanup(CleanupMode.RemoveComponent)] will result in a new ICleanup system that removes components of that type from entities.
  • Decorating a component with [Cleanup(CleanupMode.DestroyEntity)] will result in a new ICleanup system that destroys all entities with that component.

For existing projects that update to this version and want to make use of this feature, make sure to enable the new data provider and code generator in your GenesisSettings asset.

image

Note: If you install EntitasRedux using a .UnityPackage you must also grab the latest release of Genesis as well from here as it is not included. For better dependency handling, I would recommend using OpenUPM instead.

ADDED

  • Added code generation for cleanup systems.

CHANGED

  • NA

FIXED

  • NA

REMOVED

  • NA

v1.2.2

05 Aug 10:51
Compare
Choose a tag to compare

SUMMARY

Contains a minor bug fix for code generation.

Note: If you install EntitasRedux using a .UnityPackage you must also grab the latest release of Genesis as well from here as it is not included. For better dependency handling, I would recommend using OpenUPM instead.

ADDED

  • NA

CHANGED

  • Increased version dependency for Genesis to v1.2.1 for better logging

FIXED

  • Resolves an error with code generation for Components decorated with [Event] where the generated event types had not previously existed.

REMOVED

  • NA

v1.2.0

27 Jul 12:09
Compare
Choose a tag to compare

Summary

This release adds a small breaking API change as bool property getters on Context, Entity have been renamed from hasX to HasX to be more in-line with the modern C# API EntitasRedux aims for.

image

A quality-of-life improvement has been added for working in the Unity Editor so that a user can more quickly create components and systems from template scripts by right-clicking in the Project window, selecting Create => EntitasRedux and selecting a script type. This can also be done by selecting the window menu item Assets => Create => EntitasRedux

image

image

A bug fix has been added to prevent an edge case around component generation. Previously if one or more Components on the same Context had the same name either by default or by way of a custom name, this would have caused a compiler error post-code generation This new fix adds better safety by validating component names during the Data Provider step, logging any duplicate name instances as errors, and after validation throwing a DuplicateComponentNameException if any were found, preventing code from being generated that would cause a compiler error.

image

The VersionConstants class which contains version information for the EntitasRedux library now resides in the runtime assembly EntitasRedux rather than the editor assembly EntitasRedux.Editor and is now generated by JCMG.PackageTools just prior to a new update. The benefit of this is that it now contains even more detailed version information including:

  • The version number is now derived directly from the PackageManifest, making it easier to update.
  • The GIT branch and commit hash the package was created from.
  • Absolute and human-readable UTC time information on when the package was created.

image

Note: If you install EntitasRedux using a .UnityPackage you must also grab the latest release of Genesis as well from here as it is not included. For better dependency handling, I would recommend using OpenUPM instead.

ADDED

  • Script templates and menu items have been added to make it easier to create C# scripts for components, systems.
  • A bug fix should now prevent contexts with duplicate component names from generating code and causing a compiler error.

CHANGED

  • Bool properties named with prefix has have been renamed to use Has instead.
  • VersionConstants is now located in EntitasRedux AssemblyDefinition rather than EntitasRedux.Editor and contains new fields describing when/where the package was created from.

REMOVED

  • NA

v1.1.0

14 May 08:52
Compare
Choose a tag to compare

Summary

This update includes several breaking changes to add support for a single Systems instance to run systems at the three different Unity update intervals (FixedUpdate, Update, and LateUpdate). This comes in the form of renaming IExecuteSystem to IUpdateSystem and new interface types for IFixedUpdateSystem and ILateUpdatesystem. As a result of these changes, IReactiveSystem is now decoupled from IExecuteSystem (now IUpdateSystem) and are attempted to be executed on the same frame after all IUpdateSystems have run.

With these core EntitasRedux changes, new support has also been added for Visual Debugging to accommodate them. The DebugSystemsBehavior inspector now shows the counts and performance stats for these new system types while the performance graph will now plot lines for all three update interval systems IFixedUpdate, IUpdateSystem, and ILateUpdateSystem. An example of the new appearance, information shown for the inspector can be seen below.

image

Note: If you install EntitasRedux using a .UnityPackage you must also grab the latest release of Genesis as well from here as it is not included. For better dependency handling, I would recommend using OpenUPM instead.

ADDED

  • Created VisualDebug user-preferences for colors shown for FixedUpdate, Update, and LateUpdate systems.
  • Updated DebugSystemsBehaviorInspector to show information about new new system types, including counts of systems and performance stats and graph visualization. The performance graph now includes a legend showing what colors belong to which system types, lines drawn.
  • Added support to DebugSystems, Feature, Systems, and code generation for Visual Debugging for adding new system types
  • Added new methods to EditorGUILayoutTools for creating UI textures, drawing bordered boxes, and drawing a section header.

CHANGED

  • IExecuteSystem has been renamed to IUpdate and its interface method has been changed from Execute to Update. Its function is still to serve as a system that executes per at the beginning of every render frame.
  • IReactiveSystem no longer inherits from IExecuteSystem (now IUpdateSystem), but maintains its Execute method. It now directly derives from ISystem and has been effectively separated from the IUpdateSystem.

REMOVED

  • GameObjectExtensions class in Visual Debugging is now internal

v1.0.0

06 May 06:53
Compare
Choose a tag to compare

Summary

This contains the initial release of EntitasRedux. It is largely equivalent to the 1.13.0 feature set of Entitas, minus Migrations and Blueprints. The core code generation functionality has largely been split off into a separate library named "Genesis" (found here as a general-purpose Unity editor tool that can be used independently and is a core dependency of EntitasRedux.

Note: If you install EntitasRedux using a .UnityPackage you must also grab the latest release of Genesis as well from here as it is not included. For better dependency handling, I would recommend using OpenUPM instead.

ADDED

  • Imported and reworked all original Entitas code into new EntitasRedux library.
  • Cleaned up and modified code and code-gen, including extracting types into own files, updated code to reflect modern C# style, adjusted namespaces, converted simple properties to use expression-body style, modified event invocation to use nullable syntax, modified type cast and null check to use pattern matching, upper-case C# properties over lower-case.
  • Collapsed many related assemblies into Runtime, Editor, and Plugin equivalents.
  • Extracted code generation into a separate dedicated tool named Genesis, this is now a dependency of EntitasRedux. Genesis can be used for general-purpose code generation of itself.
  • Modified all code generation aspects to now use Genesis as basis and removed older native code-gen funner capabilities, including Properties files.
  • Created EntitasRedux user preferences section, found in menu item Edit -> Preferences
  • Implemented IAbstractUserPreferencesDrawer and AbstractUserPreferencesDrawer for enabling developers to draw custom user preferences
  • Modified code doc comments so that method/property docs properly show in intellisense.
  • Ported all NSpec Unit tests to NUnit so they can be run in Unity.
  • Modified example and unit test content so that it is also generated by code in development project.
  • Moved all menu items to start from path "JCMG => EntitasRedux".
  • Added MIT license header to all relevant files.
  • Unified all line endings to Unix style (LF)
  • Updated .editorconfig to be root.
  • Added JCMG PackageTools as package
  • Updated readme to cover background of Entitas reworking, outlined missing features

CHANGES

  • Removed plugins for server and command-line code generation as that functionality is not available in open-source version of original Entitas
  • Marked non-working APIs as Obsolete with error on compile set to true. This currently includes Context.CloneEntity extension method.
  • Refactored user preferences on VisualDebuggingConfig to be user preferences instead of additional props on a GenesisSettings asset. Adjusted usage of those fields.

FIXES

  • Fixed 2019.3 issue for VisualDebugging drawer colors where they would not be used by also setting scaled background textures on programmatically created GUIStyles.