-
Notifications
You must be signed in to change notification settings - Fork 460
Closed
Labels
type:bugBug ReportBug Report
Description
Describe the bug
NetworkedList is not syncing correctly and doubles the entry on client
To Reproduce
Create NetworkedList as example.
Spawn Gameobject on Server
Add 3 things to the NetworkedList
server says .count = 3
client says .count = 6
all entrys are doubled at the client
Expected behavior
3 entrys on Server and 3 on client
Code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MLAPI;
public class TestScript : NetworkedBehaviour
{
NetworkedList<int> nl = new NetworkedList<int>();
void Start()
{
if (IsServer)
{
nl.Add(4);
nl.Add(20);
nl.Add(1);
}
}
void Update()
{
Debug.Log(nl.Count);
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type:bugBug ReportBug Report