Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Unity Multiplayer Simple way to exchange Messages

Discussion in 'Connected Games' started by Straesso, Dec 1, 2018.

  1. Straesso


    Jan 28, 2017
    Hi Everybody,

    i'm just trying to develop a Tetris-Multiplayer Clone for two player - similar to the Tetris version of 1990 on the original Nintendo Gameboy. My big problem is: i don't want to have a real syncronisation of GameObjects on all Clients. I just want to send an Information from one client to another. When the simple Information (an Integer Value) is received bei the Client of the opponent, a GameObejct should be instantiated there, but ONLY on the Playground of the opponent.

    When i use the NetworkManager, i also have to use a PlayerPrefab. All changes done from the attached Script will be synchronized and shown on both playgrounds. When a script, attached to the playerPrefab, is instantiating a GameObject, it is shown on both playgrounds - that is not, what i want. A player should be able to send a Message to the Opponent and than a GameObject should be instantiated ONLY on the Playground of the Opponent. It also only should be visible for him. This ist not a synchronisation. It is a transfer of a simple information from one client to another and the receiving client should do something with this information. But only on the playground of the receiving client.

    I tried to find a solution for this (easy?) Problem for three days and was not successful. Any Hints or ideas?

    Thank you in advance,
  2. Joe-Censored


    Mar 26, 2013
    The Player prefab doesn't need to have any models on it. You can just use it as a tool for sending Commands to the server, or just do all of your networking using Unet Messages and don't really use the Player GameObject for much at all.