Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Prevent the connection player object to be destroyed when the corresponding client disconnects

$
0
0
So I override the NetworkManager.OnServerAddPlayer method, searches for an unassociated server pre-created player objects (controlled by AI) from a pool, and call NetworkServer.AddPlayerForConnection to associate this player object to the connection.

However, when the client disconnects, I wanted the previously associated player object not to be destroyed per client disconnect, but just return this player object back to the server player object pool and have the server AI to control the...

Prevent the connection player object to be destroyed when the corresponding client disconnects

Viewing all articles
Browse latest Browse all 16796

Trending Articles