Updated network transform message#3743
Updated network transform message#3743Squashi11 wants to merge 2 commits intoUnity-Technologies:develop-2.0.0from
Conversation
Updated network transform message to include the missing reference from this problem : https://discussions.unity.com/t/targeted-network-transform-does-not-exist-but-it-does-exist-error-question/1637568/5
|
|
|
My first try at making a merge request, correct me in stuff please |
| if (transform == null) | ||
| { | ||
| Debug.LogError($"[{nameof(NetworkTransformMessage)}][Invalid] Targeted {nameof(NetworkTransform)}, {nameof(NetworkBehaviour.NetworkBehaviourId)} ({networkBehaviourId}), does not exist! Make sure you are not spawning {nameof(NetworkObject)}s with disabled {nameof(GameObject)}s that have {nameof(NetworkBehaviour)} components on them."); | ||
| Debug.LogError(networkObject.gameObject.name); |
There was a problem hiding this comment.
I appreciate that this fixes the issue of finding the name of the game object, however that name is being logged without any context. We prefer to ensure that our error logs have enough context to understand what the error message is trying to communicate.
A better fix would be to edit the log underneath and add the gameobject name into the existing log.
|
Unfortunately a change this small gets caught in a strange loop where it's too small to take the time to land on its own, but we try to avoid changing unrelated files in unrelated PRs. If you want to update this branch to address my comment, then I have space in my priorities to land a user PR. We are slowly updating all the log lines in the project to include more relevant info, so this change will land organically at some point. |

Updated network transform message to include the missing reference from this problem :
https://discussions.unity.com/t/targeted-network-transform-does-not-exist-but-it-does-exist-error-question/1637568/5
Purpose of this PR
Jira ticket
???
Changelog
Changed the way the error is displayed in console so it now correctly shows the problematic Network Objects name
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?If any boxes above are checked the QA team will be automatically added as a PR reviewer.
Backports