diff --git a/Assets/Mirror/Core/SyncList.cs b/Assets/Mirror/Core/SyncList.cs index e04a6df9d..e69f62842 100644 --- a/Assets/Mirror/Core/SyncList.cs +++ b/Assets/Mirror/Core/SyncList.cs @@ -33,9 +33,7 @@ public enum Operation : byte /// For OP_SET and OP_REMOVE, T is the OLD value of the entry. /// For OP_CLEAR, T is default. /// - // DEPRECATED 2024-10-14 // TODO deprecate in favor of explicit Callback, later rename Callback to OnChange for consistency with other SyncCollections. - [Obsolete("SyncList.OnChange(op, index, item) is obsolete. Use SyncList.Callback(op, index, oldItem, newItem) instead.")] public Action OnChange; /// @@ -121,37 +119,27 @@ void AddOperation(Operation op, int itemIndex, T oldItem, T newItem, bool checkA { case Operation.OP_ADD: OnAdd?.Invoke(itemIndex); - #pragma warning disable CS0618 OnChange?.Invoke(op, itemIndex, newItem); - #pragma warning restore CS0618 Callback?.Invoke(op, itemIndex, oldItem, newItem); break; case Operation.OP_INSERT: OnInsert?.Invoke(itemIndex); - #pragma warning disable CS0618 OnChange?.Invoke(op, itemIndex, newItem); - #pragma warning restore CS0618 Callback?.Invoke(op, itemIndex, oldItem, newItem); break; case Operation.OP_SET: OnSet?.Invoke(itemIndex, oldItem); - #pragma warning disable CS0618 OnChange?.Invoke(op, itemIndex, oldItem); - #pragma warning restore CS0618 Callback?.Invoke(op, itemIndex, oldItem, newItem); break; case Operation.OP_REMOVEAT: OnRemove?.Invoke(itemIndex, oldItem); - #pragma warning disable CS0618 OnChange?.Invoke(op, itemIndex, oldItem); - #pragma warning restore CS0618 Callback?.Invoke(op, itemIndex, oldItem, newItem); break; case Operation.OP_CLEAR: OnClear?.Invoke(); - #pragma warning disable CS0618 OnChange?.Invoke(op, itemIndex, default); - #pragma warning restore CS0618 Callback?.Invoke(op, itemIndex, default, default); break; }