I have a piece of code that runs in a Monobehavior’s Start Method. The method checks the Network.peerType, however whenever I do so the result is always Disconnected - even when connected. I have hacked the solution below, but, I was wondering if there was a more elegant solution.
void Start()
{
Invoke("AfterStart", 1);
}
void AfterStart()
{
if (Network.peerType != NetworkPeerType.Disconnected)
{
networkView.RPC("OnSetIdentity", RPCMode.OthersBuffered,"TestName");
}
}