-
Notifications
You must be signed in to change notification settings - Fork 456
Open
Labels
stat:awaiting-responseAwaiting response from author. This label should be added manually.Awaiting response from author. This label should be added manually.stat:awaiting-triageStatus - Awaiting triage from the Netcode team.Status - Awaiting triage from the Netcode team.type:bugBug ReportBug Report
Description
Everything used to work fine in v2.4.4. Suddenly changing network list struct value is not triggering change event in any client nor host. Nothing works. Add and Remove events triggers but change event does not. My project used to work fine on earlier version, I just upgraded and it broke
Reproduce Steps
- Just try updating networklist data, the change event will not get triggered
Actual Outcome
OnListUpdate change event does not get triggered
Expected Outcome
OnListUpdate change event should get triggered
Environment
- OS: Windows 11
- Unity Version: 6000.0.56
- Netcode Version: 2.5.0
- Netcode Commit: [e.g. https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/commit/ba418fa5b600ad9eb61fab0575f12fbecc2c6520]
- Netcode Topology: [e.g. Client-Server, Distributed Authority, etc.]
Additional Context
My Code:
PlayerData data = playerDataHandler.GetPlayerData(networkManager.LocalClientId);
data.runtimeData.isReadyInLobby = !data.runtimeData.isReadyInLobby;
playerDataHandler.UpdatePlayerData(data);
//Updation
public void UpdatePlayerData(PlayerData data)
{
if (IsServer)
{
UpdateData(data.runtimeData);
}
else
{
UpdatePlayerDataRpc(data.runtimeData);
}
}
[Rpc(SendTo.Server)]
private void UpdatePlayerDataRpc(PlayerRuntimeData data)
{
UpdateData(data);
}
private void UpdateData(PlayerRuntimeData data)
{
if (playerDataIndexMap != null &&
playerDataIndexMap.TryGetValue(data.clientId, out int index))
{
playerRuntimeDataList[index] = data;
}
}
Metadata
Metadata
Assignees
Labels
stat:awaiting-responseAwaiting response from author. This label should be added manually.Awaiting response from author. This label should be added manually.stat:awaiting-triageStatus - Awaiting triage from the Netcode team.Status - Awaiting triage from the Netcode team.type:bugBug ReportBug Report