FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.61k stars 340 forks source link

Fixes messages not being passed to plugins #408

Closed bolshoytoster closed 1 year ago

bolshoytoster commented 1 year ago

A 'frame' in fyrox can be oversimplified into the three parts that I care about here:

..do some other stuff..

Now this is fine about half of the time, when a message is sent:

<-- here First poll_message()

..do stuff..

Second poll_message() <-- or here

But if a message is sent during the 'do stuff' part, since the second poll_message() (in src/engine/executor.rs) doesn't actually do anything with the message recieved, only the widget(s) involved recieve the message, and the plugins don't.

I found this problem in that my buttons were only sending on_ui_message about half of the time, while still changing colour.


This PR just makes the second poll_message() also send the message to plugins.