Can't get Message sending with Channel to work #1160
-
|
Hi, for the last few days I tried to get a simple lightyear client and server to work so the client sends messages over a channel to the server and the server prints them. I created two minimal examples. One custom that I made and one I copied from the examples and added my message sending. I always get a ChannelNotFound error like the one below: There is more info in the repository. The repository: https://github.com/Marvin-Dziedzina/lightyear_test Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Sorry it's not very clear, but entities can only send / receive message if:
As a helper, I provide for convenience the In your case, you just need to add The ergonomics/docs can certainly be improved |
Beta Was this translation helpful? Give feedback.
Sorry it's not very clear, but entities can only send / receive message if:
transport.add_sender_from_registryortransport.add_receiver_from_registry)As a helper, I provide for convenience the
add_directionmethod that will register the channels/messages onClientorServerentities.In your case, you just need to add
.add_direction(NetworkDirection::Bidirectional)to the channel registration