-
Notifications
You must be signed in to change notification settings - Fork 437
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
Unable to parent NetworkObject to a NetworkObject only on client #3100
Comments
@Conundroy Order of Operations:
Let me know if this resolves your issue or if not then if you could provide me with a replication project or the script that you are using to instantiate, spawn, and parent the two objects it would be helpful. |
I have the same issue, it started appearing when I upgraded from 1.8 to 2.0.
The object gets correctly parented on server and also late joining clients, but for clients currently in the game the parenting never happens. |
Here's the script on the parent object/game manager:
This works as intended in v1.11.0. |
Hmmm...generally speaking...instantiating and spawning in the middle of spawning is not recommended as it can lead to issues down the road. Just out of curiosity, have you tried changing the |
This is the first time I'm hearing that its not recommended to spawn things inside OnNetworkSpawn. How are you supposed to spawn things on server when it initializes then? I did also try OnNetworkPostSpawn for this specific issue, and it didn't change anything. |
@Fobri |
Description
Unable to parent NetworkObject to a NetworkObject only on client.
Reproduce Steps
Actual Outcome
Host:
Client:
Expected Outcome
Host:
Client:
Environment
Additional Context
Works if I spawn and parent in editor, probably has something to do with DesroyedWithScene set to true?
Update: Works when I downgrade to v1.11.0
The text was updated successfully, but these errors were encountered: