lightyear
lightyear copied to clipboard
Getting `ClientState` or `NetcodeClient` to display errors
Currently I'm trying to get ClientState
to display the reason why connection to the server failed, but I'm having difficulty actually getting NetcodeClient
from anywhere.
I tried:
- Reading the resource
netcode::Client::<()>
, but it seems to not exist. - Get it from
ClientConnection
, but it seems to be impossible because it's behindpub(crate)
In the similar note it's not possible to get the error when you start the server, like if port is already in use. Currently it seems to only output the errors to the console. Maybe make it send an event with the error?