Beispiel #1
0
 internal static bool GetPrefab(NetworkHash128 assetId, out GameObject prefab)
 {
     prefab = null;
     if (assetId.IsValid() && guidToPrefab.ContainsKey(assetId) && guidToPrefab[assetId] != null)
     {
         prefab = guidToPrefab[assetId];
         return(true);
     }
     return(false);
 }
Beispiel #2
0
 internal void SetDynamicAssetId(NetworkHash128 newAssetId)
 {
     if (!m_AssetId.IsValid() || m_AssetId.Equals(newAssetId))
     {
         m_AssetId = newAssetId;
     }
     else
     {
         if (LogFilter.logWarn)
         {
             Debug.LogWarning("SetDynamicAssetId object already has an assetId <" + m_AssetId + ">");
         }
     }
 }