No property reason of ConnectionApprovalResponse

Hi, I’m learning to deny connections with NetworkManager and I observed that the property “Reason” of ConnectionApprovalResponse does not appear in my editor and it class. I don’t know if this is a bug. In the meantime, how can I write a connection decline reason?

What version of Netcode are you running, I think Reason was added in 1.2.0.

On the server/host set response.Reason to a string of your choice.

On the client subscribe to the OnClientDisconnectCallback and in the callback read NetworkManager.Singleton.DisconnectReason

My version is 1.1.0 but I can’t update to version 1.2

I updated the editor to version 2021.3.18f and it already has Netcode 1.2, with that the option appears. Could someone clarify for me if the editor version 2021.3.15f can update the Netcode to version 1.2.

You can update all the way to 1.4.0 manually by editing your package manifest. It doesn’t show as an available update in package manager because it’s not verified for that version yet - but unverified doesn’t necessarily mean it incompatible.