NetworkPlayer Is Obsolete. Is there an alternative to this when using OnPlayerDisconnected?

I am writing a script to check if a player has disconnected with a tag, and when I use OnPlayerDisconnected(NetworkPlayer player), it says the following error:

error CS0619: 'NetworkPlayer' is obsolete: 'The legacy networking system has been removed in Unity 2018.2. Use Unity Multiplayer and NetworkIdentity instead.'

Is there an alternative to this? I would love to get this script working.

Thank you! :)
-Reece, (Code Red Game Studio)

Edit: I was implementing a feature that would check if a player with the tag of zombie was disconnected, and if so, it would end the game. I ultimately ended up scrapping the idea, as I felt like it wasn't needed.

Comments