Skip to content

Conversation

@Squashi11
Copy link

@Squashi11 Squashi11 commented Oct 26, 2025

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 done

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests

Does 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

@Squashi11 Squashi11 requested a review from a team as a code owner October 26, 2025 17:45
@unity-cla-assistant
Copy link

unity-cla-assistant commented Oct 26, 2025

CLA assistant check
All committers have signed the CLA.

@Squashi11
Copy link
Author

My first try at making a merge request, correct me in stuff please

Copy link
Collaborator

@EmandM EmandM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than adding information with no context, it's best if the existing debug log is updated to include the missing information.

Thank you for your contribution!

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants