fix(Tests): suppress test prefab child NI error when opening the Github project for the first time

This commit is contained in:
mischa 2023-12-06 19:15:06 +01:00
parent 608429c314
commit 1ba69231cb

View File

@ -375,6 +375,11 @@ void DisallowChildNetworkIdentities()
{
// always log the next child component so it's easy to fix.
// if there are multiple, then after removing it'll log the next.
//
// ignore test prefabs so users aren't greeted with this error
// when opening Mirror from Github for the first time.
// (hardcoding this is still better than the annoying error)
if (name != "PrefabWithChildrenForClientScene")
Debug.LogError($"'{name}' has another NetworkIdentity component on '{identities[1].name}'. There should only be one NetworkIdentity, and it must be on the root object. Please remove the other one.");
}
}