Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question Mirror - Player pickup and drop objects

Discussion in 'Multiplayer' started by brainwipe, Oct 27, 2020.

  1. brainwipe


    Aug 21, 2017
    I want a player to pick up an object from the world and put it into a machine. When the player is holding the item, all the other players must see them holding it.

    I've read through and understood the Mirror example.

    This example suggests that the only way to do this is to destroy the game object on the server and create it on all the clients attached to the player. This, as I understand it, is because you can't have more than one NetworkIdentity in a hierarchy.

    When I "drop" the item back into the world, it must be destroyed and recreated again.

    Is this correct? Does anyone know of a better way?
  2. goldbug


    Oct 12, 2011
    @brainwipe indeed, there is no way to have nested networked objects. It is just a can of worm we can't really solve.

    So your description sounds about right.
    brainwipe likes this.