object disappears after changing its parent

I have an object that is instantiated using Network.Instantiate. why does the object disappear for all clients after changing its parent? It is only visible on the server.

If I remove that line of code which changes the transform’s parent, it works normally.

Is this a bug or is this expected behavior? Workarounds?

This is likely due to the coordinates of the child object now being relative to the parent at one side of the network, while others still believe the coordinates to be relative to the world.

Take a look for the object close to 0,0,0 and you may find that it hasn’t actually disappeared.

I know this is an old post but this seems to still happen. My solution was to rescale the transform after making it a child as Unity appears to set the x,y,z scale to all zero. I hope this helps!

2 Likes