Search Unity

Soft synchronization fails with additive loaded scenes

Discussion in 'Netcode for GameObjects' started by Lightning-Rock, Mar 3, 2022.

  1. Lightning-Rock

    Lightning-Rock

    Joined:
    Jan 19, 2014
    Posts:
    23
    Hi trying to load a scene additive with NetworkSceneManager fails to synchronize in a build. It does work between 2 editors however.

    Anyone else had an issue like this?


    [Netcode] NetworkPrefab hash was not found! In-Scene placed NetworkObject soft synchronization failure for Hash: 2065433714!
    Failed to spawn NetworkObject for Hash 2065433714.
    NullReferenceException: Object reference not set to an instance of an object
    at Unity.Netcode.SceneEventData.WriteClientSynchronizationResults (Unity.Netcode.FastBufferWriter writer) [0x0002b] in <07c29406b16242fb8835d724480265c3>:0
    at Unity.Netcode.SceneEventData.Serialize (Unity.Netcode.FastBufferWriter writer) [0x0008c] in <07c29406b16242fb8835d724480265c3>:0
    at Unity.Netcode.SceneEventMessage.Serialize (Unity.Netcode.FastBufferWriter writer) [0x00000] in <07c29406b16242fb8835d724480265c3>:0
    at Unity.Netcode.MessagingSystem.SendMessage[TMessageType,TClientIdListType] (TMessageType& message, Unity.Netcode.NetworkDelivery delivery, TClientIdListType& clientIds) [0x00043] in <07c29406b16242fb8835d724480265c3>:0
    at Unity.Netcode.NetworkManager.SendMessage[TMessageType,TClientIdListType] (TMessageType& message, Unity.Netcode.NetworkDelivery delivery, TClientIdListType& clientIds) [0x000dd] in <07c29406b16242fb8835d724480265c3>:0
    at Unity.Netcode.NetworkSceneManager.SendSceneEventData (System.UInt32 sceneEventId, System.UInt64[] targetClientIds) [0x00028] in <07c29406b16242fb8835d724480265c3>:0
    at Unity.Netcode.NetworkSceneManager.HandleClientSceneEvent (System.UInt32 sceneEventId) [0x00087] in <07c29406b16242fb8835d724480265c3>:0
    at Unity.Netcode.NetworkSceneManager.ClientLoadedSynchronization (System.UInt32 sceneEventId) [0x001ad] in <07c29406b16242fb8835d724480265c3>:0
    at Unity.Netcode.ISceneManagerHandler+SceneEventAction.Invoke () [0x00000] in <07c29406b16242fb8835d724480265c3>:0
    at Unity.Netcode.NetworkSceneManager+DefaultSceneManagerHandler+<>c__DisplayClass0_0.<LoadSceneAsync>b__0 (UnityEngine.AsyncOperation asyncOp2) [0x00000] in <07c29406b16242fb8835d724480265c3>:0
    at UnityEngine.AsyncOperation.InvokeCompletionEvent () [0x0000f] in <dc2e8542a1f74ab8a8b163595600385e>:0
     
  2. Lightning-Rock

    Lightning-Rock

    Joined:
    Jan 19, 2014
    Posts:
    23
    Resolved. Allright after a lot of testing, I have determined it wasn't the additive soft synch at fault, it was having a network object prefab nested under another prefab that caused the problem. Just posting this here in case someone else has similar problem.
     
    willwlh and luke-unity like this.
  3. Jicefrost

    Jicefrost

    Joined:
    May 13, 2019
    Posts:
    40
    Same trouble bur don't understand solving. "it was having a network object prefab nested under another prefab that caused the problem" you got some network Prefab and another prefab inside it?
     
  4. Jicefrost

    Jicefrost

    Joined:
    May 13, 2019
    Posts:
    40
    Figured my trouble. One of objects on scene(on client) got another acript attached so hash's of this prefabs were really different. I wonder if there will be many such "objectcs" with different hashes, how to figure which one have trouble? usually property "GlobalObjectHash" show different number non that on error