diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c10190fcc..3cab48bb02 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,6 +55,8 @@ jobs: DeleteOldWorkflowRuns: name: Delete Old Workflow Runs runs-on: ubuntu-latest + permissions: + actions: write steps: - name: Delete workflow runs uses: Mattraks/delete-workflow-runs@v2 diff --git a/Assets/Mirror/Core/NetworkIdentity.cs b/Assets/Mirror/Core/NetworkIdentity.cs index 55737ed03d..9360e1c81a 100644 --- a/Assets/Mirror/Core/NetworkIdentity.cs +++ b/Assets/Mirror/Core/NetworkIdentity.cs @@ -415,7 +415,12 @@ 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. - 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.", this); + // + // 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.", this); } }