Skip to content

Scene objects are reparented to nearest parent NetworkObject on client #1048

Description

@magnoahlia

Unity Version: 6000.3.13f1
FishNet Version: 4.7.2
Discord Link: https://discord.com/channels/424284635074134018/1034477094731784302/1517164218866995240

Description

I'm noticing an issue where nested networked scene objects are reparented to the nearest parent network object on clients. For example:

In the scene:

Canvas
	ChildA (NetworkObject)
		ChildB
			ChildC (NetworkObject)
			ChildC (Not Networked)

On the server (which is also a client):

Canvas
	ChildA (NetworkObject)
		ChildB
			ChildC (NetworkObject)
			ChildC (Not Networked)

On other clients:

Canvas
	ChildA (NetworkObject)
		ChildB
			ChildC (Not Networked)
		ChildC (NetworkObject)

Host

Image

Client

Image

Replication

  1. Open the SceneObjectReparenting scene in the provided [sample project]((https://github.com/user-attachments/files/29097676/SceneObjectReparenting-Repro.zip).
  2. Start a server/client instance using the Network HUD controls.
  3. Start a client only instance using the Network HUD controls (I use Unity Multiplayer Play Mode for this).
  4. Observe on the host that the green square (Child C Not Networked) is visible and on the client the red square (Child C Networked) is visible. Also observe on the client that Child C Networked is now a child of Child A instead of Child B.

Expected behavior

The hierarchy is the same on the host and client(s).

Sample project

SceneObjectReparenting-Repro.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions