public NetworkIdentity ReadNetworkIdentity()
{
NetworkInstanceId netId = ReadNetworkId();
if (netId.IsEmpty())
{
return(null);
}
GameObject go;
if (NetworkServer.active)
{
go = NetworkServer.FindLocalObject(netId);
}
else
{
go = ClientScene.FindLocalObject(netId);
}
if (go == null)
{
if (LogFilter.logDebug)
{
Debug.Log("ReadNetworkIdentity netId:" + netId + "go: null");
}
return(null);
}
return(go.GetComponent <NetworkIdentity>());
}