Skip to content

Create base class to auto (un)register listeners. #4

@EricFreeman

Description

@EricFreeman

You shouldn't have to manually register in the Start and unregister in the OnDestroy methods to use EventAggregator. This makes it easy to forget and introduce bugs, plus add unnecessary amounts of code. Make a baseclass that extends MonoBehaviour that just searches for all interfaces of IListener<(message)> and handles registration for you.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions