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

Cannot parent a non-networked object onto a network object #7184

Open
Remscar opened this issue Dec 16, 2024 · 0 comments
Open

Cannot parent a non-networked object onto a network object #7184

Remscar opened this issue Dec 16, 2024 · 0 comments

Comments

@Remscar
Copy link

Remscar commented Dec 16, 2024

Describe the bug

There seems to be some strange behavior happening with spawning a non-networked game object and parenting it to a game object that is networked.

I've ran into this issue in the past where I wanted to spawn a UI panel only visible to the player who "owns" the game object, and when I parented that "client-side only" game object to the "network object" game object it would crash S&Box completely.

In this case I am spawning a (not networked) prefab which is a short particle effect, and I would like to parent it in relation to another (networked) game object. When I do this, the particle effect does nothing. If I don't parent it, then the particle effect works.

I have verified it's spawning the effect in the correct location. What's also strange is if I network spawn the prefab and then parent it, the same behavior happens.

To Reproduce

sbox-dev_WUDHUN6KHM.mp4

I don't have an isolated project for this, here is a video walking through how I see the behavior. I can create a project on request to isolate this if needed.

General steps:

  1. Create a prefab which contains a particle effect
  2. Create a "network object" game object
  3. Through some code spawn the prefab (do not network the instance) and attach it to the networked game object

Expected behavior

The particle effect should play

Media/Files

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To triage
Development

No branches or pull requests

1 participant