Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

who owns a networkview?

Discussion in 'Multiplayer' started by psx, Feb 18, 2008.

  1. psx

    psx

    Joined:
    Aug 25, 2005
    Posts:
    80
    if you attach a networkView component to a GO in the editor, who owns it? In my experience it seems like nobody? So is it good practice to only use network views with prefabs that get instantiated at runtime?

    Psx
     
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I think in most cases (maybe in all cases), the owner is the server.

    Jashan
     
  3. psx

    psx

    Joined:
    Aug 25, 2005
    Posts:
    80
    If it were "in most cases" - what would be the determining factor? It doesn't seem to be in all cases as far as I've been able to see.

    psx
     
  4. larus

    larus

    Unity Technologies

    Joined:
    Oct 12, 2007
    Posts:
    281
    All Network Views which are in a scene in the Editor are owned by the server. They get the name "Scene ID: 1" and so on if you print the View ID of those Network Views (or look at it in the inspector). When you allocate a View ID ("Allocated ID: 1", etc) and assign it to a Network View, then that Network View is owned by the one who did the allocation. This can be both a server or a client, they have it in common that they are runtime generated.
     
  5. psx

    psx

    Joined:
    Aug 25, 2005
    Posts:
    80
    Thanks Larus!
    psx