Search Unity

IDragHandler works in Editor but it doesn't work in final build

Discussion in 'Android' started by Sergey78, Oct 23, 2018.

  1. Sergey78

    Sergey78

    Joined:
    Jun 9, 2017
    Posts:
    1
    Hello. I have a script that attached to Unity UI object. This script implements interfaces: IDragHandler, IPointerDownHandler, IPointerUpHandler

    When I run my game in Editor it works great.

    But when I had built an apk file for Android and installed it on a few devices (Nexus 5, Samsung Galaxy S8) some virtual controls didn't work.

    I had added logging to the script and found out that OnDrag was not called.
    OnPointerUp was called, OnPointerDown was called but OnDrag was not.

    I tried different Scripting Backend - Mono, IL2CPP also I tried different versions of Android but I couldn't solve this problem.

    OnDrag(PointerEventData eventData) from IDragHandler is called in the Editor but it is not called in the build for Android. What cause this trouble?