lightyear icon indicating copy to clipboard operation
lightyear copied to clipboard

Getting `ClientState` or `NetcodeClient` to display errors

Open Serverator opened this issue 8 months ago • 3 comments

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 behind pub(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?

Serverator avatar May 28 '24 18:05 Serverator