[InfoBox("Change the collection to get callbacks detailing the changes that are being made.")]
[OnCollectionChanged("Before", "After")]
public List<string> list = new List<string>() { "str1", "str2", "str3" };
[OnCollectionChanged("Before", "After")]
public HashSet<string> hashset = new HashSet<string>() { "str1", "str2", "str3" };
[OnCollectionChanged("Before", "After")]
public Dictionary<string, string> dictionary = new Dictionary<string, string>() { { "key1", "str1" }, { "key2", "str2" }, { "key3", "str3" } };
public void Before(CollectionChangeInfo info, object value)
{
Debug.Log("Received callback BEFORE CHANGE with the following info: " + info + ", and the following collection instance: " + value);
}
public void After(CollectionChangeInfo info, object value)
{
Debug.Log("Received callback AFTER CHANGE with the following info: " + info + ", and the following collection instance: " + value);
}