From 3dc3cb26f9dbaa53a22452b95dcb7ec08a388702 Mon Sep 17 00:00:00 2001 From: kyubuns Date: Mon, 7 Oct 2024 18:48:36 +0900 Subject: [PATCH] fix SampleScript --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7da0fc5..01eab90 100644 --- a/README.md +++ b/README.md @@ -441,7 +441,7 @@ public class SampleScript : MonoBehaviour public Button prefab; public GameObject root; ObservableRingBuffer collection; - ISynchronizedView view; + ISynchronizedView view; void Start() { @@ -459,10 +459,10 @@ public class SampleScript : MonoBehaviour view.ViewChanged += View_ViewChanged; } - void View_ViewChanged(in SynchronizedViewChangedEventArgs eventArgs) + void View_ViewChanged(in SynchronizedViewChangedEventArgs eventArgs) { // hook remove event - if (NotifyCollectionChangedAction.Remove) + if (eventArgs.Action == NotifyCollectionChangedAction.Remove) { GameObject.Destroy(eventArgs.OldItem.View); }