Search Unity

NetworkIDs different between builds.

Discussion in 'Multiplayer' started by jethrogillgren, Apr 19, 2018.

  1. jethrogillgren

    jethrogillgren

    Joined:
    Jan 11, 2017
    Posts:
    28
    Hi all.

    Has anyone else had the issue where building your code on different platforms/Operating Systems results in the NetworkIDs of scene objects being different?

    I submitted a test case but it was "unreproduceable", which i suspect is because it's pretty awkward to reproduce. My specific case used a UWP app build from windows and a Android app built from mac.

    I wanted to see if others face this issue, and if any solutions have been found.

    The current workaround is whenever we want to test the clients together we have to get one machine to build them all, which works OK.
     
  2. HiddenMonk

    HiddenMonk

    Joined:
    Dec 19, 2014
    Posts:
    987
    Have a look at this workaround that makes sure the order of the sceneIDs are based on their gameobject name.
    https://forum.unity.com/threads/unet-ids-failing-to-match-on-network-session.459070/#post-2986761
    Im pretty sure this code is running for every scene, but it seems to be setting all sceneIDs for every scene object in every scene, when what youd really want is to just work on the specific scene being post processed.
    Here is a post I did for a different issue, but can give some more info on how you can work around this.
    https://forum.unity.com/threads/add...ceneids-on-scene-objects.525410/#post-3454019

    I dont know if assetIDs ever change, but if they do then I think that would cause issues as well.
     
    jethrogillgren likes this.
  3. jethrogillgren

    jethrogillgren

    Joined:
    Jan 11, 2017
    Posts:
    28
    Thanks, I had tried HLAPI Pro which has that Fix included, but it still failed.
    But I forgot to actually tried the fix on it's own, so will try that now!
    Thanks

    edit: Thanks, that workaround works. You're a lifesaver!
     
    Last edited: Apr 20, 2018