open-project-1 icon indicating copy to clipboard operation
open-project-1 copied to clipboard

Event Aggregator proposal

Open zaradai opened this issue 4 years ago • 3 comments

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.

zaradai avatar May 05 '21 12:05 zaradai

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 05 '21 12:05 CLAassistant

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! :)

TH3UNKN0WN-1337 avatar May 17 '21 15:05 TH3UNKN0WN-1337

Cool ideas. I've written some feedback on the forums! https://forum.unity.com/threads/event-system-refactoring.1113253/#post-7162234

ciro-unity avatar May 21 '21 09:05 ciro-unity