Releases: chark/scriptable-events
Releases · chark/scriptable-events
v3.0.0
This release tidies up this package, so it is consistent with other packages published by CHARK. Additionally, this release includes a set of breaking changes which will affect you if you're upgrading from previous versions.
Changes
- Renamed
BaseScriptableEventtoScriptableEvent. - Renamed
BaseScriptableEventListenertoScriptableEventListener. - Renamed
BaseScriptableEventEditortoScriptableEventEditor. - Renamed
BaseScriptableEventListenerEditortoScriptableEventListenerEditor. - Updated all built-in
BaseScriptableEventandScriptableEventimplementations to usesealedkeyword to prevent inheriting built-in event and listener implementations. - Updated namespaces to use
CHARK.prefix. - Updated menu items to use
CHARK/prefix. - Updated assemblies to use
CHARK.(instead ofChark.) prefix in their names. - Updated assemblies to use GUIDs instead of assembly names when referencing other assemblies.
- Updated samples as they broke after changing class names and namespaces.
- Updated script generation logic to accomodate namespace and naming changes.
- Updated Documentation to include, namespace, menu item and renaming changes. Additionally, some information regarding addressables was added as well.
- Updated Script Creator window to generate more restricted classes, with
sealedandinternalkeywords instead of justpublic.
v2.2.0
Multi events.
Changed
BaseScriptableEventListener<TArg>now supports multiple events. This should be a non-breaking change. Migration fromscriptableEventto a list ofscriptableEventsis done viaISerializationCallbackReceiverwhich is implemented inBaseScriptableEventListener<TArg>.
v2.1.0
Quality of life improvements.
Added
- Utility window to help in creation of Scriptable Events. It can be found via Right Click > Create > Scriptable Event > Custom Scriptable Event (at the very bottom).
ScriptableEventConstantsclass which can be used to order custom events more neatly.BaseScriptableEventclass (withoutTArg) which is inherited by all events and is used internally to draw inspector GUIs.DefaultScriptableEventEditorwhich targetsBaseScriptableEvent. This addresses some issues when Odin Inspector is present in the project.BaseScriptableEventListener(withoutTArg) which is now inherited by all listeners.BaseScriptableEventListenerEditorwhich targetsBaseScriptableEventListener. This addresses some issues when Odin Inspector is present in the project and will be used to add additional functionality to listener components in the future.- Support for
Action<TArg>listeners. This means that regular methods can now be used as listeners without the need of implementingIScriptableEventListener<TArg>. - Raise button which is shown next to each added listener. Using this button listeners can be raised individually through the inspector. This is useful for debugging purposes.
- Icons for events and listeners - this will require asset re-import.
- Odin Inspector support via the use of
#if ODIN_INSPECTOR.
Changed
- Renamed Scriptable Event creation menu from Scriptable Events to Scriptable Event.
- Moved Scriptable Event menus below Folder and Script creation menu items so the package is less intrusive.
- All existing events now use
ScriptableEventConstantsto define their menu order. lockDescriptionis no longer serialized as its only useful during edit mode.- All
boolproperties now have anisprefix. - Improved
isDebugmessages to be more consistent. Additionally, a listenerObjectwill be used as a context when possible to improve the ping functionality when clicking on a debug message in the Editor. - Events can now be raised in Edit mode via the Raise button in if any listeners are present in the event.
- Improved how event
descriptionis being drawn. - Reworked all samples to be more consistent.
- Updated usage documentation to follow new samples and showcase event creation.
v2.0.0
This release contains major breaking changes and migrates from 2019 (LTS) to 2020 (LTS) in order to utilize generics.
Added
BaseScriptableEventEditorby default applies to allBaseScriptableEvent<T>assets.BaseScriptableEventEditor<T>(with a generic type) should be used only ifRaisebutton functionality is required.- Additional listener info including listener counts (see below "Added Listeners" label on
IScriptableEventassets). - Events, listeners and editors (except editors for
Collision*types) forlong,double,Quaternion,Collider,Collider2D,Collision,Collision2Dtypes.
Changed
- All public
BaseScriptableEvent<T>methods apart fromRaisewere renamed to have a*Listenersuffix. - Each listener now uses a generic
BaseScriptableEvent<T>field instead of a concrete implementation. The additional argument for the event type as well as theUnityEventtype is no longer required. - All events have been moved to
ScriptableEvents.Eventsnamespace to avoid clashing with Unity namespaces. - All listeners have been moved to
ScriptableEvents.Listenersnamespace to avoid clashing with Unity namespaces. tracelogging will provide more information.- Order of components and scriptable events in menus.
Removed
IScriptableEventinterface as it had no use and only added boilerplate.Listenersproperty fromBaseScriptableEvent<T>.- All
UnityEventimplementations. - Duplicate listener check under
BaseScriptableEvent<T>.
v1.0.1
v1.0.0
Initial release, here we list changes made after moving away from Unity Scriptable Objects.
Changed
- Naming of events,
*GameEvent->*ScriptableEvent. - Rewrote event, listener and inspector GUI APIs.
- Rewrote test code.
- Documentation to only focus on events.
- Actions to trigger automatically on
masterand manually onupmbranches.