- Home /
Question by
engingulgor · May 10, 2020 at 11:46 AM ·
eventscrollviewscrollingevent triggering
scrollview scrolling don't work with event trigger
hello,
i have prefabs and i add event trigger for every prefabs. when i add event trigger, scrollview don't scrolling, how can i solve this?
public void addPrefab ()
{
GameObject yeniEkle = Instantiate(Perfab, Panel);
var pointerDown = new EventTrigger.Entry();
pointerDown.eventID = EventTriggerType.PointerDown;
pointerDown.callback.AddListener((e) => dersPointerDown());
yeniEkle.gameObject.AddComponent<EventTrigger>().triggers.Add(pointerDown);
var pointerUp = new EventTrigger.Entry();
pointerUp.eventID = EventTriggerType.PointerUp;
pointerUp.callback.AddListener((e) => dersPointerUp());
yeniEkle.gameObject.AddComponent<EventTrigger>().triggers.Add(pointerUp);
yeniEkle.transform.GetChild(0).GetComponent<Text>().text = "test1";
yeniEkle.transform.GetChild(1).GetComponent<Text>().text = System.DateTime.Now.ToString("dd MMMM yyyy");
yeniEkle.transform.GetChild(2).GetComponent<Text>().text = "99";
yeniEkle.transform.GetChild(3).GetChild(0).GetComponent<Text>().text = "232";
}
public void dersPointerUp()
{
Pointer= false;
}
public void dersPointerDown()
{
Pointer= true;
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612233836im_/https://answers.unity.com/themes/thub/images/avi.jpg)