FlaxEngine / FlaxEngine/FlaxEngine
Feature: Event System to for binding events in Editor
- Dominant language
- C++
- Stars
- 7k
- Forks
- 713
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 19
Description
Currently, only through scripting devs can use the UIControls events (like Button's OnClicked), binding them to a given function. And always with boilerplate subscribing/unsubscribing OnClicked to a method on OnEnable/OnDisable. Designers are left behind.
An Event System to allow *designers* to bind events (particularly UI, but one could design its own systems to incorporate it) to other scripts' methods. Somewhat like the Unity's Event System. Allowing editor-only to drag-and-drop functionalities into the triggered event, like Button's OnClicked or TextField' OnValueChanged and why not UserOwnSpaceshipController' OnDamaged.
It will need to probably use reflection to serialize/deserialize the script + method variable in order to call it in runtime.
Also, consider creating a standard "Signal Asset" as JSONAsset asset to allow users to visually, in Editor, bind pre-defined global bindings (both emitter and consumer would point to the same JSONAsset, which would contain the public Action<>).
Contributor guide
Assessment
This issue has not been assessed yet.