In my NetworkManager derived class, I instantiate my player (which is a NetworkBehaviour) and thus calls it’s Awake() and in that Awake() call I check for isServer but it is false! Why is that?
I mean the call is initiated from server obviously, am I right?
I even put [ServerCallback] attribute before Awake() but the isServer is still false!
Dmitriy-Yukhanov is right. And thank Dmitriy and this post
I met a problem. When I wrote a function in ondestroy(), I found isserver is false. But this prefab is spawn on the server actually.
Then I read the network codes. Isserver is going to be false when the object be destroied. Because my component is behind the Networkidentity. And Isserver is from networkidentity’s variable. That’s the reason why isserver is false
Is there an easy way to call the host, and the client connected to the host that hosts the server? Since as far as I know calling isServer doesn’t give you the host…