• Destroy an object across the network. See also syncInstantiate.

    Parameters

    • obj: IComponent | IGameObject

      The object or component to be destroyed

    • con: INetworkConnection

      The network connection to send the destroy event to

    • recursive: boolean = true

      If true, all children will be destroyed as well. Default is true

    • Optionalopts: SyncDestroyOptions

      Options for the destroy operation

    Returns void