Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spawn NetworkPrefab as a child of Scene NetworkObject make the object jump out of the hierarchy as a sibling #1188

Closed
babaq opened this issue Jan 27, 2024 · 1 comment
Labels
type:bug Bug Report

Comments

@babaq
Copy link

babaq commented Jan 27, 2024

Describe the bug:
spawning a network object that is the child of another network object, make it jump out of the hierarchy as a sibling.

Steps to reproduce the behavior:
1

var go = GameObject.Instantiate(prefab, parent)

here parent is a scene defined network object.
2

go.GetComponent<NetworkObject>().Spawn(true);

3
the go should be a child of parent, but now it is at the same level as a sibling of parent.

Expected behavior:
without spawning, the go is correctly added as a child of parent. but spawning make it jump out as a sibling of parent.

Desktop/Tablet/Smartphone (please complete the following information):

  • OS: win10
  • Unity: 2023.3.0b4
  • Netcode: 1.7.1
@babaq babaq added the type:bug Bug Report label Jan 27, 2024
@jabbacakes
Copy link
Collaborator

Thanks for raising this bug! I've forwarded it to the development team so they can address it in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Bug Report
Projects
None yet
Development

No branches or pull requests

2 participants