In the sample code for <2020, the simple GameEventOnTick 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.
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.