Search Unity

CO-OP use own GUI?

Discussion in 'Scripting' started by besieger1, Jan 3, 2014.

  1. besieger1

    besieger1

    Joined:
    Jul 26, 2012
    Posts:
    34
    Hey guys!

    I am trying to add a CO-OP element to my game and though it works the players sort of, each player has there own GUI(3D GUI everything is models with scale being modified on a separate camera), now each player has there own copy of this camera with the view scaled so that look right but when playing they both seem to share both GUI's.

    Here is what I mean:
    $untitled.png

    http://s22.postimg.org/904226h69/untitled.png

    EDIT: After more poking around I have found that the objects both player 1 and player 2 are shearing variables to, Health is sheared + health regen is doubled since because there is 2 players.



    Im grateful of any help, thanks
     
    Last edited: Jan 3, 2014
  2. Sickuhtrix

    Sickuhtrix

    Joined:
    Nov 20, 2013
    Posts:
    62
    You need to disable the GUI for remote players.

    Just do a check with
    Code (csharp):
    1.  if (networkView.isMine)
     
  3. besieger1

    besieger1

    Joined:
    Jul 26, 2012
    Posts:
    34
    This is CO-OP Offline not online
     
  4. Sickuhtrix

    Sickuhtrix

    Joined:
    Nov 20, 2013
    Posts:
    62
    My mistake, but without being able to view any of your code it's IMPOSSIBLE to say what's wrong....