Search Unity

should NetworkIdentity.sceneId be unique?

Discussion in 'Multiplayer' started by spaceman8, Mar 29, 2017.

  1. spaceman8

    spaceman8

    Joined:
    Jan 6, 2017
    Posts:
    40
    According to the docs NetworkIdentity.sceneId is "A unique identifier for NetworkIdentity objects within a scene.", however I am seeing the same id across multiple objects from the NetworkServer.SpawnObjects calls.

    Code (csharp):
    1. SpawnObjects sceneId:1 name:MyObjectA
    2. UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    3. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4. UnityEngine.Logger:Log(LogType, Object)
    5. UnityEngine.Debug:Log(Object)
    6. UnityEngine.Networking.NetworkServer:SpawnObjects()
    7.  
    8. SpawnObjects sceneId:1 name:MyObjectB
    9. UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    10. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    11. UnityEngine.Logger:Log(LogType, Object)
    12. UnityEngine.Debug:Log(Object)
    13. UnityEngine.Networking.NetworkServer:SpawnObjects()
    What might cause this? Thanks.
     
  2. spaceman8

    spaceman8

    Joined:
    Jan 6, 2017
    Posts:
    40
    I'm not sure if this is normal but what appears to have fixed it for me was to force my assets to save in text mode then I set all my sceneId's back to 0 which most of them were. I have not seen this issue since (fingers crossed).