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

Changing Hosts is Destroying All Networked Objects #7226

Open
agincel opened this issue Dec 22, 2024 · 2 comments
Open

Changing Hosts is Destroying All Networked Objects #7226

agincel opened this issue Dec 22, 2024 · 2 comments

Comments

@agincel
Copy link

agincel commented Dec 22, 2024

Describe the bug

Starting very recently, any time the Host leaves in Marble Racer, the entire lobby state explodes. All player marbles, the game state controller, and anything else that's a Networked Object is destroyed, at which point the Lobby is irrecoverably broken.

What I BELIEVE is happening is that all Networked Objects, upon Host migration, are being treated as if they were owned by the previous Host, and their Orphaned Mode is treated as being "Destroy", regardless of actual setting.

I've tried several different publishes of Marble Racer from the past month, and all of them now exhibit this behavior when they hadn't previously, which leads me to believe that this is a s&box issue, and not some issue in my own configuration.

To Reproduce

  1. Have two players join Marble Racer
  2. Have the host leave the game
  3. Observe all networked objects destroy themselves, rendering the lobby unplayable.

Expected behavior

Host migration should handle the transfer of networked objects as it did previously, obeying Orphaned Mode settings, and not destroying networked objects which should not be destroyed as part of the transfer.

Media/Files

Image

Additional context

No response

@aylaylay
Copy link

I have a feeling this might be related to json serialization issues. Have you tried going through your scene and making sure all objects have NetworkOrphaned set correctly? It could have been reset to default which is Destroy.

@agincel
Copy link
Author

agincel commented Dec 22, 2024

I have a feeling this might be related to json serialization issues. Have you tried going through your scene and making sure all objects have NetworkOrphaned set correctly? It could have been reset to default which is Destroy.

Here are screenshots of the settings on all networked objects used in Marble Racer as of the most recent publish (the live version):

Game State Controller
Image

Player Container
Image

...that's it. Player Container is a prefab spawned by Network Helper, which naturally sets the owner of each of these Player Containers to be the connection that spawned them. Yet, upon a host disconnecting, all marbles are destroyed. Plus the Game State Controller. It's really weird...

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

2 participants