From 8543f1f37df4cb5d0d9ef2919f9c9d0c4f457653 Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Tue, 9 Jan 2024 19:43:48 -0500 Subject: [PATCH] fix(NetworkIdentity): Improved DisallowChildNetworkIdentities Error Logging References the offending object so it gets highlighted in the Editor when the error is clicked. --- Assets/Mirror/Core/NetworkIdentity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Mirror/Core/NetworkIdentity.cs b/Assets/Mirror/Core/NetworkIdentity.cs index 7de3dd766..6440e94d6 100644 --- a/Assets/Mirror/Core/NetworkIdentity.cs +++ b/Assets/Mirror/Core/NetworkIdentity.cs @@ -375,7 +375,7 @@ 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."); + 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); } }