Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
33fcb7365b
@ -441,7 +441,7 @@ public class SampleScript : MonoBehaviour
|
|||||||
public Button prefab;
|
public Button prefab;
|
||||||
public GameObject root;
|
public GameObject root;
|
||||||
ObservableRingBuffer<int> collection;
|
ObservableRingBuffer<int> collection;
|
||||||
ISynchronizedView<GameObject> view;
|
ISynchronizedView<int, GameObject> view;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@ -459,10 +459,10 @@ public class SampleScript : MonoBehaviour
|
|||||||
view.ViewChanged += View_ViewChanged;
|
view.ViewChanged += View_ViewChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
void View_ViewChanged(in SynchronizedViewChangedEventArgs<int, string> eventArgs)
|
void View_ViewChanged(in SynchronizedViewChangedEventArgs<int, GameObject> eventArgs)
|
||||||
{
|
{
|
||||||
// hook remove event
|
// hook remove event
|
||||||
if (NotifyCollectionChangedAction.Remove)
|
if (eventArgs.Action == NotifyCollectionChangedAction.Remove)
|
||||||
{
|
{
|
||||||
GameObject.Destroy(eventArgs.OldItem.View);
|
GameObject.Destroy(eventArgs.OldItem.View);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user