Search Unity

Getting error:-[MLAPI] Failed to create object locally. [prefabHash=13351720688054313142].

Discussion in 'Netcode for GameObjects' started by unity_V7XydRCMnXwsdA, Aug 10, 2021.

  1. unity_V7XydRCMnXwsdA

    unity_V7XydRCMnXwsdA

    Joined:
    Jul 19, 2021
    Posts:
    3
    Below the above error this error also comes:-

    ArgumentNullException: Cannot spawn null object
    Parameter name: networkObject
    MLAPI.Spawning.NetworkSpawnManager.SpawnNetworkObjectLocally (MLAPI.NetworkObject networkObject, System.UInt64 networkId, System.Boolean sceneObject, System.Boolean playerObject, System.Nullable`1[T] ownerClientId, System.IO.Stream dataStream, System.Boolean readPayload, System.Int32 payloadLength, System.Boolean readNetworkVariable, System.Boolean destroyWithScene) (at Library/PackageCache/com.unity.multiplayer.mlapi@3e3aef6aa0/Runtime/Spawning/NetworkSpawnManager.cs:412)
    MLAPI.Messaging.InternalMessageHandler.<HandleConnectionApproved>g__DelayedSpawnAction|18_0 (System.IO.Stream continuationStream) (at Library/PackageCache/com.unity.multiplayer.mlapi@3e3aef6aa0/Runtime/Messaging/InternalMessageHandler.cs:164)
    MLAPI.Messaging.InternalMessageHandler.HandleConnectionApproved (System.UInt64 clientId, System.IO.Stream stream, System.Single receiveTime) (at Library/PackageCache/com.unity.multiplayer.mlapi@3e3aef6aa0/Runtime/Messaging/InternalMessageHandler.cs:207)
    MLAPI.NetworkManager.HandleIncomingData (System.UInt64 clientId, MLAPI.Transports.NetworkChannel networkChannel, System.ArraySegment`1[T] data, System.Single receiveTime, System.Boolean allowBuffer) (at Library/PackageCache/com.unity.multiplayer.mlapi@3e3aef6aa0/Runtime/Core/NetworkManager.cs:979)
    MLAPI.NetworkManager.HandleRawTransportPoll (MLAPI.Transports.NetworkEvent networkEvent, System.UInt64 clientId, MLAPI.Transports.NetworkChannel networkChannel, System.ArraySegment`1[T] payload, System.Single receiveTime) (at Library/PackageCache/com.unity.multiplayer.mlapi@3e3aef6aa0/Runtime/Core/NetworkManager.cs:875)
    MLAPI.NetworkManager.OnNetworkEarlyUpdate () (at Library/PackageCache/com.unity.multiplayer.mlapi@3e3aef6aa0/Runtime/Core/NetworkManager.cs:683)


    I have no idea what is causing this I am using prefabs and the prefab exists and is present in the scene.
     
  2. ahumblet

    ahumblet

    Joined:
    Aug 21, 2020
    Posts:
    2
    I'm seeing something similar. Did you ever figure this out?