userData is null (3_ga_ump tag getting deleted/nonexistent)

The code should be identical to what is shown on the video. The userData variable itself is empty so it can’t access the name, will try to see what’s up with that.
I get this error code:

NullReferenceException: Object reference not set to an instance of an object
TankPlayer.OnNetworkSpawn () (at Assets/Scripts/Core/Player/TankPlayer.cs:25)
Unity.Netcode.NetworkBehaviour.VisibleOnNetworkSpawn () (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.5.1/Runtime/Core/NetworkBehaviour.cs:497)
UnityEngine.Debug:LogException(Exception)
Unity.Netcode.NetworkBehaviour:VisibleOnNetworkSpawn() (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.5.1/Runtime/Core/NetworkBehaviour.cs:501)
Unity.Netcode.NetworkObject:InvokeBehaviourNetworkSpawn() (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.5.1/Runtime/Core/NetworkObject.cs:1066)
Unity.Netcode.NetworkSpawnManager:SpawnNetworkObjectLocallyCommon(NetworkObject, UInt64, Boolean, Boolean, UInt64, Boolean) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.5.1/Runtime/Spawning/NetworkSpawnManager.cs:636)
Unity.Netcode.NetworkSpawnManager:SpawnNetworkObjectLocally(NetworkObject, UInt64, Boolean, Boolean, UInt64, Boolean) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.5.1/Runtime/Spawning/NetworkSpawnManager.cs:539)
Unity.Netcode.NetworkConnectionManager:HandleConnectionApproval(UInt64, ConnectionApprovalResponse) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.5.1/Runtime/Connection/NetworkConnectionManager.cs:610)
Unity.Netcode.NetworkManager:HostServerInitialize() (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.5.1/Runtime/Core/NetworkManager.cs:895)
Unity.Netcode.NetworkManager:StartHost() (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.5.1/Runtime/Core/NetworkManager.cs:851)
<StartHostAsync>d__9:MoveNext() (at Assets/Scripts/Networking/Host/HostGameManager.cs:100)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Lobby)
Unity.Services.Lobbies.Internal.<CreateLobbyAsync>d__4:MoveNext() (at ./Library/PackageCache/com.unity.services.lobby@1.0.3/Runtime/SDK/WrappedLobbyService.cs:67)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Response`1)
Unity.Services.Lobbies.Internal.<TryCatchRequest>d__20`2:MoveNext() (at ./Library/PackageCache/com.unity.services.lobby@1.0.3/Runtime/SDK/WrappedLobbyService.cs:390)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Response`1)
Unity.Services.Lobbies.Apis.Lobby.<CreateLobbyAsync>d__6:MoveNext() (at ./Library/PackageCache/com.unity.services.lobby@1.0.3/Runtime/Apis/LobbyApi.cs:236)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(HttpClientResponse)
Unity.Services.Lobbies.Http.<MakeRequestAsync>d__3:MoveNext() (at ./Library/PackageCache/com.unity.services.lobby@1.0.3/Runtime/Http/HttpClient.cs:47)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(HttpClientResponse)
Unity.Services.Lobbies.Http.<CreateWebRequestAsync>d__7:MoveNext() (at ./Library/PackageCache/com.unity.services.lobby@1.0.3/Runtime/Http/HttpClient.cs:138)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(HttpClientResponse)
Unity.Services.Lobbies.Http.<<CreateWebRequestAsync>b__0>d:MoveNext() (at ./Library/PackageCache/com.unity.services.lobby@1.0.3/Runtime/Http/HttpClient.cs:135)
System.Threading.Tasks.TaskCompletionSource`1:SetResult(HttpClientResponse)
Unity.Services.Lobbies.Http.<>c__DisplayClass0_0:<GetAwaiter>b__0(AsyncOperation) (at ./Library/PackageCache/com.unity.services.lobby@1.0.3/Runtime/Http/UnityWebRequestHelpers.cs:34)
UnityEngine.AsyncOperation:InvokeCompletionEvent()

Hi Zoki,

Again apologies for the missing of this question as once again our tagging system has failed and hasnt come up on our searches.
I am going through these and adding the tags when they have been created and manually creating them when they have not been created.
From other questions i think you have solved this but if that is not the case please do reach out and let me know

Hey Marc,
sorry for not answering earlier. I do believe this problem was solved, can’t remember now what the problem was but I believe I wrote it on the other thread. A lot of problems were solved once I turned on User Authentication so it’s possible this issue was solved by it as well

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms