Skip to content

Commit

Permalink
Merge pull request #77 from kyubuns/patch-1
Browse files Browse the repository at this point in the history
Fixed SampleScript in the readme
  • Loading branch information
neuecc authored Oct 7, 2024
2 parents 8afb3fb + 3dc3cb2 commit 81baa40
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 81baa40

Please sign in to comment.