Search Unity

Proper documentation for NetworkViewID

Discussion in 'Multiplayer' started by Der Dude, Jul 29, 2009.

  1. Der Dude

    Der Dude

    Joined:
    Aug 7, 2006
    Posts:
    213
    Hello,

    I would like to be able to use the NetworkViewID struct for my own Networking-System should I ever need to build one. In that case I would like to reuse as many components as possible and one important element is the NetworkViewID of objects being watched.

    Specifically: Every NetworkViewID has 3 attributes: isMine, owner and some kind of number, which is not documented. I would like to know the name of this variable for future use.
     
  2. LukeB

    LukeB

    Joined:
    Aug 8, 2009
    Posts:
    88
    Im pretty sure what you are looking for is viewID (which is not read only) :)
    Code (csharp):
    1.  
    2. var New_id=Network.AllocateViewID ;
    3. GameObject.GetComponent(NetworkView).viewID=New_id;