Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed Oct 16, 2024
2 parents 7987d75 + 81baa40 commit 33fcb73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public class SampleScript : MonoBehaviour
public Button prefab;
public GameObject root;
ObservableRingBuffer<int> collection;
ISynchronizedView<GameObject> view;
ISynchronizedView<int, GameObject> view;

void Start()
{
Expand All @@ -459,10 +459,10 @@ public class SampleScript : MonoBehaviour
view.ViewChanged += View_ViewChanged;
}

void View_ViewChanged(in SynchronizedViewChangedEventArgs<int, string> eventArgs)
void View_ViewChanged(in SynchronizedViewChangedEventArgs<int, GameObject> eventArgs)
{
// hook remove event
if (NotifyCollectionChangedAction.Remove)
if (eventArgs.Action == NotifyCollectionChangedAction.Remove)
{
GameObject.Destroy(eventArgs.OldItem.View);
}
Expand Down

0 comments on commit 33fcb73

Please sign in to comment.