CS0030 Cannot convert type 'UnityEngine,Networking.PlayerController' to 'PlayerController'
Trying to convert my singleplayer game to a mutiplayer version that has a lobby system using this https://www.assetstore.unity3d.com/en/#!/content/41836
and this particular line of code has an issue that I don't know how to fix:
int localPlayerCount = 0;
foreach (PlayerController p in ClientScene.localPlayers)
localPlayerCount += (p == null || p.playerControllerId = -1) ? 0 : 1;
the problem is in the foreach line which says that it cannot convert type UnityEngine.Networking.PlayerController to PlayerController
My PlayerController Script is extending from another Class which has a NetworkBehaviour instead of a Monobehaviour so that should be fine?
public class PlayerController : LivingEntity
In LivingEntity:
public class LivingEntity : NetworkBehaviour, IDamageable//(interface)
So what is the problem here? Unity doesn't allow me to continue if this script isn't fixed :/
Haha sorry for the inconvenience, I posted another duplicate at a more reasonable time to get an answer and I did. Here's the link http://answers.unity3d.com/questions/1194366/cs0030-cannot-convert-type-unityenginenetworkingpl-1.html#answer-1194388 hope this solves it too :D
Follow this Question
Related Questions
CS0030 Cannot convert type 'UnityEngine,Networking.PlayerController' to 'PlayerController' 1 Answer
Simple Question: Is the Unity 5.4+ "NetworkLobbyManager" bugged? 0 Answers
[Multiplayer Lobby] NetworkManager has a NetworkIdentity component 1 Answer
Modifying Unity Network Lobby 0 Answers
A lobby room where multiple player can compete with each other 0 Answers