Closed ZimM-LostPolygon closed 2 years ago
Not sure what to do with that failed CodeQL check - seems like something completely unrelated to my changes?
Yes, it's unrelated. Not sure what causes it either. I'll be merging it anyway, thanks for your contribution! 🙌🏼
Also I see what you mean. The name event was chosen based on the existing browser APIs which also apply this naming scheme.
Somewhere during the v9.x refactor, a regression was introduced that made it not possible to return values from an event back to Unity. This PR fixes that and makes this feature work again.
Reference: https://github.com/jeffreylanters/react-unity-webgl/issues/40 https://github.com/jeffreylanters/react-unity-webgl/pull/41 https://github.com/jeffreylanters/react-unity-webgl/pull/42
P.S. I feel like "event" was a poor choice of word, it implies just firing and forgetting. However, it's really more like a bound function, and functions surely can return values.