lisandroct / EventSystem

Event system for Unity using ScriptableObjects
MIT License
14 stars 1 forks source link

Example for <2020 is broken and highlights an issue with listeners #11

Closed paulmasri closed 3 years ago

paulmasri commented 3 years ago

In the sample code for <2020, the simple GameEvent OnTick works fine. However, the random color and light toggle do not.

In the 2020+ example, the BoolListener script on Directional Light provides a response with 1 argument: "Boolean". However in the <2020 example, it provides a response with 3 arguments: "Boolean, BoolEvent, BoolResponse", which cannot be readily applied, and so won't work with Light.set_enabled.

If you want to continue supporting Unity <2020, I think the approach needs rethinking.

lisandroct commented 3 years ago

In 2019 thinks work a little different. It's definitely not a priority. For now I'll just remove the 2019 example.