ITADN

Fix SyncList OnChange signature

#4064ClosedVulgoRox 创建于 2025-11-05
wontfix
V
VulgoRoxcommented
I have being struggling for 24 hours trying to fix a bug in my code, just to find out that the value in SyncList.OnChange(Operation, index, value) changes depending on the operation, it has the old value when operation is OP_SET and OP_REMOVE, or the new value when OP_ADD and OP_INSERT. Yes, I overlooked the docs on this single OnChange method, but still a very un intuitive behavior. My suggestion is to set this to deprecated and replace by a delegate with 4 values instead of a generic Action, and make it clear with correct naming( OnChange(operation, index, oldValue, newValue). Let's make Mirror even more awesome, thanks!
关闭于 2025-11-05 1 条评论