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.
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.
0
Comments
-
Hi @CodeRedGames,
Thank you for choosing Photon!
PUN does not use Unity's own networking classes at all.
Take a look at PUN Basics Tutorial to get you started.0 -
Hello, @JohnTube.
Thank you for your response!
I found it was an issue on the programming side of my part. I was able to get it resolved.
Thank you!
-Reece1