public static int GetNetworkViewID(UnityEngine.NetworkViewID viewID)
{
string str = viewID.ToString();
int id;
var sceneID = Regex.Match(str, @"SceneID\: ([0-9]+)");
if (sceneID.Success && Int32.TryParse(sceneID.Groups[1].Value, out id))
{
return(id);
}
var allocatedID = Regex.Match(str, @"AllocatedID\: ([0-9]+)");
if (allocatedID.Success && Int32.TryParse(allocatedID.Groups[1].Value, out id))
{
return(id);
}
return(0);
}