Skip to content

Data stream errors with unrecognized PacketIds when using nested NetworkObjects #542

@xaevman

Description

@xaevman

General
Unity version: 2022.3.7f1
Fish-Networking version: 4.0.2
Discord link: https://discord.com/channels/424284635074134018/1034477094731784302/1171924774746857523

#543 is a proposed fix for the issue, though I'm not sure it covers all intended use cases

Description
ClientManager complains about unknown PacketIds when spawning an instance of a prefab with relatively trivial nested NetworkObject hierarchy. This did not happen in Fish-Net v3, but is currently being experienced in 4.0.2.

Replication
You have been invited to a Github repo containing a basic repro: https://github.com/xaevman/FishNet-tests/tree/fish402-nested-errors
This repro is private since we are Pro users. An invite was sent to the FirstGearGames Github account.
Note the repro is in the fish402-nested-errors branch.

  1. Basic Network manager set up
  2. Create a player Prefab that contains a capsule for visualization, NetworkTransform, and NetworkObject components
  3. Create another prefab with any basic NetworkBehaviour component (networked hitpoint tracker, for example) and NetworkObject component.
  4. Add a sub-object to the Player prefab called "StatusBars", and add two copies of the Hitpoint tracker prefab as children to it.
  5. Hit play and start server + client
  6. Observe console errors about invalid PacketIds

Expected behavior
No errors, or if an invalid prefab hierarchy is being used, Fish-Net should log useful errors to help a user correct their content mistakes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingHigh PriorityThis task will be prioritized.Resolved Pending ReleaseIssue is resolved and will be available on the noted version.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions