internal static void RegisterPrefab(GameObject prefab)
{
NetworkIdentity component = prefab.GetComponent<NetworkIdentity>();
if (component != null)
{
if (LogFilter.logDebug)
{
Debug.Log(string.Concat(new object[] { "Registering prefab '", prefab.name, "' as asset:", component.assetId }));
}
s_GuidToPrefab[component.assetId] = prefab;
if ((prefab.GetComponentsInChildren<NetworkIdentity>().Length > 1) && LogFilter.logWarn)
{
Debug.LogWarning("The prefab '" + prefab.name + "' has multiple NetworkIdentity components. There can only be one NetworkIdentity on a prefab, and it must be on the root object.");
}
}
else if (LogFilter.logError)
{
Debug.LogError("Could not register '" + prefab.name + "' since it contains no NetworkIdentity component");
}
}