Closed mirsella closed 2 months ago
i was thinking its because its a Res
it seems that bevy_replicon_renet is working, and surprisingly, the code for this trait is the same between the two crates bevy_replicon_renet and bevy_replicon_renet2:
/// External trait for [`RepliconChannels`] to provide convenient conversion into renet channel configs.
pub trait RenetChannelsExt {
/// Returns server channel configs that can be used to create [`ConnectionConfig`](renet2::ConnectionConfig).
fn get_server_configs(&self) -> Vec<ChannelConfig>;
/// Same as [`RenetChannelsExt::get_server_configs`], but for clients.
fn get_client_configs(&self) -> Vec<ChannelConfig>;
}
impl RenetChannelsExt for RepliconChannels {
fn get_server_configs(&self) -> Vec<ChannelConfig> {
create_configs(self.server_channels(), self.default_max_bytes)
}
fn get_client_configs(&self) -> Vec<ChannelConfig> {
create_configs(self.client_channels(), self.default_max_bytes)
}
}
Oh, it works on main, but not with the tag 0.0.5. do you know which commit fix it ? im curious
Oh, it works on main, but not with the tag 0.0.5.
Oh hey, sorry about this. I updated the bevy_replicon
dependency but didn't make a new tag yet. You got that error due to bevy_replicon_renet2
using a different version than your project (essentially a linker error). I will make a new tag now!
ohh thats why... thanks !
@mirsella tag 0.0.6
has been pushed.
hello
i was trying to use bevy_replicon_renet2, but i didnt manage to call the RenetChannelsExt method:
you can replicate this issue by doing this:
cargo new a
cargo.toml:And copy the examples/simple_box.rs to main.rs. and that's it.
In the example, it probably works because it's the same crate or something like that
thanks !