Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Destroying a networked object, UNET errors/warnings

Discussion in 'UNet' started by terravires, Oct 7, 2015.

  1. terravires

    terravires

    Joined:
    Mar 27, 2013
    Posts:
    103
    So I've got network objects, NetworkId, etc. all on the prefabs. They spawn and are fine. But when I need to destroy them, I'm calling NetworkServer.Destroy(go);

    This works, but the problem appears with some components getting packets/messages after the fact.

    One in particular, NetworkChildTransform, seems unhappy to have it's object destroyed and complains to console. While I understand the message, "NetworkChildTransform: no game object", I'm wondering if there is a way to "correctly" destroy an object such that it doesn't trigger such events?