Search Unity

SOME people can't see others? Anyone maybe know why?

Discussion in 'Multiplayer' started by Gibbonuk, Mar 16, 2015.

  1. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    Ok I have this strange issue where only some users cannot see other users, yet all others can?

    The strange thing is this.

    Users get spawned as an FPS controller and can then walk about and see (other FPS capsules) this works every time. Now at anytime users can swap to another object, this is done at the request of the users and it destroys the current FPS object and they are then spawned as the new object (a vehicle).

    Its at this point where only SOME users can no longer see others, they can see the FPS capsule, but when re-spanwed they disappear, yet in the same session with others it works just as it should?

    I just don't understand what could be causing it? I have had reports that when users change to vehicle they appear for a flash second and then disappear again?

    Anyone shed any light?

    Thanks
     
  2. gsus725

    gsus725

    Joined:
    Aug 23, 2010
    Posts:
    250
    I have this same problem but I haven't looked over my code for reasons why yet
     
  3. DryTear

    DryTear

    Joined:
    Nov 30, 2012
    Posts:
    312
    When youre destroying objects, dont use Network.Destroy(), call and RPC call to destroy it instead,

    Code (csharp):
    1.  
    2. networkView.RPC("NetDestroy", RPCMode.AllBuffered);
    3.  
    4. [RPC]
    5. void NetDestroy()
    6. {
    7. Network.RemoveRPCs(networkView.owner);
    8. Destroy(gameObject);
    9. }
    10.  
    another thing thats really usefull, is NetworkView.Find(NetworkViewID); which helps in certain areas.
     
  4. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    HI, thanks ill give this a try. Do you think this could actually be causing issues with newly spawned objects (that certain users cant see?)

    Thanks
     
  5. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    Just as an update, a player who experience the issue sent me the log file and it is full with thousands of these...

    Received state update for view id' AllocatedID: 3' but the NetworkView doesn't exist

    (Filename: Line: 2474)

    View ID AllocatedID: 4 not found during lookup. Strange behaviour may occur

    (Filename: Line: 1681)

    What could be causing this?
     
  6. DryTear

    DryTear

    Joined:
    Nov 30, 2012
    Posts:
    312
    Are you possibly changing scenes on the network? or is it just one scene?

    I had this kind of issues when changing scenes after joining a server.
     
    Last edited: Mar 20, 2015