projectharmonia / bevy_replicon

Server-authoritative networking crate for the Bevy game engine.
https://crates.io/crates/bevy_replicon
Apache License 2.0
310 stars 30 forks source link

Allow out-of-order event registration #183

Open UkoeHB opened 8 months ago

UkoeHB commented 8 months ago

We can do this by storing registered events in a sorted list of typeids, then assigning channel ids based on index.

Shatur commented 8 months ago

Agree, but shouldn't use TypeId since it's not stable across binaries. Relevant issue in Bevy. But it looks like we can just use type names.

UkoeHB commented 8 months ago

It looks like type_name is also not stable.

Shatur commented 8 months ago

Hm... Yes, I missed it. That just what @cart suggested in https://github.com/bevyengine/bevy/issues/32#issuecomment-673784868. Then I'm not sure how to solve it properly.