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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Sending commands that aren't from the local player object

Discussion in 'Multiplayer' started by SeriousBusinessFace, Jun 11, 2015.

  1. SeriousBusinessFace


    May 10, 2014
    This currently seems unsupported. Is this an intentional feature, or is it something that's intended to be fixed?
  2. seanr


    Unity Technologies

    Sep 22, 2014
    This is deliberately not allowed for security reasons. Only the owner of a player object can send commands.
  3. RalfZimmer


    Jul 24, 2013
    how can I create more player objects? My Game need control more than one player object.
    When I Spawn a new on a server I have no control on the client side
  4. Indiefreaks


    Nov 12, 2012
    Why would you need to create more than one player object?

    You may be a little confused with this "Player Object" concept.
    A Player Object in UNET is simply a GameObject which is created with all its components in every client and server for your game.
    Depending on the game you make, you may have to choose to make this player object an object that is actually visible on the scene or some kind of "control" object for your player.

    For instance, if you make a space shooter game where your player controls only one spaceship at any given time, your "Player Object" could be the prefab of the spaceship with all its properties and behaviours attached to it.
    Now, if you were making a Real Time Strategy game, since your player would probably control multiple units and buidings, you'd use this "Player Object" as a prefab containing all the necessary properties and methods to create those units and buildings on the server.

    Hope it gives you some clues to move on. ;)