open-project-1
open-project-1 copied to clipboard
Event Aggregator proposal
A limited change to demonstrate events published from Input.
An EventAggregator was created and a SO to hold the instance so that it can be shared within the project.
The publishers were located in Inputs and for limited changes only those events that were applicable to Protagonist was applied.
Also there is a UnityEventBus that was created to avoid reflection and link to UnityActions that could be exposed to the inspector or an existing function can be used. The later was demonstrated in the camera manager.
Assets\ScriptableObjects\Input\InputReader.asset is missing the assignment of EventAgregator and EventBus. I like the approach you take here. We use something similar, inspired by Caliburn.Micro as well. Good job! :)
Cool ideas. I've written some feedback on the forums! https://forum.unity.com/threads/event-system-refactoring.1113253/#post-7162234