static internal 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); }
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 + ">"); } }
internal static bool GetPrefab(NetworkHash128 assetId, out GameObject prefab) { if (!assetId.IsValid()) { prefab = null; return(false); } if (s_GuidToPrefab.ContainsKey(assetId) && s_GuidToPrefab[assetId] != null) { prefab = s_GuidToPrefab[assetId]; return(true); } prefab = null; return(false); }
internal static bool GetPrefab(NetworkHash128 assetId, out GameObject prefab) { if (!assetId.IsValid()) { prefab = null; return false; } if (NetworkScene.s_GUIDToPrefab.ContainsKey(assetId) && NetworkScene.s_GUIDToPrefab[assetId] != null) { prefab = NetworkScene.s_GUIDToPrefab[assetId]; return true; } prefab = null; return false; }
internal static bool GetPrefab(NetworkHash128 assetId, out GameObject prefab) { bool result; if (!assetId.IsValid()) { prefab = null; result = false; } else if (NetworkScene.s_GuidToPrefab.ContainsKey(assetId) && NetworkScene.s_GuidToPrefab[assetId] != null) { prefab = NetworkScene.s_GuidToPrefab[assetId]; result = true; } else { prefab = null; result = false; } return(result); }