Im starting with Network Scripting and got the Problem that I get the "error CS0117: `Network' does not contain a definition for `peerType' " but the tutorial I watched did the exact same thing and it worked. This is where I get the error: Code (csharp): if (Network.peerType == NetworkPeerType.Disconnected) { } Where there any changes with the Unity patches so that this doesn´t work anymore? My Unity Version is 3.5.1 and I am using C#.
so far of what i see from what you wrote the error seems right, you don't have a network peertype defined like for example Network.peerType = NetworkPeerType.Connected; and so on. don't you understand the error? it's giving you the answer.
Thats not needed. Network.peerType is automatically set when you Connect or start a server. And should default to NetworkPeerType.Disconnected. What the error says is that the Network class don't have a definition for peerType, not that its not set.
So, what do I do now to check if I got connected or disconnected? Did Network.peerType got replaced by something else or why can´t I find it?
Well, no idea why it wont work, but i think you can use if(!Network.isClient) to see if you are connected or not. Depending on how you do with your server, you might have to use if(!Network.isClient !Network.isServer) to be sure.
Also no definition for Network.isClient and Network.isServer. Do I have to include a specific header, or an Assat Package?
Ehh? That sounds very strange. I use Unitys networking myself and i have no problem with either isClient, isServer or peerType. Im using v3.5
Fixed it, just reinstalled it I guess something on the installation did go wrong. Still thanks for the help if I wouldn´t have tried isClient/isServer i wouldn´t have gotten the idea that i have to reinstall it.