GetStringForAssetId() static private méthode

static private GetStringForAssetId ( NetworkHash128 assetId ) : string
assetId NetworkHash128
Résultat string
        private static void OnObjectDestroy(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <ObjectDestroyMessage>(ClientScene.s_ObjectDestroyMessage);
            if (LogFilter.logDebug)
            {
                Debug.Log((object)("ClientScene::OnObjDestroy netId:" + (object)ClientScene.s_ObjectDestroyMessage.netId));
            }
            NetworkIdentity uv;

            if (ClientScene.s_NetworkScene.GetNetworkIdentity(ClientScene.s_ObjectDestroyMessage.netId, out uv))
            {
                NetworkDetailStats.IncrementStat(NetworkDetailStats.NetworkDirection.Incoming, (short)1, ClientScene.GetStringForAssetId(uv.assetId), 1);
                uv.OnNetworkDestroy();
                if (!NetworkScene.InvokeUnSpawnHandler(uv.assetId, uv.gameObject))
                {
                    if (uv.sceneId.IsEmpty())
                    {
                        Object.Destroy((Object)uv.gameObject);
                    }
                    else
                    {
                        uv.gameObject.SetActive(false);
                        ClientScene.s_SpawnableObjects[uv.sceneId] = uv;
                    }
                }
                ClientScene.s_NetworkScene.RemoveLocalObject(ClientScene.s_ObjectDestroyMessage.netId);
            }
            else
            {
                if (!LogFilter.logDebug)
                {
                    return;
                }
                Debug.LogWarning((object)("Did not find target for destroy message for " + (object)ClientScene.s_ObjectDestroyMessage.netId));
            }
        }
 private static void OnObjectSpawn(NetworkMessage netMsg)
 {
     netMsg.ReadMessage <ObjectSpawnMessage>(ClientScene.s_ObjectSpawnMessage);
     if (!ClientScene.s_ObjectSpawnMessage.assetId.IsValid())
     {
         if (!LogFilter.logError)
         {
             return;
         }
         Debug.LogError((object)("OnObjSpawn netId: " + (object)ClientScene.s_ObjectSpawnMessage.netId + " has invalid asset Id"));
     }
     else
     {
         if (LogFilter.logDebug)
         {
             Debug.Log((object)("Client spawn handler instantiating [netId:" + (object)ClientScene.s_ObjectSpawnMessage.netId + " asset ID:" + (object)ClientScene.s_ObjectSpawnMessage.assetId + " pos:" + (object)ClientScene.s_ObjectSpawnMessage.position + "]"));
         }
         NetworkDetailStats.IncrementStat(NetworkDetailStats.NetworkDirection.Incoming, (short)3, ClientScene.GetStringForAssetId(ClientScene.s_ObjectSpawnMessage.assetId), 1);
         NetworkIdentity uv;
         if (ClientScene.s_NetworkScene.GetNetworkIdentity(ClientScene.s_ObjectSpawnMessage.netId, out uv))
         {
             ClientScene.ApplySpawnPayload(uv, ClientScene.s_ObjectSpawnMessage.position, ClientScene.s_ObjectSpawnMessage.payload, ClientScene.s_ObjectSpawnMessage.netId, (GameObject)null);
         }
         else
         {
             GameObject prefab;
             if (NetworkScene.GetPrefab(ClientScene.s_ObjectSpawnMessage.assetId, out prefab))
             {
                 GameObject newGameObject = (GameObject)Object.Instantiate((Object)prefab, ClientScene.s_ObjectSpawnMessage.position, Quaternion.identity);
                 uv = newGameObject.GetComponent <NetworkIdentity>();
                 if ((Object)uv == (Object)null)
                 {
                     if (!LogFilter.logError)
                     {
                         return;
                     }
                     Debug.LogError((object)("Client object spawned for " + (object)ClientScene.s_ObjectSpawnMessage.assetId + " does not have a NetworkIdentity"));
                 }
                 else
                 {
                     ClientScene.ApplySpawnPayload(uv, ClientScene.s_ObjectSpawnMessage.position, ClientScene.s_ObjectSpawnMessage.payload, ClientScene.s_ObjectSpawnMessage.netId, newGameObject);
                 }
             }
             else
             {
                 SpawnDelegate handler;
                 if (NetworkScene.GetSpawnHandler(ClientScene.s_ObjectSpawnMessage.assetId, out handler))
                 {
                     GameObject newGameObject = handler(ClientScene.s_ObjectSpawnMessage.position, ClientScene.s_ObjectSpawnMessage.assetId);
                     if ((Object)newGameObject == (Object)null)
                     {
                         if (!LogFilter.logWarn)
                         {
                             return;
                         }
                         Debug.LogWarning((object)("Client spawn handler for " + (object)ClientScene.s_ObjectSpawnMessage.assetId + " returned null"));
                     }
                     else
                     {
                         uv = newGameObject.GetComponent <NetworkIdentity>();
                         if ((Object)uv == (Object)null)
                         {
                             if (!LogFilter.logError)
                             {
                                 return;
                             }
                             Debug.LogError((object)("Client object spawned for " + (object)ClientScene.s_ObjectSpawnMessage.assetId + " does not have a network identity"));
                         }
                         else
                         {
                             uv.SetDynamicAssetId(ClientScene.s_ObjectSpawnMessage.assetId);
                             ClientScene.ApplySpawnPayload(uv, ClientScene.s_ObjectSpawnMessage.position, ClientScene.s_ObjectSpawnMessage.payload, ClientScene.s_ObjectSpawnMessage.netId, newGameObject);
                         }
                     }
                 }
                 else
                 {
                     if (!LogFilter.logError)
                     {
                         return;
                     }
                     Debug.LogError((object)("Failed to spawn server object, assetId=" + (object)ClientScene.s_ObjectSpawnMessage.assetId + " netId=" + (object)ClientScene.s_ObjectSpawnMessage.netId));
                 }
             }
         }
     }
 }