-
-
Notifications
You must be signed in to change notification settings - Fork 826
Closed
Labels
Description
from discord.
https://discord.com/channels/343440455738064897/883289312299475014/1062768523438469260
using the following script on Tanks.cs demo
readonly SyncList<int> list = new SyncList<int>();
void Awake()
{
list.Callback += OnChanged;
}
public override void OnStartServer()
{
InvokeRepeating(nameof(AddOne), 3, 3);
}
void AddOne()
{
list.Add(list.Count);
}
void OnChanged(SyncList<int>.Operation op, int index, int oldItem, int newItem)
{
Debug.LogWarning($"SyncList OnChanged index={index} old={oldItem} new={newItem}");
}