Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions