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.

Network.instantiation and removal workflow help.

Discussion in 'Multiplayer' started by .jesse, Mar 7, 2008.

  1. .jesse


    Jan 3, 2008
    Hi all,

    I've been working with the networking example 'third person player' where one player acts as a server and another acts as a client. Upon connection between the two the Network.Instantiate method is invoked and both players see an synchronous instance of the other. This example works well. However, both players are instantiating their avatars at runtime. I would like to have similar functionality but my desired result would be to have an existing avatar in the scene prior to anyone connecting. I am using the master server as a connection between the two player instances for testing.

    The challenges I'm facing while using the same approach (with Network.Instantiate) is a connection between two players leads to duplications of each player's existing one (the remote avatar shows up well). The problem gets worse when either party disconnects which (naturally) doesn't clean up the extra avatar duplicates.

    My question: what are some good/existing work flow approaches that I should use/consider in order to accomplish a server/client avatar connection.
    Perhaps I should ask if Network.Instantiate is the right method to accomplish two player avatars sharing a scene. It just seems to work well but requires some overhead for clean up and implementation.

    Any help would be appreciated.