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
BaseScriptableEvent
toScriptableEvent
. - Renamed
BaseScriptableEventListener
toScriptableEventListener
. - Renamed
BaseScriptableEventEditor
toScriptableEventEditor
. - Renamed
BaseScriptableEventListenerEditor
toScriptableEventListenerEditor
. - Updated all built-in
BaseScriptableEvent
andScriptableEvent
implementations to usesealed
keyword 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
sealed
andinternal
keywords instead of justpublic
.
v2.2.0
Multi events.
Changed
BaseScriptableEventListener<TArg>
now supports multiple events. This should be a non-breaking change. Migration fromscriptableEvent
to a list ofscriptableEvents
is done viaISerializationCallbackReceiver
which 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).
ScriptableEventConstants
class which can be used to order custom events more neatly.BaseScriptableEvent
class (withoutTArg
) which is inherited by all events and is used internally to draw inspector GUIs.DefaultScriptableEventEditor
which targetsBaseScriptableEvent
. This addresses some issues when Odin Inspector is present in the project.BaseScriptableEventListener
(withoutTArg
) which is now inherited by all listeners.BaseScriptableEventListenerEditor
which 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
ScriptableEventConstants
to define their menu order. lockDescription
is no longer serialized as its only useful during edit mode.- All
bool
properties now have anis
prefix. - Improved
isDebug
messages to be more consistent. Additionally, a listenerObject
will 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
description
is 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
BaseScriptableEventEditor
by default applies to allBaseScriptableEvent<T>
assets.BaseScriptableEventEditor<T>
(with a generic type) should be used only ifRaise
button functionality is required.- Additional listener info including listener counts (see below "Added Listeners" label on
IScriptableEvent
assets). - Events, listeners and editors (except editors for
Collision*
types) forlong
,double
,Quaternion
,Collider
,Collider2D
,Collision
,Collision2D
types.
Changed
- All public
BaseScriptableEvent<T>
methods apart fromRaise
were renamed to have a*Listener
suffix. - Each listener now uses a generic
BaseScriptableEvent<T>
field instead of a concrete implementation. The additional argument for the event type as well as theUnityEvent
type is no longer required. - All events have been moved to
ScriptableEvents.Events
namespace to avoid clashing with Unity namespaces. - All listeners have been moved to
ScriptableEvents.Listeners
namespace to avoid clashing with Unity namespaces. trace
logging will provide more information.- Order of components and scriptable events in menus.
Removed
IScriptableEvent
interface as it had no use and only added boilerplate.Listeners
property fromBaseScriptableEvent<T>
.- All
UnityEvent
implementations. - 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
master
and manually onupm
branches.